21 #ifndef __PLUGINS_AMCL_MAP_LASERGEN_THREAD_H_ 22 #define __PLUGINS_AMCL_MAP_LASERGEN_THREAD_H_ 26 #include <core/threading/thread.h> 27 #include <aspect/blocked_timing.h> 28 #include <aspect/clock.h> 29 #include <aspect/configurable.h> 30 #include <aspect/logging.h> 31 #include <aspect/tf.h> 32 #include <aspect/blackboard.h> 34 #if __cplusplus > 201100L || defined(__GXX_EXPERIMENTAL_CXX0X__) 39 #include <interfaces/Laser360Interface.h> 40 #include <interfaces/Position3DInterface.h> 59 protected:
virtual void run() { Thread::run();}
62 bool set_laser_pose();
65 std::string cfg_map_file_;
66 float cfg_resolution_;
69 float cfg_origin_theta_;
70 float cfg_occupied_thresh_;
71 float cfg_free_thresh_;
72 bool cfg_send_zero_odom_;
73 bool cfg_use_current_pose_;
75 std::string cfg_laser_ifname_;
76 std::string cfg_pose_ifname_;
77 std::string laser_frame_id_;
78 std::string odom_frame_id_;
79 std::string base_frame_id_;
81 unsigned int map_width_;
82 unsigned int map_height_;
85 fawkes::tf::Transform latest_tf_;
93 float laser_pos_theta_;
97 float cfg_noise_sigma_;
99 std::mt19937 noise_rg_;
100 std::normal_distribution<float> noise_nd_;
Laser360Interface Fawkes BlackBoard Interface.
virtual void init()
Initialize the thread.
Thread aspect to access to BlackBoard.
Thread aspect that allows to obtain the current time from the clock.
virtual void run()
Stub to see name in backtrace for easier debugging.
Thread class encapsulation of pthreads.
Generate laser data from map and position.
Thread aspect to use blocked timing.
MapLaserGenThread()
Constructor.
Position3DInterface Fawkes BlackBoard Interface.
Thread aspect to log output.
virtual void loop()
Code to execute in the thread.
Thread aspect to access configuration data.
virtual ~MapLaserGenThread()
Destructor.
virtual void finalize()
Finalize the thread.