YARP
Yet Another Robot Platform
IMURosPublisher.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 
10 #ifndef YARP_DEV_IMUROSPUBLISHER_H
11 #define YARP_DEV_IMUROSPUBLISHER_H
12 
14 
15  // Thrift-generated classes
17 
34 class IMURosPublisher : public GenericSensorRosPublisher<yarp::rosmsg::sensor_msgs::Imu>
35 {
36  // Interface of the wrapped device
37  yarp::dev::IThreeAxisLinearAccelerometers* m_iThreeAxisLinearAccelerometers{ nullptr };
38  yarp::dev::IThreeAxisGyroscopes* m_iThreeAxisGyroscopes{ nullptr };
39  yarp::dev::IOrientationSensors* m_iOrientationSensors{ nullptr };
40  yarp::dev::IThreeAxisMagnetometers* m_iThreeAxisMagnetometers{ nullptr };
41 
42 public:
44 
49 
50  /* PeriodicRateThread methods */
51  void run() override;
52 
53 protected:
54  bool viewInterfaces() override;
55 };
56 
57 #endif
This abstract template needs to be specialized in a ROS Publisher, for a specific ROS mesagge/sensor ...
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.