YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IMURosPublisher.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2023 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6
7#ifndef YARP_DEV_IMUROSPUBLISHER_H
8#define YARP_DEV_IMUROSPUBLISHER_H
9
11
12 // Thrift-generated classes
13#include <yarp/rosmsg/sensor_msgs/Imu.h>
14
31class IMURosPublisher : public GenericSensorRosPublisher<yarp::rosmsg::sensor_msgs::Imu>
32{
33 // Interface of the wrapped device
34 yarp::dev::IThreeAxisLinearAccelerometers* m_iThreeAxisLinearAccelerometers{ nullptr };
35 yarp::dev::IThreeAxisGyroscopes* m_iThreeAxisGyroscopes{ nullptr };
36 yarp::dev::IOrientationSensors* m_iOrientationSensors{ nullptr };
37 yarp::dev::IThreeAxisMagnetometers* m_iThreeAxisMagnetometers{ nullptr };
38
39public:
40 using GenericSensorRosPublisher<yarp::rosmsg::sensor_msgs::Imu>::GenericSensorRosPublisher;
41
42 using GenericSensorRosPublisher<yarp::rosmsg::sensor_msgs::Imu>::open;
43 using GenericSensorRosPublisher<yarp::rosmsg::sensor_msgs::Imu>::close;
44 using GenericSensorRosPublisher<yarp::rosmsg::sensor_msgs::Imu>::attachAll;
45 using GenericSensorRosPublisher<yarp::rosmsg::sensor_msgs::Imu>::detachAll;
46
47 /* PeriodicRateThread methods */
48 void run() override;
49
50protected:
51 bool viewInterfaces() override;
52};
53
54#endif
This abstract template needs to be specialized in a ROS Publisher, for a specific ROS mesagge/sensor ...
bool attachAll(const yarp::dev::PolyDriverList &p) override
IMURosPublisher: 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.