#include <generic_tactiles.hpp>
Public Member Functions | |
virtual void | add_diagnostics (std::vector< diagnostic_msgs::DiagnosticStatus > &vec, diagnostic_updater::DiagnosticStatusWrapper &d) |
GenericTactiles (std::vector< generic_updater::UpdateConfig > update_configs_vector, operation_mode::device_update_state::DeviceUpdateState update_state) | |
virtual std::vector < AllTactileData > * | get_tactile_data () |
virtual void | publish () |
bool | reset (std_srvs::Empty::Request &request, std_srvs::Empty::Response &response) |
virtual void | update (StatusType *status_data) |
~GenericTactiles () | |
Public Attributes | |
boost::shared_ptr < generic_updater::SensorUpdater < CommandType > > | sensor_updater |
boost::shared_ptr< std::vector < GenericTactileData > > | tactiles_vector |
the vector containing the data for the tactiles. | |
Static Public Attributes | |
static const unsigned int | nb_tactiles = 5 |
Number of tactile sensors (TODO: should probably be defined in the protocol) | |
Protected Member Functions | |
void | process_received_data_type (int32u data) |
std::string | sanitise_string (const char *raw_string, const unsigned int str_size) |
Protected Attributes | |
boost::shared_ptr< std::vector < AllTactileData > > | all_tactile_data |
std::vector< int32u > | initialization_received_data_vector |
Contains the received data types. | |
ros::NodeHandle | nodehandle_ |
ros::ServiceServer | reset_service_client_ |
Definition at line 56 of file generic_tactiles.hpp.
tactiles::GenericTactiles< StatusType, CommandType >::GenericTactiles | ( | std::vector< generic_updater::UpdateConfig > | update_configs_vector, |
operation_mode::device_update_state::DeviceUpdateState | update_state | ||
) |
Definition at line 43 of file generic_tactiles.cpp.
tactiles::GenericTactiles< StatusType, CommandType >::~GenericTactiles | ( | ) | [inline] |
Definition at line 60 of file generic_tactiles.hpp.
void tactiles::GenericTactiles< StatusType, CommandType >::add_diagnostics | ( | std::vector< diagnostic_msgs::DiagnosticStatus > & | vec, |
diagnostic_updater::DiagnosticStatusWrapper & | d | ||
) | [virtual] |
This function adds the diagnostics for the tactiles to the multi diagnostic status published by the hand.
Reimplemented in tactiles::UBI0< StatusType, CommandType >, tactiles::Biotac< StatusType, CommandType >, and tactiles::ShadowPSTs< StatusType, CommandType >.
Definition at line 159 of file generic_tactiles.cpp.
std::vector< AllTactileData > * tactiles::GenericTactiles< StatusType, CommandType >::get_tactile_data | ( | ) | [virtual] |
Reimplemented in tactiles::UBI0< StatusType, CommandType >, tactiles::Biotac< StatusType, CommandType >, and tactiles::ShadowPSTs< StatusType, CommandType >.
Definition at line 205 of file generic_tactiles.cpp.
void tactiles::GenericTactiles< StatusType, CommandType >::process_received_data_type | ( | int32u | data | ) | [protected] |
Definition at line 141 of file generic_tactiles.cpp.
void tactiles::GenericTactiles< StatusType, CommandType >::publish | ( | ) | [virtual] |
Publish the information to a ROS topic.
Reimplemented in tactiles::UBI0< StatusType, CommandType >, tactiles::Biotac< StatusType, CommandType >, and tactiles::ShadowPSTs< StatusType, CommandType >.
Definition at line 153 of file generic_tactiles.cpp.
bool tactiles::GenericTactiles< StatusType, CommandType >::reset | ( | std_srvs::Empty::Request & | request, |
std_srvs::Empty::Response & | response | ||
) |
Reset the tactile sensors.
request | empty |
response | empty |
Definition at line 174 of file generic_tactiles.cpp.
std::string tactiles::GenericTactiles< StatusType, CommandType >::sanitise_string | ( | const char * | raw_string, |
const unsigned int | str_size | ||
) | [protected] |
Sanitise a string coming from the palm. Make sure we're not outputting garbage in the diagnostics topic. The acceptable range for the char is [0x20 .. 0x7E]
raw_string | The incoming raw string |
str_size | The max size of the string |
Definition at line 183 of file generic_tactiles.cpp.
void tactiles::GenericTactiles< StatusType, CommandType >::update | ( | StatusType * | status_data | ) | [virtual] |
This function is called each time a new etherCAT message is received in the sr06.cpp driver. It updates the tactile sensors values contained in tactiles_vector.
status_data | the received etherCAT message |
Reimplemented in tactiles::UBI0< StatusType, CommandType >, tactiles::Biotac< StatusType, CommandType >, and tactiles::ShadowPSTs< StatusType, CommandType >.
Definition at line 63 of file generic_tactiles.cpp.
boost::shared_ptr<std::vector<AllTactileData> > tactiles::GenericTactiles< StatusType, CommandType >::all_tactile_data [protected] |
Definition at line 127 of file generic_tactiles.hpp.
std::vector<int32u> tactiles::GenericTactiles< StatusType, CommandType >::initialization_received_data_vector [protected] |
Contains the received data types.
Definition at line 113 of file generic_tactiles.hpp.
const unsigned int tactiles::GenericTactiles< StatusType, CommandType >::nb_tactiles = 5 [static] |
Number of tactile sensors (TODO: should probably be defined in the protocol)
Definition at line 96 of file generic_tactiles.hpp.
ros::NodeHandle tactiles::GenericTactiles< StatusType, CommandType >::nodehandle_ [protected] |
Definition at line 108 of file generic_tactiles.hpp.
ros::ServiceServer tactiles::GenericTactiles< StatusType, CommandType >::reset_service_client_ [protected] |
Definition at line 110 of file generic_tactiles.hpp.
boost::shared_ptr<generic_updater::SensorUpdater<CommandType> > tactiles::GenericTactiles< StatusType, CommandType >::sensor_updater |
Definition at line 98 of file generic_tactiles.hpp.
boost::shared_ptr< std::vector<GenericTactileData> > tactiles::GenericTactiles< StatusType, CommandType >::tactiles_vector |
the vector containing the data for the tactiles.
Reimplemented in tactiles::UBI0< StatusType, CommandType >, tactiles::Biotac< StatusType, CommandType >, and tactiles::ShadowPSTs< StatusType, CommandType >.
Definition at line 100 of file generic_tactiles.hpp.