22 #ifndef _ROS_NAVIGATOR_THREAD_H_ 23 #define _ROS_NAVIGATOR_THREAD_H_ 25 #include <actionlib/client/simple_action_client.h> 26 #include <aspect/blackboard.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 <core/threading/thread.h> 33 #include <dynamic_reconfigure/Config.h> 34 #include <dynamic_reconfigure/DoubleParameter.h> 35 #include <dynamic_reconfigure/Reconfigure.h> 36 #include <interfaces/NavigatorInterface.h> 37 #include <move_base_msgs/MoveBaseAction.h> 38 #include <move_base_msgs/MoveBaseActionGoal.h> 39 #include <move_base_msgs/MoveBaseGoal.h> 40 #include <plugins/ros/aspect/ros.h> 43 #include <utils/math/angle.h> 48 class NavigatorInterface;
80 bool set_dynreconf_value(
const std::string &path,
const float value);
83 typedef actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction> MoveBaseClient;
86 void feedbackCb(
const move_base_msgs::MoveBaseFeedbackConstPtr &feedback);
87 void doneCb(
const actionlib::SimpleClientGoalState & state,
88 const move_base_msgs::MoveBaseResultConstPtr &result);
90 void transform_to_fixed_frame();
94 move_base_msgs::MoveBaseGoal goal_;
96 bool connected_history_;
100 std::string cfg_prefix_;
103 dynamic_reconfigure::ReconfigureRequest dynreconf_srv_req;
104 dynamic_reconfigure::ReconfigureResponse dynreconf_srv_resp;
105 dynamic_reconfigure::DoubleParameter dynreconf_double_param;
106 dynamic_reconfigure::Config dynreconf_conf;
108 std::string cfg_dynreconf_path_;
109 std::string cfg_dynreconf_trans_vel_name_;
110 std::string cfg_dynreconf_rot_vel_name_;
112 std::string cfg_fixed_frame_;
113 float cfg_ori_tolerance_;
114 float cfg_trans_tolerance_;
119 geometry_msgs::PoseStamped base_position;
120 float goal_position_x;
121 float goal_position_y;
122 float goal_position_yaw;
virtual void finalize()
Finalize the thread.
Thread aspect to access to BlackBoard.
Thread aspect that allows to obtain the current time from the clock.
Thread aspect to get access to a ROS node handle.
Fawkes library namespace.
A class for handling time.
Send Fawkes locomotion commands off to ROS.
Thread class encapsulation of pthreads.
virtual void run()
Stub to see name in backtrace for easier debugging.
Thread aspect to use blocked timing.
virtual void init()
Initialize the thread.
virtual void loop()
Code to execute in the thread.
Thread aspect to log output.
Thread aspect to access configuration data.
RosNavigatorThread(std::string &cfg_prefix)
Constructor.
NavigatorInterface Fawkes BlackBoard Interface.