C++ YASMIN (Yet Another State MachINe)
Loading...
Searching...
No Matches
get_parameters_state.hpp
Go to the documentation of this file.
1// Copyright (C) 2025 Miguel Ángel González Santamarta
2//
3// This program is free software: you can redistribute it and/or modify
4// it under the terms of the GNU General Public License as published by
5// the Free Software Foundation, either version 3 of the License, or
6// (at your option) any later version.
7//
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11// GNU General Public License for more details.
12// You should have received a copy of the GNU General Public License
13// along with this program. If not, see <https://www.gnu.org/licenses/>.
14
15#ifndef YASMIN_ROS__GET_PARAMETER_STATE_HPP
16#define YASMIN_ROS__GET_PARAMETER_STATE_HPP
17
18#include <any>
19#include <map>
20#include <string>
21
22#include "rclcpp/rclcpp.hpp"
24#include "yasmin/state.hpp"
27
28namespace yasmin_ros {
29
37public:
44 GetParametersState(const std::map<std::string, std::any> &parameters,
45 rclcpp::Node::SharedPtr node = nullptr);
46
53 std::string
54 execute(std::shared_ptr<yasmin::blackboard::Blackboard> blackboard) override;
55
56private:
59 std::map<std::string, std::any> parameters_;
61 rclcpp::Node::SharedPtr node_;
62};
63
64} // namespace yasmin_ros
65
66#endif // YASMIN_ROS__GET_PARAMETER_STATE_HPP
Represents a state in a state machine.
Definition state.hpp:53
std::map< std::string, std::any > parameters_
Definition get_parameters_state.hpp:59
std::string execute(std::shared_ptr< yasmin::blackboard::Blackboard > blackboard) override
Executes the state to retrieve parameters.
Definition get_parameters_state.cpp:36
rclcpp::Node::SharedPtr node_
Shared pointer to the ROS 2 node.
Definition get_parameters_state.hpp:61
GetParametersState(const std::map< std::string, std::any > &parameters, rclcpp::Node::SharedPtr node=nullptr)
Constructs a GetParametersState with a map of parameters.
Definition get_parameters_state.cpp:23
Definition action_state.hpp:37