roboligo
Toggle main menu visibility
Loading...
Searching...
No Matches
roboligo_common
include
roboligo_common
connector
sensors
Imu.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_SENSORS__IMU_HPP_
16
#define ROBOLIGO_COMMON_CONNECTOR_SENSORS__IMU_HPP_
17
18
#include <sensor_msgs/msg/imu.hpp>
19
20
#include "
roboligo_common/connector/Sensor.hpp
"
21
22
namespace
roboligo
23
{
31
class
Imu
:
public
Sensor
32
{
33
public
:
39
Imu
(std::string new_name, std::string new_topic)
40
:
Sensor
(new_name, new_topic){}
41
44
virtual
~Imu
() =
default
;
45
46
rclcpp::Subscription<sensor_msgs::msg::Imu>::SharedPtr
subscriber
;
47
48
sensor_msgs::msg::Imu::SharedPtr
data
;
53
void
callback
(sensor_msgs::msg::Imu::SharedPtr msg);
54
};
55
}
// namespace roboligo
56
#endif
// ROBOLIGO_COMMON_CONNECTOR_SENSORS__IMU_HPP_
Sensor.hpp
roboligo::Imu::Imu
Imu(std::string new_name, std::string new_topic)
Constructor for Imu sensor.
Definition
Imu.hpp:39
roboligo::Imu::data
sensor_msgs::msg::Imu::SharedPtr data
Latest IMU data received from the subscriber.
Definition
Imu.hpp:48
roboligo::Imu::callback
void callback(sensor_msgs::msg::Imu::SharedPtr msg)
Callback function triggered when new IMU message is received.
Definition
Imu.cpp:20
roboligo::Imu::subscriber
rclcpp::Subscription< sensor_msgs::msg::Imu >::SharedPtr subscriber
ROS 2 subscription handle for IMU messages.
Definition
Imu.hpp:46
roboligo::Imu::~Imu
virtual ~Imu()=default
Virtual destructor.
roboligo::Sensor::Sensor
Sensor(std::string new_name, std::string new_topic)
Constructor for Sensor.
Definition
Sensor.cpp:19
roboligo
Definition
ClassificationBase.hpp:28
Generated by
1.17.0