10 #ifndef ROS_ROBOT_STATE_PUBLISHER_HPP 11 #define ROS_ROBOT_STATE_PUBLISHER_HPP 16 #include <dynamic-graph/all-commands.h> 17 #include <dynamic-graph/all-signals.h> 18 #include <dynamic-graph/entity.h> 19 #include <dynamic-graph/factory.h> 20 #include <dynamic-graph/linear-algebra.h> 22 #include <realtime_tools/realtime_publisher.h> 24 #include <sensor_msgs/JointState.h> 25 #include <tf2_msgs/TFMessage.h> 35 typedef dynamicgraph::SignalTimeDependent<int, int>
SignalOUT;
39 typedef dynamicgraph::SignalPtr<dynamicgraph::Vector, int>
SignalIN;
48 typedef realtime_tools::RealtimePublisher<tf2_msgs::TFMessage>
TfRtPublisher;
53 typedef realtime_tools::RealtimePublisher<sensor_msgs::JointState>
58 std::shared_ptr<TfRtPublisher> base_tf_publisher_;
59 std::shared_ptr<JointStateRtPublisher> joint_state_publisher_;
60 std::shared_ptr<SignalIN> robot_state_input_signal_;
61 callback_t callback_function_;
84 void add(
const std::string& base_link_name,
85 const std::string& joint_names,
86 const std::string& tf_prefix,
87 const std::string& signal_name,
88 const std::string& joint_state_topic_name);
95 int& trigger(
int&,
int);
123 void set_tf_msg_to_identity(geometry_msgs::TransformStamped& msg);
130 void normalize_tf_msg_quaternion(geometry_msgs::TransformStamped& msg);
150 std::map<std::string, RosRobotStatePublisherInternal>
publishers_;
174 namespace ros_state_publish
176 using ::dynamicgraph::command::Command;
177 using ::dynamicgraph::command::Value;
184 #define ROS_PUBLISH_MAKE_COMMAND(CMD) \ 185 class CMD : public Command \ 188 CMD(dynamic_graph::RosRobotStatePublisher& entity, \ 189 const std::string& docstring); \ 190 virtual Value doExecute(); \ 196 #undef ROS_PUBLISH_MAKE_COMMAND 201 #endif // ROS_ROBOT_STATE_PUBLISHER_HPP SignalOUT trigger_signal_
Create an internal output signal which should be call periodically in the device in order to publish ...
Definition: ros_robot_state_publisher.hpp:137
boost::function< void(int)> callback_t
Simple shortcut for code writing convenience.
Definition: ros_robot_state_publisher.hpp:43
#define ROS_PUBLISH_MAKE_COMMAND(CMD)
Declare here a couple of python command used for the ros_state publisher.
Definition: ros_robot_state_publisher.hpp:184
ros::NodeHandle & ros_node_handle_
Ros node handle corresponding to the dynamic graph process node handle.
Definition: ros_robot_state_publisher.hpp:143
static const std::string CLASS_NAME
The class name used to identify it in the dynamic graph pool.
Definition: ros_robot_state_publisher.hpp:106
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > SignalIN
Simple shortcut for code writing convenience.
Definition: ros_robot_state_publisher.hpp:39
ros::Time last_time_of_publication_
Check at what time the publication was done.
Definition: ros_robot_state_publisher.hpp:160
ros::Duration rate_
manage the rate data publication in topics
Definition: ros_robot_state_publisher.hpp:155
realtime_tools::RealtimePublisher< sensor_msgs::JointState > JointStateRtPublisher
Renaming of the joint position publisher type.
Definition: ros_robot_state_publisher.hpp:54
std::map< std::string, RosRobotStatePublisherInternal > publishers_
This is the list of publishers registered for this class.
Definition: ros_robot_state_publisher.hpp:150
realtime_tools::RealtimePublisher< tf2_msgs::TFMessage > TfRtPublisher
Renaming of the tf publisher type.
Definition: ros_robot_state_publisher.hpp:48
This class define a dynamic graph wrapper around the vicon client.
Definition: ros_robot_state_publisher.hpp:67
this is this package namespace in order to avoid naming conflict
Definition: device.hh:22
virtual const std::string & getClassName(void) const
Get the CLASS_NAME object.
Definition: ros_robot_state_publisher.hpp:113
Definition: ros_robot_state_publisher.hpp:56
Definition of the command.
Definition: ros_robot_state_publisher.hpp:164
dynamicgraph::SignalTimeDependent< int, int > SignalOUT
Simple shortcut for code writing convenience.
Definition: ros_robot_state_publisher.hpp:35