|
nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
|
#include <server.hpp>
Public Types | |
| using | ConstSharedPtr = detail::Refused<ServerGoalHandle> |
| using | Feedback = typename A::Feedback |
| using | Goal = typename A::Goal |
| using | Result = typename A::Result |
| using | SharedPtr = detail::Refused<ServerGoalHandle> |
Public Member Functions | |
| void | execute () |
| const GoalUUID & | get_goal_id () const |
| The goal's id. | |
| bool | is_active () const |
| The goal has not reached a terminal state. | |
| bool | is_canceling () const |
| The goal is CANCELING: a cancel request for it was accepted. | |
| bool | is_executing () const |
| The goal is EXECUTING. | |
| ServerGoalHandle (Server< A > *server, const GoalUUID &uuid) | |
Friends | |
| struct | detail::ServerUpstream< A > |
rclcpp_action::ServerGoalHandle<A> — issue 2015, upstream's per-goal handle on a HOSTED build.
A token over (server, goal id), plus the goal message the goal callback was handed: every call forwards to the server keyed by the id, and the goal's state stays in the server's static arena (RFC-0019). Obtained only as the std::shared_ptr upstream's handle_cancel / handle_accepted receive; a freestanding build has no allocator for it, so SharedPtr is refused there and the goal-id-keyed Server<A> calls are the form.
Envelope: the handle names its server by address, so the server must not move while a handle is in use (it lives in a SharedPtr, which does not move it). Called from the executor's own task only — a goal handle used from a thread the application started races the executor (RFC-0002: no hidden threads, and no lock on a one-level image); run the goal from the accepted callback, or from a timer.
| using rclcpp_action::ServerGoalHandle< A >::ConstSharedPtr = detail::Refused<ServerGoalHandle> |
| using rclcpp_action::ServerGoalHandle< A >::Feedback = typename A::Feedback |
| using rclcpp_action::ServerGoalHandle< A >::Goal = typename A::Goal |
| using rclcpp_action::ServerGoalHandle< A >::Result = typename A::Result |
| using rclcpp_action::ServerGoalHandle< A >::SharedPtr = detail::Refused<ServerGoalHandle> |
|
inline |
|
inline |
Start EXECUTING this goal — issue 2027, upstream's execute(): ACCEPTED -> EXECUTING, publishing the status array. How a goal accepted with GoalResponse::ACCEPT_AND_DEFER starts (create_server already does it for ACCEPT_AND_EXECUTE, before handle_accepted). Upstream raises for a goal that is not ACCEPTED; this changes nothing then. Server<A>::execute(goal_id) reports which case it was.
|
inline |
The goal's id.
|
inline |
The goal has not reached a terminal state.
|
inline |
The goal is CANCELING: a cancel request for it was accepted.
|
inline |
The goal is EXECUTING.
|
friend |