22 #ifndef __PLUGINS_ROS_LASERSCAN_THREAD_H_ 23 #define __PLUGINS_ROS_LASERSCAN_THREAD_H_ 25 #include <core/threading/thread.h> 26 #include <aspect/blocked_timing.h> 27 #include <aspect/configurable.h> 28 #include <aspect/logging.h> 29 #include <aspect/blackboard.h> 30 #include <plugins/ros/aspect/ros.h> 31 #include <blackboard/interface_listener.h> 32 #include <blackboard/interface_observer.h> 33 #include <interfaces/Laser360Interface.h> 34 #include <interfaces/Laser720Interface.h> 35 #include <interfaces/Laser1080Interface.h> 36 #include <core/threading/mutex.h> 37 #include <utils/time/time.h> 42 #include <ros/node_handle.h> 43 #include <sensor_msgs/LaserScan.h> 69 unsigned int instance_serial)
throw();
71 unsigned int instance_serial)
throw();
74 void laser_scan_message_cb(
const ros::MessageEvent<sensor_msgs::LaserScan const> &msg_evt);
76 std::string topic_name(
const char *if_id,
const char *suffix);
79 protected:
virtual void run() { Thread::run(); }
82 std::list<fawkes::Laser360Interface *> __ls360_ifs;
83 std::list<fawkes::Laser720Interface *> __ls720_ifs;
84 std::list<fawkes::Laser1080Interface *> __ls1080_ifs;
86 ros::Subscriber __sub_ls;
91 sensor_msgs::LaserScan msg;
94 std::map<std::string, PublisherInfo> __pubs;
97 unsigned int __active_queue;
98 std::queue<ros::MessageEvent<sensor_msgs::LaserScan const> > __ls_msg_queues[2];
100 std::map<std::string, fawkes::Laser360Interface *> __ls360_wifs;
103 unsigned int __seq_num;
virtual void bb_interface_data_changed(fawkes::Interface *interface)
BlackBoard data changed notification.
Thread aspect to access to BlackBoard.
Thread aspect to get access to a ROS node handle.
virtual void finalize()
Finalize the thread.
Thread class encapsulation of pthreads.
Base class for all Fawkes BlackBoard interfaces.
virtual void loop()
Code to execute in the thread.
Thread to exchange point clouds between Fawkes and ROS.
Thread aspect to use blocked timing.
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 bb_interface_reader_removed(fawkes::Interface *interface, unsigned int instance_serial)
A reading instance has been closed for a watched interface.
Thread aspect to log output.
BlackBoard interface observer.
Thread aspect to access configuration data.
virtual void run()
Stub to see name in backtrace for easier debugging.
virtual ~RosLaserScanThread()
Destructor.
virtual void init()
Initialize the thread.
RosLaserScanThread()
Constructor.
Mutex mutual exclusion lock.
BlackBoard interface listener.
virtual void bb_interface_created(const char *type, const char *id)
BlackBoard interface created notification.