roboligo
Loading...
Searching...
No Matches
Input.hpp
Go to the documentation of this file.
1// Copyright 2026 Juan S. Cely G.
2
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6
7// https://www.apache.org/licenses/LICENSE-2.0
8
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef ROBOLIGO_COMMON_CONNECTOR_COMMANDERS__INPUT_HPP_
16#define ROBOLIGO_COMMON_CONNECTOR_COMMANDERS__INPUT_HPP_
17
18#include <geometry_msgs/msg/twist.hpp>
19#include <geometry_msgs/msg/twist_stamped.hpp>
20
22
23namespace roboligo
24{
33 rclcpp::Subscription<geometry_msgs::msg::Twist>::SharedPtr subscriber;
34 geometry_msgs::msg::Twist::SharedPtr data;
35 };
36
45 rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr subscriber;
46 geometry_msgs::msg::TwistStamped::SharedPtr data;
47 };
48
59 class Input : public Commander
60 {
61 public:
65 Input(std::string new_name, std::string new_topic);
66
70 virtual ~Input() = default;
71
73
75
80 void callback(const geometry_msgs::msg::Twist::SharedPtr msg);
81
86 void callback_stamped(const geometry_msgs::msg::TwistStamped::SharedPtr msg);
87
88 };
89} // namespace roboligo
90#endif // ROBOLIGO_COMMON_CONNECTOR_COMMANDERS__INPUT_HPP_
Commander(std::string new_name, std::string new_value)
Constructor for Commander.
Definition Commander.cpp:19
void callback_stamped(const geometry_msgs::msg::TwistStamped::SharedPtr msg)
Callback handler for TwistStamped messages.
Definition Input.cpp:34
void callback(const geometry_msgs::msg::Twist::SharedPtr msg)
Callback handler for Twist messages.
Definition Input.cpp:27
Input(std::string new_name, std::string new_topic)
Constructor.
Definition Input.cpp:19
RoboligoInputTwist twist
RoboligoInputTwist element.
Definition Input.hpp:72
virtual ~Input()=default
Destructor.
RoboligoInputTwistStamped twist_stamped
RoboligoInputTwistStamped element.
Definition Input.hpp:74
Definition ClassificationBase.hpp:28
Encapsulates a ROS 2 subscription and data storage for TwistStamped messages.
Definition Input.hpp:44
rclcpp::Subscription< geometry_msgs::msg::TwistStamped >::SharedPtr subscriber
Definition Input.hpp:45
geometry_msgs::msg::TwistStamped::SharedPtr data
Definition Input.hpp:46
Encapsulates a ROS 2 subscription and data storage for Twist messages.
Definition Input.hpp:32
geometry_msgs::msg::Twist::SharedPtr data
Definition Input.hpp:34
rclcpp::Subscription< geometry_msgs::msg::Twist >::SharedPtr subscriber
Definition Input.hpp:33