force_torque_sensor_sim.cpp
Go to the documentation of this file.
2 
4 
5 using namespace force_torque_sensor;
6 
8 {
9  std::cout<<"ForceTorqueSensorSim"<<std::endl;
10 }
11 
12 ForceTorqueSensorSim::ForceTorqueSensorSim(int type, std::string path, int baudrate, int base_identifier)
13 {
14  std::cout<<"ForceTorqueSensorSim"<<std::endl;
15 }
16 
18  ros::NodeHandle nh_("~");
20 }
21 
22 bool ForceTorqueSensorSim::initCommunication(int type, std::string path, int baudrate, int base_identifier) {
23  std::cout<<"ForceTorqueSensorSim"<<std::endl;
24 }
25 
26 void ForceTorqueSensorSim::subscribeData(const geometry_msgs::Twist::ConstPtr& msg){
27  joystick_data.wrench.force.x = msg->linear.x;
28  joystick_data.wrench.force.y = msg->linear.y;
29  joystick_data.wrench.force.z = msg->linear.z;
30  joystick_data.wrench.torque.x = msg->angular.x;
31  joystick_data.wrench.torque.y = msg->angular.y;
32  joystick_data.wrench.torque.z = msg->angular.z;
33 }
34 
35 bool ForceTorqueSensorSim::readFTData(int statusCode, double& Fx, double& Fy, double& Fz, double& Tx, double& Ty, double& Tz) {
36 
37  Fx = joystick_data.wrench.force.x;
38  Fy = joystick_data.wrench.force.y;
39  Fz = joystick_data.wrench.force.z;
40  Tx = joystick_data.wrench.torque.x;
41  Ty = joystick_data.wrench.torque.y;
42  Tz = joystick_data.wrench.torque.z;
43 
44  return true;
45 }
46 
47 bool ForceTorqueSensorSim::readDiagnosticADCVoltages(int index, short int& value){
48  std::cout<<"ForceTorqueSensorSim"<<std::endl;
49 }
50 
bool readDiagnosticADCVoltages(int index, short int &value)
bool readFTData(int statusCode, double &Fx, double &Fy, double &Fz, double &Tx, double &Ty, double &Tz)
bool initCommunication(int type, std::string path, int baudrate, int base_identifier)
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
void subscribeData(const geometry_msgs::Twist::ConstPtr &msg)
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)


force_torque_sensor
Author(s):
autogenerated on Fri Sep 18 2020 03:06:30