Message handler that relays joint positions (converts simple message types to ROS message types and publishes them) More...
#include <joint_feedback_ex_relay_handler.h>
Public Member Functions | |
virtual bool | init (SmplMsgConnection *connection, std::vector< std::string > &joint_names) |
Class initializer. More... | |
virtual bool | init (SmplMsgConnection *connection, std::map< int, RobotGroup > &robot_groups) |
Class initializer. More... | |
JointFeedbackExRelayHandler (int groups_number=-1) | |
Constructor. More... | |
Public Member Functions inherited from industrial_robot_client::joint_relay_handler::JointRelayHandler | |
bool | init (industrial::smpl_msg_connection::SmplMsgConnection *connection, std::vector< std::string > &joint_names) |
JointRelayHandler () | |
JointRelayHandler () | |
Constructor. More... | |
Protected Member Functions | |
virtual bool | convert_message (JointFeedbackMessage &msg_in, DynamicJointsGroup *joint_state, int robot_id) |
Convert joint message into intermediate message-type. More... | |
bool | create_messages (SimpleMessage &msg_in, control_msgs::FollowJointTrajectoryFeedback *control_state, sensor_msgs::JointState *sensor_state) |
Convert joint message into publish message-types. More... | |
bool | create_messages (JointFeedbackMessage &msg_in, control_msgs::FollowJointTrajectoryFeedback *control_state, sensor_msgs::JointState *sensor_state, int robot_id) |
Protected Member Functions inherited from industrial_robot_client::joint_relay_handler::JointRelayHandler | |
virtual bool | convert_message (SimpleMessage &msg_in, DynamicJointsGroup *joint_state, int robot_id) |
Convert joint message into intermediate message-type. More... | |
virtual bool | convert_message (SimpleMessage &msg_in, JointTrajectoryPoint *joint_state) |
Convert joint message into intermediate message-type. More... | |
virtual bool | create_messages (JointMessage &msg_in, control_msgs::FollowJointTrajectoryFeedback *control_state, sensor_msgs::JointState *sensor_state) |
virtual bool | create_messages (SimpleMessage &msg_in, control_msgs::FollowJointTrajectoryFeedback *control_state, sensor_msgs::JointState *sensor_state, int robot_id) |
Convert joint message into publish message-types. More... | |
virtual bool | init (industrial::smpl_msg_connection::SmplMsgConnection *connection, int msg_type, std::vector< std::string > &joint_names) |
Class initializer. More... | |
virtual bool | init (industrial::smpl_msg_connection::SmplMsgConnection *connection, int msg_type, std::map< int, RobotGroup > &robot_groups) |
Class initializer. More... | |
bool | internalCB (JointMessage &in) |
bool | internalCB (SimpleMessage &in) |
Callback executed upon receiving a joint message. More... | |
virtual bool | select (const std::vector< double > &all_joint_pos, const std::vector< std::string > &all_joint_names, std::vector< double > *pub_joint_pos, std::vector< std::string > *pub_joint_names) |
virtual bool | select (const JointTrajectoryPoint &all_joint_state, const std::vector< std::string > &all_joint_names, JointTrajectoryPoint *pub_joint_state, std::vector< std::string > *pub_joint_names) |
Select specific joints for publishing. More... | |
virtual bool | select (const DynamicJointsGroup &all_joint_state, const std::vector< std::string > &all_joint_names, DynamicJointsGroup *pub_joint_state, std::vector< std::string > *pub_joint_names) |
virtual bool | transform (const std::vector< double > &pos_in, std::vector< double > *pos_out) |
virtual bool | transform (const JointTrajectoryPoint &state_in, JointTrajectoryPoint *state_out) |
Transform joint state before publishing. Can be overridden to implement, e.g. robot-specific joint coupling. More... | |
virtual bool | transform (const DynamicJointsGroup &state_in, DynamicJointsGroup *state_out) |
Transform joint state before publishing. Can be overridden to implement, e.g. robot-specific joint coupling. More... | |
Protected Attributes | |
ros::Publisher | dynamic_pub_joint_control_state_ |
int | groups_number_ |
ros::Publisher | pub_joint_control_state_ |
ros::Publisher | pub_joint_sensor_state_ |
bool | version_0_ |
Protected Attributes inherited from industrial_robot_client::joint_relay_handler::JointRelayHandler | |
std::vector< std::string > | all_joint_names_ |
ros::NodeHandle | node_ |
std::map< int, ros::Publisher > | pub_controls_ |
ros::Publisher | pub_joint_control_state_ |
ros::Publisher | pub_joint_sensor_state_ |
std::map< int, ros::Publisher > | pub_states_ |
std::map< int, RobotGroup > | robot_groups_ |
Private Member Functions | |
bool | convert_message (JointFeedbackExMessage &msg_in, DynamicJointsGroup *joint_state, int robot_id) |
Convert joint feedback message into intermediate message-type. More... | |
Static Private Member Functions | |
static bool | JointDataToVector (const industrial::joint_data::JointData &joints, std::vector< double > &vec, int len) |
Private Attributes | |
industrial::shared_types::shared_int | valid_fields_from_message_ |
bit-mask of (optional) fields that have been initialized with valid data More... | |
Additional Inherited Members | |
Public Types inherited from industrial_robot_client::joint_relay_handler::JointRelayHandler | |
typedef std::map< int, RobotGroup >::iterator | it_type |
Message handler that relays joint positions (converts simple message types to ROS message types and publishes them)
THIS CLASS IS NOT THREAD-SAFE
Definition at line 68 of file joint_feedback_ex_relay_handler.h.
|
inlineexplicit |
Constructor.
Definition at line 74 of file joint_feedback_ex_relay_handler.h.
|
protectedvirtual |
Convert joint message into intermediate message-type.
[in] | msg_in | Message from robot connection |
[out] | joint_state | JointTrajectoryPt message for intermediate processing |
Definition at line 168 of file joint_feedback_ex_relay_handler.cpp.
|
private |
Convert joint feedback message into intermediate message-type.
[in] | msg_in | JointFeedbackMessage from robot connection |
[out] | joint_state | JointTrajectoryPt message for intermediate processing |
|
protectedvirtual |
Convert joint message into publish message-types.
[in] | msg_in | Message from robot connection |
[out] | control_state | FollowJointTrajectoryFeedback message for ROS publishing |
[out] | sensor_state | JointState message for ROS publishing |
Reimplemented from industrial_robot_client::joint_relay_handler::JointRelayHandler.
Definition at line 85 of file joint_feedback_ex_relay_handler.cpp.
|
protected |
Definition at line 118 of file joint_feedback_ex_relay_handler.cpp.
|
virtual |
Class initializer.
connection | simple message connection that will be used to send replies. |
joint_names | list of joint-names for msg-publishing.
|
Reimplemented from industrial_robot_client::joint_relay_handler::JointRelayHandler.
Definition at line 72 of file joint_feedback_ex_relay_handler.cpp.
|
virtual |
Class initializer.
connection | simple message connection that will be used to send replies. |
joint_names | list of joint-names for msg-publishing.
|
Reimplemented from industrial_robot_client::joint_relay_handler::JointRelayHandler.
Definition at line 51 of file joint_feedback_ex_relay_handler.cpp.
|
staticprivate |
Definition at line 243 of file joint_feedback_ex_relay_handler.cpp.
|
protected |
Definition at line 98 of file joint_feedback_ex_relay_handler.h.
|
protected |
Definition at line 94 of file joint_feedback_ex_relay_handler.h.
|
protected |
Definition at line 97 of file joint_feedback_ex_relay_handler.h.
|
protected |
Definition at line 99 of file joint_feedback_ex_relay_handler.h.
|
private |
bit-mask of (optional) fields that have been initialized with valid data
Definition at line 130 of file joint_feedback_ex_relay_handler.h.
|
protected |
Definition at line 95 of file joint_feedback_ex_relay_handler.h.