Device interface to one or multiple orientation sensors, such as IMUs with on board estimation algorithms. More...
#include <yarp/dev/MultipleAnalogSensorsInterfaces.h>
Inheritance diagram for yarp::dev::IOrientationSensors:Public Member Functions | |
| virtual size_t | getNrOfOrientationSensors () const =0 |
| Get the number of orientation sensors exposed by this device. | |
| virtual yarp::dev::MAS_status | getOrientationSensorStatus (size_t sens_index) const =0 |
| Get the status of the specified sensor. | |
| virtual bool | getOrientationSensorName (size_t sens_index, std::string &name) const =0 |
| Get the name of the specified sensor. | |
| virtual bool | getOrientationSensorFrameName (size_t sens_index, std::string &frameName) const =0 |
| Get the name of the frame of the specified sensor. | |
| virtual bool | getOrientationSensorMeasureAsRollPitchYaw (size_t sens_index, yarp::sig::Vector &rpy, double ×tamp) const =0 |
| Get the last reading of the orientation sensor as roll pitch yaw. | |
| virtual | ~IOrientationSensors () |
Device interface to one or multiple orientation sensors, such as IMUs with on board estimation algorithms.
The device returns the relative orientation between a lab or surface-fixed frame and a frame rigidly attached to the sensor.
The definition of the lab or surface-fixed frame is sensor-specific.
| Sensor Tag |
|---|
OrientationSensors |
Definition at line 350 of file MultipleAnalogSensorsInterfaces.h.
|
inlinevirtual |
Definition at line 428 of file MultipleAnalogSensorsInterfaces.h.
|
pure virtual |
Get the number of orientation sensors exposed by this device.
Implemented in realsense2Tracking, realsense2withIMUDriver, Imu_nwc_ros2, FakeIMU, FakePositionSensor, BoschIMU, MultipleAnalogSensorsRemapper, and MultipleAnalogSensorsClient.
|
pure virtual |
Get the name of the frame of the specified sensor.
Implemented in realsense2Tracking, realsense2withIMUDriver, Imu_nwc_ros2, FakeIMU, FakePositionSensor, BoschIMU, MultipleAnalogSensorsRemapper, and MultipleAnalogSensorsClient.
|
pure virtual |
Get the last reading of the orientation sensor as roll pitch yaw.
If 

![$ r \in [-180, 180] , p \in [-90, 90], y \in [-180, 180]$](form_2.png)
![\[
{}^f R_s = RotZ\left(\frac{\pi}{180}y\right)*RotY\left(\frac{\pi}{180}p\right)*RotX\left(\frac{\pi}{180}r\right)
\]](form_3.png)
with
![\[
RotZ(\theta)
=
\begin{bmatrix}
\cos(\theta) & -\sin(\theta) & 0 \\
\sin(\theta) & \cos(\theta) & 0 \\
0 & 0 & 1 \\
\end{bmatrix}
\]](form_4.png)
,
![\[
RotY(\theta)
=
\begin{bmatrix}
\cos(\theta) & 0 & \sin(\theta) \\
0 & 1 & 0 \\
-\sin(\theta) & 0 & \cos(\theta) \\
\end{bmatrix}
\]](form_5.png)
and
![\[
RotX(\theta)
=
\begin{bmatrix}
1 & 0 & 0 \\
0 & \cos(\theta) & - \sin(\theta) \\
0 & \sin(\theta) & \cos(\theta) \\
\end{bmatrix}
\]](form_6.png)
where 


| [in] | sens_index | The index of the specified sensor (should be between 0 and getNrOfOrientationSensors()-1). |
| [out] | out | The requested measure. The vector should be 3-dimensional. The measure is expressed in degrees . |
| [out] | timestamp | The timestamp of the requested measure, expressed in seconds. |
Implemented in realsense2Tracking, realsense2withIMUDriver, Imu_nwc_ros2, FakeIMU, BoschIMU, MultipleAnalogSensorsRemapper, MultipleAnalogSensorsClient, and FakePositionSensor.
|
pure virtual |
Get the name of the specified sensor.
Implemented in realsense2Tracking, realsense2withIMUDriver, Imu_nwc_ros2, FakeIMU, FakePositionSensor, BoschIMU, MultipleAnalogSensorsRemapper, and MultipleAnalogSensorsClient.
|
pure virtual |
Get the status of the specified sensor.
Implemented in realsense2Tracking, realsense2withIMUDriver, Imu_nwc_ros2, FakeIMU, FakePositionSensor, BoschIMU, MultipleAnalogSensorsRemapper, and MultipleAnalogSensorsClient.