YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
Imu_nws_ros2.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_DEV_IMU_NWS_ROS2_H
7#define YARP_DEV_IMU_NWS_ROS2_H
8
10#include <sensor_msgs/msg/imu.hpp>
11
24class Imu_nws_ros2 : public GenericSensor_nws_ros2<sensor_msgs::msg::Imu>
25{
26 // Interface of the wrapped device
27 yarp::dev::IThreeAxisLinearAccelerometers* m_iThreeAxisLinearAccelerometers{ nullptr };
28 yarp::dev::IThreeAxisGyroscopes* m_iThreeAxisGyroscopes{ nullptr };
29 yarp::dev::IOrientationSensors* m_iOrientationSensors{ nullptr };
30 yarp::dev::IThreeAxisMagnetometers* m_iThreeAxisMagnetometers{ nullptr };
31
32public:
33 using GenericSensor_nws_ros2<sensor_msgs::msg::Imu>::GenericSensor_nws_ros2;
34
35 using GenericSensor_nws_ros2<sensor_msgs::msg::Imu>::open;
36 using GenericSensor_nws_ros2<sensor_msgs::msg::Imu>::close;
37 using GenericSensor_nws_ros2<sensor_msgs::msg::Imu>::attachAll;
38 using GenericSensor_nws_ros2<sensor_msgs::msg::Imu>::detachAll;
39
40 /* PeriodicRateThread methods */
41 void run() override;
42
43protected:
44 bool viewInterfaces() override;
45};
46
47#endif // YARP_DEV_IMU_NWS_ROS2_H
This abstract template needs to be specialized in a ROS Publisher, for a specific ROS mesagge/sensor ...
bool open(yarp::os::Searchable &params) override
bool attachAll(const yarp::dev::PolyDriverList &p) override
IMU_nws_ros2: This wrapper connects to a device and publishes a ROS topic of type sensor_msgs::Imu.
void run() override
Loop function.
bool viewInterfaces() override
Device interface to one or multiple orientation sensors, such as IMUs with on board estimation algori...
Device interface to one or multiple three axis gyroscopes.
Device interface to one or multiple three axis linear accelerometers.
Device interface to one or multiple three axis magnetometers.