22 #ifndef _PLUGINS_ROS_LASERSCAN_THREAD_H_
23 #define _PLUGINS_ROS_LASERSCAN_THREAD_H_
25 #include <aspect/blackboard.h>
26 #include <aspect/blocked_timing.h>
27 #include <aspect/configurable.h>
28 #include <aspect/logging.h>
29 #include <blackboard/interface_listener.h>
30 #include <blackboard/interface_observer.h>
31 #include <core/threading/mutex.h>
32 #include <core/threading/thread.h>
33 #include <interfaces/Laser1080Interface.h>
34 #include <interfaces/Laser360Interface.h>
35 #include <interfaces/Laser720Interface.h>
36 #include <plugins/ros/aspect/ros.h>
37 #include <ros/node_handle.h>
38 #include <sensor_msgs/LaserScan.h>
39 #include <utils/time/time.h>
67 unsigned int instance_serial)
throw();
69 unsigned int instance_serial)
throw();
72 void laser_scan_message_cb(
const ros::MessageEvent<sensor_msgs::LaserScan const> &msg_evt);
74 std::string topic_name(
const char *if_id,
const char *suffix);
85 std::list<fawkes::Laser360Interface *> ls360_ifs_;
86 std::list<fawkes::Laser720Interface *> ls720_ifs_;
87 std::list<fawkes::Laser1080Interface *> ls1080_ifs_;
89 ros::Subscriber sub_ls_;
95 sensor_msgs::LaserScan msg;
98 std::map<std::string, PublisherInfo> pubs_;
101 unsigned int active_queue_;
102 std::queue<ros::MessageEvent<sensor_msgs::LaserScan const>> ls_msg_queues_[2];
104 std::map<std::string, fawkes::Laser360Interface *> ls360_wifs_;
107 unsigned int seq_num_;
Thread to exchange point clouds between Fawkes and ROS.
virtual void finalize()
Finalize the thread.
virtual void bb_interface_created(const char *type, const char *id)
BlackBoard interface created notification.
virtual void loop()
Code to execute in the thread.
virtual void run()
Stub to see name in backtrace for easier debugging.
virtual void bb_interface_data_changed(fawkes::Interface *interface)
BlackBoard data changed notification.
virtual ~RosLaserScanThread()
Destructor.
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.
virtual void init()
Initialize the thread.
RosLaserScanThread()
Constructor.
Thread aspect to access to BlackBoard.
BlackBoard interface listener.
BlackBoard interface observer.
Thread aspect to use blocked timing.
Thread aspect to access configuration data.
Base class for all Fawkes BlackBoard interfaces.
Thread aspect to log output.
Mutex mutual exclusion lock.
Thread aspect to get access to a ROS node handle.
Thread class encapsulation of pthreads.