3 #include <move_base_msgs/MoveBaseAction.h> 4 #include <geometry_msgs/PoseWithCovarianceStamped.h> 5 #include <actionlib/client/simple_action_client.h> 7 #include <opencv2/opencv.hpp> 10 #include "mission_mode.h" 11 #include "point_mode.h" 12 #include "patrol_mode.h" 13 #include "shooting_mode.h" 16 #include <tf/transform_listener.h> 17 typedef actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction> MoveBaseClient;
33 void pos_callback(
const geometry_msgs::PoseWithCovarianceStamped::ConstPtr &pos);
34 void getCarPos(
const geometry_msgs::PoseWithCovarianceStamped::ConstPtr &pos);
39 void getCameraGoal(
const move_base_msgs::MoveBaseGoal::ConstPtr &msg);
45 double distance(
const geometry_msgs::PoseStamped& p1,
const geometry_msgs::PoseStamped& p2);
46 geometry_msgs::PoseStamped goalToGlobalFrame(
const geometry_msgs::PoseStamped &goal_pose_msg);
53 std::vector<move_base_msgs::MoveBaseGoal> patrol_list_;
55 tf::TransformListener &tf_;
56 move_base_msgs::MoveBaseGoal goal_;
57 geometry_msgs::PoseStamped old_enemy_global_goal_;
58 geometry_msgs::PoseStamped enemy_goal_;
59 geometry_msgs::PoseStamped enemy_global_goal_;
60 geometry_msgs::PoseStamped car_position;
61 ros::Subscriber send_goal_srv_;
62 ros::Subscriber sub_current_pos;
70 #endif // LOGICALCORE_H void stateMachine()
stateMachine the logical core of autocar.
Definition: point_mode.h:6
Definition: logical_core.h:26
Definition: patrol_mode.h:7
There are three missions of the autocar: point state, patrol state, shooting state. and the autocar also have three state: OBTAINED_GOAL_STATE, BUSY_STATE, IDLE_STATE.
Definition: mission_mode.h:9
void fillPatrolList()
You can set some points in file ./param_manager/autocar_params.xml first, this function will load the...
void getCameraGoal(const move_base_msgs::MoveBaseGoal::ConstPtr &msg)
The callback function of the camera_goal publishing by armor_detect node.
Definition: shooting_mode.h:6