C++ YASMIN (Yet Another State MachINe)
Loading...
Searching...
No Matches
yasmin_ros
include
yasmin_ros
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 <string>
20
#include <unordered_map>
21
22
#include "rclcpp/rclcpp.hpp"
23
#include "
yasmin/blackboard.hpp
"
24
#include "
yasmin/state.hpp
"
25
#include "
yasmin/types.hpp
"
26
#include "
yasmin_ros/basic_outcomes.hpp
"
27
#include "
yasmin_ros/yasmin_node.hpp
"
28
29
namespace
yasmin_ros
{
30
37
class
GetParametersState
:
public
yasmin::State
{
38
public
:
42
using
Parameters
= std::unordered_map<std::string, std::any>;
43
47
YASMIN_PTR_ALIASES
(
GetParametersState
)
48
49
55
GetParametersState
(
const
Parameters
¶meters,
56
rclcpp::Node::SharedPtr node =
nullptr
);
57
64
std::string
execute
(
yasmin::Blackboard::SharedPtr
blackboard)
override
;
65
66
private
:
69
std::unordered_map<std::string, std::any>
parameters_
;
71
rclcpp::Node::SharedPtr
node_
;
72
};
73
74
}
// namespace yasmin_ros
75
76
#endif
// YASMIN_ROS__GET_PARAMETER_STATE_HPP_
basic_outcomes.hpp
blackboard.hpp
yasmin::Blackboard::SharedPtr
std::shared_ptr< Blackboard > SharedPtr
Shared pointer type for Blackboard.
Definition
blackboard.hpp:85
yasmin::State
Represents a state in a state machine.
Definition
state.hpp:46
yasmin_ros::GetParametersState::Parameters
std::unordered_map< std::string, std::any > Parameters
Type alias for a map of parameters.
Definition
get_parameters_state.hpp:42
yasmin_ros::GetParametersState::execute
std::string execute(yasmin::Blackboard::SharedPtr blackboard) override
Executes the state to retrieve parameters.
Definition
get_parameters_state.cpp:42
yasmin_ros::GetParametersState::parameters_
std::unordered_map< std::string, std::any > parameters_
Definition
get_parameters_state.hpp:69
yasmin_ros::GetParametersState::node_
rclcpp::Node::SharedPtr node_
Shared pointer to the ROS 2 node.
Definition
get_parameters_state.hpp:71
yasmin_ros::GetParametersState::GetParametersState
GetParametersState(const Parameters ¶meters, rclcpp::Node::SharedPtr node=nullptr)
Shared pointer type for GetParametersState.
Definition
get_parameters_state.cpp:28
yasmin_ros
Definition
action_state.hpp:37
state.hpp
types.hpp
YASMIN_PTR_ALIASES
#define YASMIN_PTR_ALIASES(ClassName)
Macro to define all pointer aliases for a class.
Definition
types.hpp:52
yasmin_node.hpp
Generated by
1.13.2