24 #ifndef _PLUGINS_COLLI_COLLI_THREAD_H_ 25 #define _PLUGINS_COLLI_COLLI_THREAD_H_ 27 #include "common/types.h" 29 #include <aspect/blackboard.h> 30 #include <aspect/clock.h> 31 #include <aspect/configurable.h> 32 #include <aspect/logging.h> 33 #include <aspect/tf.h> 34 #include <core/threading/thread.h> 35 #include <utils/math/angle.h> 36 #include <utils/math/types.h> 37 #include <utils/time/clock.h> 44 class Laser360Interface;
45 class NavigatorInterface;
47 class LaserOccupancyGrid;
50 class SelectDriveMode;
51 class BaseMotorInstruct;
54 class ColliVisualizationThread;
108 ColliVisualizationThread *vis_thread_;
126 bool cfg_write_spam_debug_;
127 bool cfg_emergency_stop_enabled_;
128 float cfg_emergency_threshold_distance_;
129 float cfg_emergency_threshold_velocity_;
130 float cfg_emergency_velocity_max_;
141 float occ_grid_height_, occ_grid_width_;
142 int occ_grid_cell_height_, occ_grid_cell_width_;
144 bool cfg_obstacle_inc_;
150 float cfg_min_drive_dist_;
152 cfg_min_long_dist_drive_;
154 cfg_min_long_dist_prepos_;
155 float cfg_min_rot_dist_;
161 float cfg_max_velocity_;
163 std::string cfg_frame_base_;
164 std::string cfg_frame_laser_;
166 std::string cfg_iface_motor_;
167 std::string cfg_iface_laser_;
168 std::string cfg_iface_colli_;
170 cfg_iface_read_timeout_;
173 bool laser_to_base_valid_;
175 float distance_to_next_target_;
181 void colli_execute_();
187 void open_interfaces();
190 void initialize_modules();
193 void interfaces_read();
196 bool interface_data_valid();
199 void update_colli_state();
202 void update_modules();
Laser360Interface Fawkes BlackBoard Interface.
Thread aspect to access to BlackBoard.
Thread aspect that allows to obtain the current time from the clock.
ColliThread()
Constructor.
Cartesian coordinates (2D).
virtual void loop()
Code to execute in the thread.
Fawkes library namespace.
colli_motor_instruct_mode_t
Colli motor_instuct modes.
void colli_stop()
Sends a stop-command.
colli_state_t
Colli States.
Thread class encapsulation of pthreads.
virtual void set_vis_thread(ColliVisualizationThread *vis_thread)
Set the visualization thread.
Storing Translation and rotation.
virtual void finalize()
Finalize the thread.
Thread that performs the navigation and collision avoidance algorithms.
This OccGrid is derived by the Occupancy Grid originally from Andreas Strack, but modified for speed ...
void colli_relgoto(float x, float y, float ori, fawkes::NavigatorInterface *iface)
Sends a goto-command, using relative coordinates.
bool is_final() const
Checks if the colli is final.
Thread aspect to log output.
This class selects the correct drive mode and calls the appopriate drive component.
void colli_goto(float x, float y, float ori, fawkes::NavigatorInterface *iface)
Sends a goto-command, using global coordinates.
Thread aspect to access configuration data.
Point with cartesian coordinates as signed integers.
colli_escape_mode_t
Colli Escape modes.
The Basic of a Motorinstructor.
MotorInterface Fawkes BlackBoard Interface.
Mutex mutual exclusion lock.
virtual ~ColliThread()
Destructor.
Colli data, refering to current movement.
virtual void init()
Initialize the thread.
NavigatorInterface Fawkes BlackBoard Interface.