EasyFleet
A simple-by-default framework for multi-robot, multi-capability fleets built on ROS 2
Loading...
Searching...
No Matches
manipulation_fake_capability.hpp
1// Copyright 2026 Intelligent Robotics Lab
2//
3// This file is part of the project EasyFleet
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#ifndef EASYFLEET_FAKE_COLLABORATION_DEPLOYMENT__MANIPULATION_FAKE_CAPABILITY_HPP_
17#define EASYFLEET_FAKE_COLLABORATION_DEPLOYMENT__MANIPULATION_FAKE_CAPABILITY_HPP_
18
19#include <string>
20
21#include "easyfleet_interfaces/action/manipulation.hpp"
22#include "rclcpp/rclcpp.hpp"
23#include "rclcpp_action/rclcpp_action.hpp"
24#include "rclcpp_lifecycle/lifecycle_node.hpp"
25
26#include "easyfleet_core/capability.hpp"
27#include "easyfleet_core/manipulation_action_server_base.hpp"
28
29namespace easyfleet_fake_collaboration_deployment
30{
31
33
43{
44public:
49 rclcpp_lifecycle::LifecycleNode & node,
50 const std::string & action_name);
51
52protected:
57 rclcpp_action::GoalResponse on_goal_received(
58 const rclcpp_action::GoalUUID & uuid,
59 std::shared_ptr<const Goal> goal) override;
60
65 void on_execute(const GoalHandleSharedPtr goal_handle) override;
66
67private:
68 double mock_execution_duration_s_;
69 double mock_feedback_period_s_;
70};
71
76 : public easyfleet_core::Capability<ManipulationFakeActionServer>
77{
78public:
81 explicit ManipulationFakeCapability(const rclcpp::NodeOptions & options = rclcpp::NodeOptions());
82};
83
84} // namespace easyfleet_fake_collaboration_deployment
85
86#endif // EASYFLEET_FAKE_COLLABORATION_DEPLOYMENT__MANIPULATION_FAKE_CAPABILITY_HPP_
std::shared_ptr< GoalHandle > GoalHandleSharedPtr
Definition action_server_base.hpp:79
Lifecycle node that advertises a single action as a "capability".
Definition capability.hpp:65
Fixes ActionServerBase's action type to easyfleet_interfaces/Manipulation, so a concrete manipulation...
Definition manipulation_action_server_base.hpp:32
ManipulationFakeActionServer(rclcpp_lifecycle::LifecycleNode &node, const std::string &action_name)
Constructs the action server.
Definition manipulation_fake_capability.cpp:44
void on_execute(const GoalHandleSharedPtr goal_handle) override
Simulates trajectory execution progress over mock_execution_duration_s_, publishing feedback every mo...
Definition manipulation_fake_capability.cpp:65
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).
Definition manipulation_fake_capability.cpp:55
ManipulationFakeCapability(const rclcpp::NodeOptions &options=rclcpp::NodeOptions())
Constructs the capability node.
Definition manipulation_fake_capability.cpp:110