Go to the documentation of this file.
37 #include <std_msgs/MultiArrayDimension.h>
41 , m_channels_enabled(false)
50 sensor_msgs::JointState joint_msg;
75 for (
size_t i = 0; i < 9; ++i)
93 ROS_INFO(
"Driver was autostarted! Input can now be sent. Have a safe and productive day!");
98 ROS_ERROR(
"Tried to reset the fingers by autostart: Not succeeded!");
103 ROS_INFO(
"SVH Driver Ready, you will need to connect and reset the fingers before you can use "
133 "diagnostics_to_protocol"));
142 const uint16_t firmware_minor_version)
148 std::string parameters_name =
"VERSIONS_PARAMETERS";
168 firmware_major_version, firmware_minor_version, dynamic_parameters);
196 ROS_ERROR(
"Parameter Error! While reading the controller settings. Will use default settings");
231 ROS_ERROR(
"Could not get Version Info from SCHUNK five finger hand with serial device %s, and "
246 "Could not connect to SCHUNK five finger hand with serial device %s, and retry count %i",
269 schunk_svh_msgs::HomeAll::Response& resp)
277 if (resp.success ==
true)
287 schunk_svh_msgs::HomeWithChannels::Response& resp)
290 bool channels_enabled_before;
296 channels_enabled_before =
true;
301 channels_enabled_before =
false;
302 ROS_WARN_STREAM(
"After resetting asked channel the ros controll loop will not be enabled");
306 for (std::vector<uint8_t>::iterator it = req.channel_ids.begin(); it != req.channel_ids.end();
324 schunk_svh_msgs::SetAllChannelForceLimits::Response& res)
334 schunk_svh_msgs::SetChannelForceLimit::Response& res)
ros::ServiceServer m_setAllForceLimits_srv
std::shared_ptr< SVHDiagnostics > m_svh_diagnostics
Handle to the diagnostics test class creating a test protocol with the web gui package.
int m_firmware_major_version
std::vector< bool > home_settings_given
bool m_channels_enabled
m_channels_enabled enables the ros-control-loop in the hw interface
bool getParam(const std::string &key, bool &b) const
#define ROS_FATAL_STREAM(args)
ros::Subscriber enable_sub
void enableChannelCallback(const std_msgs::Int8ConstPtr &channel)
Callback function to enable channels of SCHUNK five finger hand.
ros::NodeHandle m_priv_nh
private node handle
ServiceServer advertiseService(AdvertiseServiceOptions &ops)
ros::ServiceServer m_home_service_joint_names
std::vector< bool > position_settings_given
std::vector< std::vector< float > > home_settings
std::shared_ptr< driver_svh::SVHFingerManager > m_finger_manager
Handle to the SVH finger manager for library access.
ros::ServiceServer m_home_service_all
void connectCallback(const std_msgs::Empty &)
Callback function for connecting to SCHUNK five finger hand.
std::vector< bool > current_settings_given
std::vector< std::vector< float > > position_settings
bool homeNodesChannelIds(schunk_svh_msgs::HomeWithChannelsRequest &req, schunk_svh_msgs::HomeWithChannelsResponse &resp)
std::string m_name_prefix
std::string resolveName(const std::string &name, bool remap=true) const
#define ROS_WARN_STREAM(args)
float setChannelForceLimit(size_t channel, float force_limit)
bool setAllForceLimits(schunk_svh_msgs::SetAllChannelForceLimits::Request &req, schunk_svh_msgs::SetAllChannelForceLimits::Response &res)
bool homeAllNodes(schunk_svh_msgs::HomeAllRequest &req, schunk_svh_msgs::HomeAllResponse &resp)
bool setForceLimitById(schunk_svh_msgs::SetChannelForceLimit::Request &req, schunk_svh_msgs::SetChannelForceLimit::Response &res)
void setRosControlEnable(bool enable)
function to set the ros-control-loop enabling flag from the diagnostics class
void initControllerParameters(const uint16_t manual_major_version, const uint16_t manual_minor_version)
Subscriber subscribe(const std::string &topic, uint32_t queue_size, const boost::function< void(C)> &callback, const VoidConstPtr &tracked_object=VoidConstPtr(), const TransportHints &transport_hints=TransportHints())
Class to read parameter file and set the correct hardware parameters.
const Settings & getSettings() const
std::string m_serial_device_name
Serial device to use for communication with hardware.
void setupROSLogHandler(LogLevel level=LogLevel::INFO)
T param(const std::string ¶m_name, const T &default_val) const
std::vector< std::vector< float > > current_settings
bool connect()
load parameters and try connecting
ros::Subscriber connect_sub
int m_firmware_minor_version
SVHWrapper(const ros::NodeHandle &nh)
ros::ServiceServer m_setForceLimitById_srv
int m_connect_retry_count
schunk_svh_driver
Author(s): Georg Heppner
, Felix Exner , Pascal Becker , Johannes Mangler
autogenerated on Sat Apr 15 2023 02:24:55