|
roboligo
|
Sensor class for handling odometry data from a ROS 2 topic. More...
#include <Odom.hpp>


Public Member Functions | |
| void | callback (nav_msgs::msg::Odometry::SharedPtr msg) |
| Callback function invoked when a new odometry message is received. | |
| Odom (std::string new_name, std::string new_topic) | |
| Constructor for Odom sensor. | |
| virtual | ~Odom ()=default |
| Virtual destructor. | |
| Public Member Functions inherited from roboligo::Sensor | |
| void | init (std::string new_name, std::string new_topic) |
| Initializes the sensor with a name and topic. | |
| Sensor (std::string new_name, std::string new_topic) | |
| Constructor for Sensor. | |
| virtual | ~Sensor ()=default |
| Virtual destructor. | |
| Public Member Functions inherited from roboligo::Linker | |
| interfaces::modes | get_mode () |
| Gets the current mode of the linker. | |
| std::string | get_name () |
| Gets the linker name. | |
| std::string | get_topic () |
| Gets the topic name. | |
| bool | is_available (void) |
| Checks if the linker is available. | |
| bool | is_configured (void) |
| Checks if the linker is configured. | |
| Linker () | |
| Default constructor. | |
| void | set_available (bool new_state) |
| Sets the availability state. | |
| void | set_configured (bool new_state) |
| Sets the configuration state. | |
| void | set_interface (std::string name_, std::string topic_name_) |
| Configures the interface with name and topic. | |
| void | set_mode (interfaces::modes new_mode) |
| Sets the linker mode. | |
| void | set_name (std::string new_name) |
| Sets the linker name. | |
| void | set_service (std::string new_name) |
| Sets the service name. | |
| void | set_topic (std::string new_name) |
| Sets the topic name. | |
| virtual | ~Linker ()=default |
| Virtual destructor. | |
Public Attributes | |
| nav_msgs::msg::Odometry::SharedPtr | data |
| Shared pointer storing the latest received odometry message. | |
| rclcpp::Subscription< nav_msgs::msg::Odometry >::SharedPtr | subscriber |
| ROS 2 subscription object for odometry messages. | |
| Public Attributes inherited from roboligo::Linker | |
| std::shared_ptr< interfaces::Interface > | interface |
| Shared pointer to the interface object. | |
| std::string | name {"linker"} |
| Linker identifier name. | |
| std::string | topic_name {"/interface"} |
| Associated topic name. | |
Additional Inherited Members | |
| Protected Member Functions inherited from roboligo::Sensor | |
| void | initialize (std::string new_name, std::string new_topic) |
| Protected initialization method. | |
| Protected Attributes inherited from roboligo::Sensor | |
| interfaces::modes | mode_ {interfaces::modes::SUBSCRIBER} |
| The connection mode set to SUBSCRIBER for receiving sensor data. | |
| Protected Attributes inherited from roboligo::Linker | |
| bool | available_ {false} |
| Availability flag. | |
| bool | configured_ {false} |
| Configuration state flag. | |
| interfaces::modes | mode_ |
| Current operating mode. | |
Sensor class for handling odometry data from a ROS 2 topic.
Subscribes to odometry messages and stores the latest odometry information. Inherits from the Sensor base class.
|
inline |
Constructor for Odom sensor.
| new_name | The name identifier for the sensor. |
| new_topic | The ROS 2 topic name to subscribe to. |
|
virtualdefault |
Virtual destructor.
| void roboligo::Odom::callback | ( | nav_msgs::msg::Odometry::SharedPtr | msg | ) |
Callback function invoked when a new odometry message is received.
| msg | Shared pointer to the received Odometry message. |
| nav_msgs::msg::Odometry::SharedPtr roboligo::Odom::data |
Shared pointer storing the latest received odometry message.
| rclcpp::Subscription<nav_msgs::msg::Odometry>::SharedPtr roboligo::Odom::subscriber |
ROS 2 subscription object for odometry messages.