32 using Goal =
typename ActionT::Goal;
33 using Feedback =
typename ActionT::Feedback;
34 using Result =
typename ActionT::Result;
35 using GoalHandle = rclcpp_action::ServerGoalHandle<ActionT>;
47 void setUp(std::shared_ptr<GoalHandle> goal_handle_ptr);
110 const rclcpp::Logger logger_;
111 std::shared_ptr<GoalHandle> goal_handle_ptr_;
112 const std::shared_ptr<Feedback> feedback_ptr_{std::make_shared<Feedback>()};
113 const std::shared_ptr<Result> result_ptr_{std::make_shared<Result>()};
void cancel()
Terminate the current goal and mark it as canceled.
std::shared_ptr< Feedback > getFeedbackPtr()
Access the internal action feedback buffer.
std::shared_ptr< GoalHandle > getGoalHandlePtr()
Get the goal handle managed by this ActionContext instance.
void publishFeedback()
Publish the feedback written to the internal buffer.
std::shared_ptr< Result > getResultPtr()
Access the internal action result buffer.
void setUp(std::shared_ptr< GoalHandle > goal_handle_ptr)
Initialize the action context using the current goal handle.
void invalidate()
Invalidate the goal handle managed by this ActionContext instance.
void succeed()
Terminate the current goal and mark it as succeeded.
ActionContext(rclcpp::Logger logger)
Constructor.
void abort()
Terminate the current goal and mark it as aborted.
bool isValid()
Check if this ActionContext is valid (e.g. is managing a valid action goal handle).