robot_state_publisher.h
Go to the documentation of this file.
1 #ifndef DYNAMIC_ROBOT_STATE_PUBLISHER_ROBOT_STATE_PUBLISHER_H
2 #define DYNAMIC_ROBOT_STATE_PUBLISHER_ROBOT_STATE_PUBLISHER_H
3 
4 #include <robot_state_publisher/robot_state_publisher.h>
5 
6 namespace robot_state_publisher
7 {
12 #if ROS_VERSION_MINIMUM(1, 15, 0)
14 #else
15  // In Melodic, we cannot subclass RobotStatePublisher as there is no way to plug it in JointStateListener.
16 #endif
17 {
18 public:
21  const std::string DELETED_STATIC_TFS_FRAME = "__deleted_static_tfs__";
22 
23 #if ROS_VERSION_MINIMUM(1, 15, 0)
24 
27  explicit DynamicRobotStatePublisher(const KDL::Tree& tree, const urdf::Model& model = urdf::Model());
28 #else
29 
34 #endif
35 
40  virtual void updateTree(const KDL::Tree& tree);
41 
46  virtual size_t getNumMovingJoints() const;
47 
52  virtual size_t getNumFixedJoints() const;
53 
54 protected:
55 
56  std::map<std::string, SegmentPair>& getSegments();
57  std::map<std::string, SegmentPair>& getFixedSegments();
58 
59  const std::map<std::string, SegmentPair>& getSegments() const;
60  const std::map<std::string, SegmentPair>& getFixedSegments() const;
61 
63 
64 #if !ROS_VERSION_MINIMUM(1, 15, 0)
65  virtual void addChildren(const KDL::SegmentMap::const_iterator segment);
66 
69 #endif
70 };
71 }
72 
73 #endif //DYNAMIC_ROBOT_STATE_PUBLISHER_ROBOT_STATE_PUBLISHER_H
robot_state_publisher::DynamicRobotStatePublisher::publisher
RobotStatePublisher * publisher
The underlying (hacked) publisher.
Definition: robot_state_publisher.h:68
robot_state_publisher::DynamicRobotStatePublisher::DynamicRobotStatePublisher
DynamicRobotStatePublisher(RobotStatePublisher *publisher)
Create the publisher.
Definition: robot_state_publisher.cpp:65
robot_state_publisher::DynamicRobotStatePublisher::getNumFixedJoints
virtual size_t getNumFixedJoints() const
Return the number of fixed joints in the currently represented model.
Definition: robot_state_publisher.cpp:76
robot_state_publisher::RobotStatePublisher
urdf::Model
robot_state_publisher::DynamicRobotStatePublisher::addChildren
virtual void addChildren(const KDL::SegmentMap::const_iterator segment)
Definition: robot_state_publisher.cpp:127
robot_state_publisher::DynamicRobotStatePublisher
An alternative RobotStatePublisher with update option.
Definition: robot_state_publisher.h:11
tf2_ros::StaticTransformBroadcaster
robot_state_publisher::DynamicRobotStatePublisher::getStaticTfBroadcaster
tf2_ros::StaticTransformBroadcaster & getStaticTfBroadcaster()
Definition: robot_state_publisher.cpp:117
robot_state_publisher
robot_state_publisher::DynamicRobotStatePublisher::getSegments
std::map< std::string, SegmentPair > & getSegments()
Definition: robot_state_publisher.cpp:81
robot_state_publisher::DynamicRobotStatePublisher::DELETED_STATIC_TFS_FRAME
const std::string DELETED_STATIC_TFS_FRAME
The TF frame name of the virtual frame that's parent of all deleted static TF frames.
Definition: robot_state_publisher.h:21
robot_state_publisher::DynamicRobotStatePublisher::updateTree
virtual void updateTree(const KDL::Tree &tree)
Sets the robot model.
Definition: robot_state_publisher.cpp:25
robot_state_publisher::DynamicRobotStatePublisher::getNumMovingJoints
virtual size_t getNumMovingJoints() const
Return the number of moving joints in the currently represented model.
Definition: robot_state_publisher.cpp:71
robot_state_publisher::DynamicRobotStatePublisher::getFixedSegments
std::map< std::string, SegmentPair > & getFixedSegments()
Definition: robot_state_publisher.cpp:90


dynamic_robot_state_publisher
Author(s): Martin Pecka
autogenerated on Fri May 6 2022 02:34:15