6#include <move_base_z_client_plugin/components/move_base_z_plugin/components/odom_tracker/odom_tracker.h>
7#include <odom_tracker/OdomTrackerAction.h>
8#include <actionlib/server/simple_action_server.h>
11typedef actionlib::SimpleActionServer<odom_tracker::OdomTrackerAction>
Server;
13using namespace odom_tracker;
19 std::shared_ptr<Server>
as_;
32 void execute(
const OdomTrackerGoalConstPtr &goal)
36 switch (goal->command)
38 case OdomTrackerGoal::RECORD_PATH:
42 case OdomTrackerGoal::CLEAR_PATH:
46 case OdomTrackerGoal::IDLE:
50 case OdomTrackerGoal::START_BROADCAST_PATH:
54 case OdomTrackerGoal::STOP_BROADCAST_PATH:
58 case OdomTrackerGoal::PUSH_PATH:
62 case OdomTrackerGoal::POP_PATH:
68 ROS_ERROR(
"Odom Tracker Node - Action Server execute error: incorrect command - %d", goal->command);
75 catch (std::exception &ex)
77 ROS_ERROR(
"Odom Tracker Node - Action Server execute error: %s", ex.what());
90 ROS_INFO(
"Creating odom tracker action server");
93 ROS_INFO(
"Starting OdomTracker Action Server");
103 ros::init(argc, argv,
"odom_tracker_node");
std::shared_ptr< Server > as_
OdomTrackerActionServer()
void execute(const OdomTrackerGoalConstPtr &goal)
This class track the required distance of the cord based on the external localization system.
void popPath(int pathCount=1, bool keepPreviousPath=false)
void setPublishMessages(bool value)
void pushPath(std::string newPathTagName="")
void setWorkingMode(WorkingMode workingMode)
int main(int argc, char **argv)
actionlib::SimpleActionServer< odom_tracker::OdomTrackerAction > Server