controller_action.h
Go to the documentation of this file.
1 /*
2  * Copyright 2018, Magazino GmbH, Sebastian Pütz, Jorge Santos Simón
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above
12  * copyright notice, this list of conditions and the following
13  * disclaimer in the documentation and/or other materials provided
14  * with the distribution.
15  *
16  * 3. Neither the name of the copyright holder nor the names of its
17  * contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24  * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  *
33  * controller_action.h
34  *
35  * authors:
36  * Sebastian Pütz <spuetz@uni-osnabrueck.de>
37  * Jorge Santos Simón <santos@magazino.eu>
38  *
39  */
40 
41 #ifndef MBF_ABSTRACT_NAV__CONTROLLER_ACTION_H_
42 #define MBF_ABSTRACT_NAV__CONTROLLER_ACTION_H_
43 
48 #include <mbf_msgs/ExePathAction.h>
49 
50 namespace mbf_abstract_nav{
51 
53  public AbstractAction<mbf_msgs::ExePathAction, AbstractControllerExecution>
54 {
55  public:
56 
58 
59  ControllerAction(const std::string &name,
60  const RobotInformation &robot_info);
61 
68  void start(
69  GoalHandle &goal_handle,
70  typename AbstractControllerExecution::Ptr execution_ptr
71  );
72 
73  void run(GoalHandle &goal_handle, AbstractControllerExecution &execution);
74 
75 protected:
77  GoalHandle& goal_handle,
78  uint32_t outcome, const std::string &message,
79  const geometry_msgs::TwistStamped& current_twist);
80 
87  void fillExePathResult(
88  uint32_t outcome, const std::string &message,
89  mbf_msgs::ExePathResult &result);
90 
91  boost::mutex goal_mtx_;
92  geometry_msgs::PoseStamped robot_pose_;
93  geometry_msgs::PoseStamped goal_pose_;
94 
95 };
96 }
97 
98 
99 
100 #endif //MBF_ABSTRACT_NAV__CONTROLLER_ACTION_H_
void fillExePathResult(uint32_t outcome, const std::string &message, mbf_msgs::ExePathResult &result)
Utility method to fill the ExePath action result in a single line.
geometry_msgs::PoseStamped robot_pose_
Current robot pose.
void run(GoalHandle &goal_handle, AbstractControllerExecution &execution)
The AbstractControllerExecution class loads and binds the controller plugin. It contains a thread run...
geometry_msgs::PoseStamped goal_pose_
Current goal pose.
void start(GoalHandle &goal_handle, typename AbstractControllerExecution::Ptr execution_ptr)
Start controller action. Override abstract action version to allow updating current plan without stop...
void publishExePathFeedback(GoalHandle &goal_handle, uint32_t outcome, const std::string &message, const geometry_msgs::TwistStamped &current_twist)
ControllerAction(const std::string &name, const RobotInformation &robot_info)
boost::mutex goal_mtx_
lock goal handle for updating it while running
boost::shared_ptr< ControllerAction > Ptr


mbf_abstract_nav
Author(s): Sebastian Pütz
autogenerated on Tue Jun 18 2019 19:34:34