SMACC
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
OdomTrackerActionServer Class Reference
Collaboration diagram for OdomTrackerActionServer:
Collaboration graph

Public Member Functions

 OdomTrackerActionServer ()
 
void execute (const OdomTrackerGoalConstPtr &goal)
 
void run ()
 

Public Attributes

std::shared_ptr< Serveras_
 
OdomTracker odomTracker
 

Detailed Description

Definition at line 16 of file odom_tracker_node.cpp.

Constructor & Destructor Documentation

◆ OdomTrackerActionServer()

OdomTrackerActionServer::OdomTrackerActionServer ( )
inline

Definition at line 22 of file odom_tracker_node.cpp.

23 : odomTracker("move_base")
24 {
25 }

Member Function Documentation

◆ execute()

void OdomTrackerActionServer::execute ( const OdomTrackerGoalConstPtr &  goal)
inline

execute()

Definition at line 32 of file odom_tracker_node.cpp.

33 {
34 try
35 {
36 switch (goal->command)
37 {
38 case OdomTrackerGoal::RECORD_PATH:
39 odomTracker.setWorkingMode(WorkingMode::RECORD_PATH);
40 break;
41
42 case OdomTrackerGoal::CLEAR_PATH:
43 odomTracker.setWorkingMode(WorkingMode::CLEAR_PATH);
44 break;
45
46 case OdomTrackerGoal::IDLE:
47 odomTracker.setWorkingMode(WorkingMode::IDLE);
48 break;
49
50 case OdomTrackerGoal::START_BROADCAST_PATH:
52 break;
53
54 case OdomTrackerGoal::STOP_BROADCAST_PATH:
56 break;
57
58 case OdomTrackerGoal::PUSH_PATH:
60 break;
61
62 case OdomTrackerGoal::POP_PATH:
64 break;
65
66 default:
67
68 ROS_ERROR("Odom Tracker Node - Action Server execute error: incorrect command - %d", goal->command);
69 as_->setAborted();
70 }
71
72 // never reach succeeded because were are interested in keeping the feedback alive
73 as_->setSucceeded();
74 }
75 catch (std::exception &ex)
76 {
77 ROS_ERROR("Odom Tracker Node - Action Server execute error: %s", ex.what());
78 as_->setAborted();
79 }
80 }
std::shared_ptr< Server > as_
void popPath(int pathCount=1, bool keepPreviousPath=false)
void pushPath(std::string newPathTagName="")
void setWorkingMode(WorkingMode workingMode)

References as_, odomTracker, cl_move_base_z::odom_tracker::OdomTracker::popPath(), cl_move_base_z::odom_tracker::OdomTracker::pushPath(), cl_move_base_z::odom_tracker::OdomTracker::setPublishMessages(), and cl_move_base_z::odom_tracker::OdomTracker::setWorkingMode().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

void OdomTrackerActionServer::run ( )
inline

run()

Definition at line 87 of file odom_tracker_node.cpp.

88 {
89 ros::NodeHandle n;
90 ROS_INFO("Creating odom tracker action server");
91
92 as_ = std::make_shared<Server>(n, "odom_tracker", boost::bind(&OdomTrackerActionServer::execute, this, _1), false);
93 ROS_INFO("Starting OdomTracker Action Server");
94
95 as_->start();
96
97 ros::spin();
98 }
void execute(const OdomTrackerGoalConstPtr &goal)

References as_, and execute().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ as_

std::shared_ptr<Server> OdomTrackerActionServer::as_

Definition at line 19 of file odom_tracker_node.cpp.

Referenced by execute(), and run().

◆ odomTracker

OdomTracker OdomTrackerActionServer::odomTracker

Definition at line 20 of file odom_tracker_node.cpp.

Referenced by execute().


The documentation for this class was generated from the following file: