3 #define protected public 4 #include <robot_state_publisher/robot_state_publisher.h> 11 if (!in.empty() && in[0] ==
'/')
34 old_segments_fixed.erase(seg.first);
38 old_segments_fixed.erase(seg.first);
41 std::vector<geometry_msgs::TransformStamped> deleteTfs;
42 for (
const auto& seg : old_segments_fixed)
44 geometry_msgs::TransformStamped
tf;
45 tf.child_frame_id =
stripSlash(seg.second.tip);
48 tf.transform.rotation.w = 1.0;
49 deleteTfs.push_back(tf);
std::string stripSlash(const std::string &in)
DynamicRobotStatePublisher(RobotStatePublisher *publisher)
Create the publisher.
virtual void addChildren(const KDL::SegmentMap::const_iterator segment)
RobotStatePublisher * publisher
The underlying (hacked) publisher.
std::map< std::string, SegmentPair > segments_fixed_
std::map< std::string, SegmentPair > segments_
tf2_ros::StaticTransformBroadcaster static_tf_broadcaster_
SegmentMap::const_iterator getRootSegment() const
virtual size_t getNumFixedJoints() const
Return the number of fixed joints in the currently represented model.
virtual void updateTree(const KDL::Tree &tree)
Sets the robot model.
const std::string DELETED_STATIC_TFS_FRAME
The TF frame name of the virtual frame that's parent of all deleted static TF frames.
virtual size_t getNumMovingJoints() const
Return the number of moving joints in the currently represented model.