25 #ifndef SR_EDC_ETHERCAT_DRIVERS_SR_EDC_MUSCLE_H 26 #define SR_EDC_ETHERCAT_DRIVERS_SR_EDC_MUSCLE_H 28 #include <ros_ethercat_hardware/ethercat_hardware.h> 31 #include <std_msgs/Int16.h> 32 #include <std_msgs/Float64MultiArray.h> 33 #include <sr_robot_msgs/SimpleMotorFlasher.h> 36 #include <boost/smart_ptr.hpp> 39 #include <boost/assign.hpp> 40 #include <boost/algorithm/string.hpp> 41 #include <boost/algorithm/string/find_iterator.hpp> 45 #include <sr_robot_msgs/EthercatDebug.h> 60 virtual void construct(EtherCAT_SlaveHandler *sh,
int &start_address);
62 virtual int initialize(hardware_interface::HardwareInterface *hw,
bool allow_unprogrammed =
true);
64 virtual void multiDiagnostics(vector<diagnostic_msgs::DiagnosticStatus> &vec,
unsigned char *buffer);
66 virtual void packCommand(
unsigned char *buffer,
bool halt,
bool reset);
68 virtual bool unpackState(
unsigned char *this_buffer,
unsigned char *prev_buffer);
117 #endif // SR_EDC_ETHERCAT_DRIVERS_SR_EDC_MUSCLE_H
boost::shared_ptr< realtime_tools::RealtimePublisher< sr_robot_msgs::EthercatDebug > > debug_publisher
Debug real time publisher: publishes the raw ethercat data.
realtime_tools::RealtimePublisher< std_msgs::Int16 > rt_pub_int16_t
virtual void reinitialize_boards()
This function will call the reinitialization function for the boards attached to the CAN bus...
virtual void get_board_id_and_can_bus(int board_id, int *can_bus, unsigned int *board_can_id)
virtual void construct(EtherCAT_SlaveHandler *sh, int &start_address)
Construct function, run at startup to set SyncManagers and FMMUs.
virtual void multiDiagnostics(vector< diagnostic_msgs::DiagnosticStatus > &vec, unsigned char *buffer)
This function gives some diagnostics data.
std::vector< boost::shared_ptr< rt_pub_int16_t > > realtime_pub_
This is a parent class for the ROS drivers for any Shadow Robot EtherCAT Dual CAN Slave...
virtual bool unpackState(unsigned char *this_buffer, unsigned char *prev_buffer)
This functions receives data from the EtherCAT bus.
virtual int initialize(hardware_interface::HardwareInterface *hw, bool allow_unprogrammed=true)
unsigned int zero_buffer_read
boost::shared_ptr< shadow_robot::SrMuscleHandLib< ETHERCAT_DATA_STRUCTURE_0300_PALM_EDC_STATUS, ETHERCAT_DATA_STRUCTURE_0300_PALM_EDC_COMMAND > > sr_hand_lib
boost::shared_ptr< realtime_tools::RealtimePublisher< std_msgs::Float64MultiArray > > extra_analog_inputs_publisher
Extra analog inputs real time publisher (+ accelerometer and gyroscope)
virtual void packCommand(unsigned char *buffer, bool halt, bool reset)
packs the commands before sending them to the EtherCAT bus
SrEdcMuscle()
Constructor of the SrEdcMuscle driver.