EasyFleet
A simple-by-default framework for multi-robot, multi-capability fleets built on ROS 2
Loading...
Searching...
No Matches
ManipulationFakeActionServer Class Reference

Fake/mock implementation of the easyfleet_interfaces/Manipulation action. More...

#include <manipulation_fake_capability.hpp>

Inheritance diagram for ManipulationFakeActionServer:
ManipulationActionServerBase ActionServerBase< easyfleet_interfaces::action::Manipulation >

Public Member Functions

 ManipulationFakeActionServer (rclcpp_lifecycle::LifecycleNode &node, const std::string &action_name)
 Constructs the action server.
Public Member Functions inherited from ActionServerBase< easyfleet_interfaces::action::Manipulation >
 ActionServerBase (const ActionServerBase &)=delete
ActionServerBase & operator= (const ActionServerBase &)=delete
const std::string & get_action_name () const noexcept
 Fully-qualified name of the action served by this instance.
bool is_active () const
 Whether a goal is currently executing.
bool is_preemptable () const noexcept
 Current value of the "allow_preemption" parameter for this action.

Protected Member Functions

rclcpp_action::GoalResponse on_goal_received (const rclcpp_action::GoalUUID &uuid, std::shared_ptr< const Goal > goal) override
 Always accepts (this mock never rejects a goal).
void on_execute (const GoalHandleSharedPtr goal_handle) override
 Simulates trajectory execution progress over mock_execution_duration_s_, publishing feedback every mock_feedback_period_s_.
Protected Member Functions inherited from ActionServerBase< easyfleet_interfaces::action::Manipulation >
virtual rclcpp_action::GoalResponse on_goal_received (const rclcpp_action::GoalUUID &uuid, std::shared_ptr< const Goal > goal)=0
 Validate an incoming goal.
virtual void on_execute (const GoalHandleSharedPtr goal_handle)=0
 Run an accepted goal to completion.
virtual rclcpp_action::CancelResponse on_cancel_requested (const GoalHandleSharedPtr goal_handle)
 Decide whether a cancel request (via the action's cancel service) should be accepted.
virtual void on_preempted (const GoalHandleSharedPtr &preempted_goal_handle)
 Optional hook invoked (from the accepting thread, not the worker thread) when a new goal is about to preempt the currently running one.
bool is_preempt_requested () const noexcept
 Whether a newer goal has been accepted and is waiting to replace the one currently executing.
bool is_shutdown_requested () const noexcept
 Whether this object is being destroyed.
rclcpp::Logger logger () const
 Logger of the node hosting this action server.

Additional Inherited Members

Public Types inherited from ActionServerBase< easyfleet_interfaces::action::Manipulation >
using ActionType
 The wrapped rclcpp_action action type.
using Goal
 Goal type of the wrapped action.
using Feedback
 Feedback type of the wrapped action.
using Result
 Result type of the wrapped action.
using GoalHandle
 rclcpp_action server-side goal handle type of the wrapped action.
using GoalHandleSharedPtr
 Shared pointer to a GoalHandle.
using SharedPtr
 Shared pointer to an ActionServerBase<ActionT>.

Detailed Description

Fake/mock implementation of the easyfleet_interfaces/Manipulation action.

A reference implementation of easyfleet_core::ManipulationActionServerBase: it does not drive a real manipulator or interact with real controllers. It simulates trajectory execution progress over a configurable duration, publishing feedback at a configurable rate, so that the rest of a multi-capability system can be integrated and tested before a real manipulator stack is wired in through its own ManipulationActionServerBase subclass.

Duplicated (not shared) from easyfleet_fake_collaboration_deployment's own copy of this same reference implementation, matching this project's established convention of keeping each deployment package self-contained rather than introducing a cross-deployment dependency for a mock.

Constructor & Destructor Documentation

◆ ManipulationFakeActionServer()

ManipulationFakeActionServer ( rclcpp_lifecycle::LifecycleNode & node,
const std::string & action_name )

Constructs the action server.

Parameters
nodeLifecycle node that will host this action server.
action_nameName under which the action is advertised.

Member Function Documentation

◆ on_execute()

void on_execute ( const GoalHandleSharedPtr goal_handle)
overrideprotected

Simulates trajectory execution progress over mock_execution_duration_s_, publishing feedback every mock_feedback_period_s_.

Parameters
goal_handleHandle of the accepted goal to run to completion.

◆ on_goal_received()

rclcpp_action::GoalResponse on_goal_received ( const rclcpp_action::GoalUUID & uuid,
std::shared_ptr< const Goal > goal )
overrideprotected

Always accepts (this mock never rejects a goal).

Parameters
uuidId of the incoming goal.
goalGoal content (unused).
Returns
Always ACCEPT_AND_EXECUTE.

The documentation for this class was generated from the following files:
  • easyfleet_example_deployments/easyfleet_easynav_collaboration_simple_api_deployment/include/easyfleet_easynav_collaboration_simple_api_deployment/manipulation_fake_capability.hpp
  • easyfleet_example_deployments/easyfleet_easynav_collaboration_simple_api_deployment/src/easyfleet_easynav_collaboration_simple_api_deployment/manipulation_fake_capability.cpp