58 #ifndef __PLUGINS_ROBOTSTATEPUBLISHER_ROBOTSTATEPUBLISHER_THREAD_H_ 59 #define __PLUGINS_ROBOTSTATEPUBLISHER_ROBOTSTATEPUBLISHER_THREAD_H_ 61 #include <core/threading/thread.h> 62 #include <aspect/logging.h> 63 #include <aspect/blocked_timing.h> 64 #include <aspect/clock.h> 65 #include <aspect/tf.h> 66 #include <aspect/configurable.h> 67 #include <aspect/blackboard.h> 68 #include <blackboard/interface_listener.h> 69 #include <blackboard/interface_observer.h> 71 #include <interfaces/JointInterface.h> 73 #include <kdl/kdl.hpp> 74 #include <kdl/frames.hpp> 75 #include <kdl/segment.hpp> 76 #include <kdl/tree.hpp> 92 SegmentPair(
const KDL::Segment& p_segment,
const std::string& p_root,
const std::string& p_tip):
127 unsigned int instance_serial)
throw();
129 unsigned int instance_serial)
throw();
132 void publish_fixed_transforms();
134 void add_children(
const KDL::SegmentMap::const_iterator segment);
135 void transform_kdl_to_tf(
const KDL::Frame &k, fawkes::tf::Transform &t);
136 bool joint_is_in_model(
const char *
id);
141 std::map<std::string, SegmentPair> segments_, segments_fixed_;
143 std::string cfg_urdf_path_;
144 float cfg_postdate_to_future_;
146 std::list<fawkes::JointInterface *> ifs_;
Thread aspect to access to BlackBoard.
Thread aspect that allows to obtain the current time from the clock.
SegmentPair(const KDL::Segment &p_segment, const std::string &p_root, const std::string &p_tip)
Constructor.
KDL::Segment segment
The segment of the joint pair.
This class represents the segment between a parent and a child joint.
Thread class encapsulation of pthreads.
Base class for all Fawkes BlackBoard interfaces.
virtual void bb_interface_created(const char *type, const char *id)
BlackBoard interface created notification.
virtual void bb_interface_reader_removed(fawkes::Interface *interface, unsigned int instance_serial)
A reading instance has been closed for a watched interface.
Thread aspect to use blocked timing.
virtual void finalize()
Finalize the thread.
virtual void bb_interface_writer_removed(fawkes::Interface *interface, unsigned int instance_serial)
A writing instance has been closed for a watched interface.
virtual void loop()
Code to execute in the thread.
Thread aspect to log output.
Thread to publish the robot's transforms.
BlackBoard interface observer.
Thread aspect to access configuration data.
std::string tip
The name of the child joint.
std::string root
The name of the parent joint.
RobotStatePublisherThread()
Constructor.
virtual void init()
Initialize the thread.
virtual void bb_interface_data_changed(fawkes::Interface *interface)
BlackBoard data changed notification.
BlackBoard interface listener.