30 #ifndef SR_HAND_HAND_SR_ARTICULATED_ROBOT_H 31 #define SR_HAND_HAND_SR_ARTICULATED_ROBOT_H 40 #include "diagnostic_msgs/SelfTest.h" 43 #include <boost/smart_ptr.hpp> 44 #include <boost/thread/mutex.hpp> 45 #include <boost/noncopyable.hpp> 46 #include <boost/assign.hpp> 49 #include <sensor_msgs/JointState.h> 57 = boost::assign::map_list_of(
"Sensor PID last in", 0) \
58 (
"Sensor PID iState", 1) \
59 (
"Sensor PID last D", 2) \
60 (
"Sensor PID last out", 3) \
65 (
"Strain Gauge Offset 0", 8) \
66 (
"Strain Gauge Offset 1", 9) \
67 (
"Num setup Msgs received", 10) \
68 (
"Num sensor Msgs received", 11) \
69 (
"Sensor Val (motor set P)", 12) \
70 (
"Sensor Val (motor sensor)", 13) \
71 (
"H-Bridge Duty", 14) \
106 position(0.0), target(0.0), temperature(0.0), current(0.0), force(0.0), flags(
""), jointIndex(0), min(0.0),
107 max(90.0), isJointZero(0), publisher_index(0), last_pos_time(0.0), last_pos(0.0), velocity(0.0)
112 position(jd.position), target(jd.target), temperature(jd.temperature), current(jd.current), force(jd.force),
113 flags(jd.flags), jointIndex(jd.jointIndex), min(jd.min), max(jd.max), isJointZero(jd.isJointZero),
114 publisher_index(jd.publisher_index), last_pos_time(jd.last_pos_time), last_pos(jd.last_pos),
115 velocity(jd.velocity)
120 position(jd.position), target(jd.target), temperature(jd.temperature), current(jd.current), force(jd.force),
121 flags(jd.flags), jointIndex(jd.jointIndex), min(jd.min), max(jd.max), isJointZero(jd.isJointZero),
122 publisher_index(jd.publisher_index), last_pos_time(jd.last_pos_time), last_pos(jd.last_pos),
123 velocity(jd.velocity)
180 name(param.name), value(param.value)
185 name(param.name), value(param.value)
276 typedef std::map<std::string, JointData>
JointsMap;
286 virtual int16_t sendupdate(std::string joint_name,
double target) = 0;
293 virtual JointData getJointData(std::string joint_name) = 0;
299 virtual JointsMap getAllJointsData() = 0;
323 virtual int16_t setConfig(std::vector<std::string> myConfig) = 0;
331 virtual void getConfig(std::string joint_name) = 0;
337 virtual std::vector<DiagnosticData> getDiagnostics() = 0;
353 std::vector<ros::Publisher> gazebo_publishers;
366 #endif // SR_HAND_HAND_SR_ARTICULATED_ROBOT_H
std::string name
name of the parameter
JointControllerData(const JointControllerData &jcd)
uint64_t num_sensor_msgs_received
values read from the debug node.
Parameters(const Parameters ¶m)
std::string flags
a string containing flags: FORCE, TEMPERATURE, ... indicating the different cutouts / warning sent by...
std::string joint_name
the name of the joint
std::map< std::string, JointData > JointsMap
static const std::map< const std::string, const unsigned int > names_and_offsets
a map containing the names and offsets of the smart motor node
int target_sensor_num
the channel number of the target sensor
boost::shared_ptr< self_test::TestRunner > self_test
this is the handle for the self tests.
int position_sensor_num
the channel number of the position sensor
boost::mutex parameters_map_mutex
std::map< std::string, int > debug_values
the debug values
JointControllerData(JointControllerData &jcd)
JointsMap joints_map
A mapping between the joint names and the information regarding those joints.
JointData(const JointData &jd)
ParametersMap parameters_map
A mapping between the parameter names and their values.
This is a parent class for the different types of Shadowhand we can have. It makes it possible to swa...
std::string value
value of the parameter
double temperature
temperature value
boost::mutex joints_map_mutex
std::vector< Parameters > data
double current
current value
std::map< std::string, enum controller_parameters > ParametersMap
int16_t level
the level of alert: 0 = OK, 1 = WARNING, 2 = ERROR
boost::mutex controllers_map_mutex
double target
the actual value of the target
virtual ~SRArticulatedRobot()
Parameters(Parameters ¶m)
double position
the actual value of the position