Imu contains information about an imu sensor. More...
#include <Imu.hh>
Public Member Functions | |
Imu () | |
Default constructor. | |
const Noise & | AngularVelocityXNoise () const |
Get the noise values related to the body-frame angular velocity on the X-axis. | |
const Noise & | AngularVelocityYNoise () const |
Get the noise values related to the body-frame angular velocity around the Y-axis. | |
const Noise & | AngularVelocityZNoise () const |
Get the noise values related to the body-frame angular velocity around the Z-axis. | |
const gz::math::Vector3d & | CustomRpy () const |
This field and CustomRpyParentFrame are used when Localization is set to CUSTOM. | |
const std::string & | CustomRpyParentFrame () const |
Get the name of parent frame which the custom_rpy transform is defined relative to. | |
sdf::ElementPtr | Element () const |
Get a pointer to the SDF element that was used during load. | |
const gz::math::Vector3d & | GravityDirX () const |
Used when localization is set to GRAV_UP or GRAV_DOWN, a projection of this vector into a plane that is orthogonal to the gravity vector defines the direction of the IMU reference frame's X-axis. | |
const std::string & | GravityDirXParentFrame () const |
Get the name of parent frame which the GravityDirX vector is defined relative to. | |
const Noise & | LinearAccelerationXNoise () const |
Get the noise values related to the body-frame linear acceleration on the X-axis. | |
const Noise & | LinearAccelerationYNoise () const |
Get the noise values related to the body-frame linear acceleration on the Y-axis. | |
const Noise & | LinearAccelerationZNoise () const |
Get the noise values related to the body-frame linear acceleration on the Z-axis. | |
Errors | Load (ElementPtr _sdf) |
Load the IMU based on an element pointer. | |
const std::string & | Localization () const |
This string represents special hardcoded use cases that are commonly seen with typical robot IMU's: | |
bool | operator!= (const Imu &_imu) const |
Return true this Imu object does not contain the same values as the passed in parameter. | |
bool | operator== (const Imu &_imu) const |
Return true if both Imu objects contain the same values. | |
bool | OrientationEnabled () const |
Get whether orientation data generation is enabled. | |
void | SetAngularVelocityXNoise (const Noise &_noise) |
Set the noise values related to the body-frame angular velocity around the X-axis. | |
void | SetAngularVelocityYNoise (const Noise &_noise) |
Set the noise values related to the body-frame angular velocity around the Y-axis. | |
void | SetAngularVelocityZNoise (const Noise &_noise) |
Set the noise values related to the body-frame angular velocity around the Z-axis. | |
void | SetCustomRpy (const gz::math::Vector3d &_rpy) |
See CustomRpy() const. | |
void | SetCustomRpyParentFrame (const std::string &_frame) |
Set the name of parent frame which the custom_rpy transform is defined relative to. | |
void | SetGravityDirX (const gz::math::Vector3d &_grav) |
Used when localization is set to GRAV_UP or GRAV_DOWN, a projection of this vector into a plane that is orthogonal to the gravity vector defines the direction of the IMU reference frame's X-axis. | |
void | SetGravityDirXParentFrame (const std::string &_frame) |
Set the name of parent frame which the GravityDirX vector is defined relative to. | |
void | SetLinearAccelerationXNoise (const Noise &_noise) |
Set the noise values related to the body-frame linear acceleration on the X-axis. | |
void | SetLinearAccelerationYNoise (const Noise &_noise) |
Set the noise values related to the body-frame linear acceleration on the Y-axis. | |
void | SetLinearAccelerationZNoise (const Noise &_noise) |
Set the noise values related to the body-frame linear acceleration on the Z-axis. | |
void | SetLocalization (const std::string &_localization) |
See Localization(const std::string &). | |
void | SetOrientationEnabled (bool _enabled) |
Set whether to enable orientation data generation. | |
sdf::ElementPtr | ToElement () const |
Create and return an SDF element filled with data from this imu sensor. | |
sdf::ElementPtr | ToElement (sdf::Errors &_errors) const |
Create and return an SDF element filled with data from this imu sensor. | |
Imu contains information about an imu sensor.
This sensor can be attached to a link.
sdf::SDF_VERSION_NAMESPACE::Imu::Imu | ( | ) |
Default constructor.
const Noise & sdf::SDF_VERSION_NAMESPACE::Imu::AngularVelocityXNoise | ( | ) | const |
Get the noise values related to the body-frame angular velocity on the X-axis.
const Noise & sdf::SDF_VERSION_NAMESPACE::Imu::AngularVelocityYNoise | ( | ) | const |
Get the noise values related to the body-frame angular velocity around the Y-axis.
const Noise & sdf::SDF_VERSION_NAMESPACE::Imu::AngularVelocityZNoise | ( | ) | const |
Get the noise values related to the body-frame angular velocity around the Z-axis.
const gz::math::Vector3d & sdf::SDF_VERSION_NAMESPACE::Imu::CustomRpy | ( | ) | const |
This field and CustomRpyParentFrame are used when Localization is set to CUSTOM.
Orientation (fixed axis roll, pitch yaw) transform from ParentFrame to this IMU's reference frame.
Some common examples are:
const std::string & sdf::SDF_VERSION_NAMESPACE::Imu::CustomRpyParentFrame | ( | ) | const |
Get the name of parent frame which the custom_rpy transform is defined relative to.
It can be any valid fully scoped link name or the special reserved "world" frame. If left empty, use the sensor's own local frame.
sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Imu::Element | ( | ) | const |
const gz::math::Vector3d & sdf::SDF_VERSION_NAMESPACE::Imu::GravityDirX | ( | ) | const |
Used when localization is set to GRAV_UP or GRAV_DOWN, a projection of this vector into a plane that is orthogonal to the gravity vector defines the direction of the IMU reference frame's X-axis.
grav_dir_x is defined in the coordinate frame as defined by the parent_frame element.
const std::string & sdf::SDF_VERSION_NAMESPACE::Imu::GravityDirXParentFrame | ( | ) | const |
Get the name of parent frame which the GravityDirX vector is defined relative to.
It can be any valid fully scoped link name or the special reserved "world" frame. If left empty, use the sensor's own local frame.
const Noise & sdf::SDF_VERSION_NAMESPACE::Imu::LinearAccelerationXNoise | ( | ) | const |
Get the noise values related to the body-frame linear acceleration on the X-axis.
const Noise & sdf::SDF_VERSION_NAMESPACE::Imu::LinearAccelerationYNoise | ( | ) | const |
Get the noise values related to the body-frame linear acceleration on the Y-axis.
const Noise & sdf::SDF_VERSION_NAMESPACE::Imu::LinearAccelerationZNoise | ( | ) | const |
Get the noise values related to the body-frame linear acceleration on the Z-axis.
Errors sdf::SDF_VERSION_NAMESPACE::Imu::Load | ( | ElementPtr | _sdf | ) |
const std::string & sdf::SDF_VERSION_NAMESPACE::Imu::Localization | ( | ) | const |
This string represents special hardcoded use cases that are commonly seen with typical robot IMU's:
GRAV_DOWN: where direction of gravity maps to IMU reference frame Z-axis with Z-axis pointing in the direction of gravity. IMU reference frame X-axis direction is defined by GravityDirX(). Note if GravityDirX() is parallel to gravity direction, this configuration fails. Otherwise, IMU reference frame X-axis is defined by projection of GravityDirX() onto a plane normal to the gravity vector. IMU reference frame Y-axis is a vector orthogonal to both X and Z axis following the right hand rule.
bool sdf::SDF_VERSION_NAMESPACE::Imu::operator!= | ( | const Imu & | _imu | ) | const |
bool sdf::SDF_VERSION_NAMESPACE::Imu::operator== | ( | const Imu & | _imu | ) | const |
bool sdf::SDF_VERSION_NAMESPACE::Imu::OrientationEnabled | ( | ) | const |
Get whether orientation data generation is enabled.
void sdf::SDF_VERSION_NAMESPACE::Imu::SetAngularVelocityXNoise | ( | const Noise & | _noise | ) |
Set the noise values related to the body-frame angular velocity around the X-axis.
[in] | _noise | Noise values for the X-axis angular velocity. |
void sdf::SDF_VERSION_NAMESPACE::Imu::SetAngularVelocityYNoise | ( | const Noise & | _noise | ) |
Set the noise values related to the body-frame angular velocity around the Y-axis.
[in] | _noise | Noise values for the Y-axis angular velocity. |
void sdf::SDF_VERSION_NAMESPACE::Imu::SetAngularVelocityZNoise | ( | const Noise & | _noise | ) |
Set the noise values related to the body-frame angular velocity around the Z-axis.
[in] | _noise | Noise values for the Z-axis angular velocity. |
void sdf::SDF_VERSION_NAMESPACE::Imu::SetCustomRpy | ( | const gz::math::Vector3d & | _rpy | ) |
See CustomRpy() const.
[in] | Custom | RPY vectory |
void sdf::SDF_VERSION_NAMESPACE::Imu::SetCustomRpyParentFrame | ( | const std::string & | _frame | ) |
Set the name of parent frame which the custom_rpy transform is defined relative to.
It can be any valid fully scoped link name or the special reserved "world" frame. If left empty, use the sensor's own local frame.
[in] | _frame | The name of the parent frame. |
void sdf::SDF_VERSION_NAMESPACE::Imu::SetGravityDirX | ( | const gz::math::Vector3d & | _grav | ) |
Used when localization is set to GRAV_UP or GRAV_DOWN, a projection of this vector into a plane that is orthogonal to the gravity vector defines the direction of the IMU reference frame's X-axis.
grav_dir_x is defined in the coordinate frame as defined by the parent_frame element.
[in] | _grav | The gravity direction. |
void sdf::SDF_VERSION_NAMESPACE::Imu::SetGravityDirXParentFrame | ( | const std::string & | _frame | ) |
Set the name of parent frame which the GravityDirX vector is defined relative to.
It can be any valid fully scoped link name or the special reserved "world" frame. If left empty, use the sensor's own local frame.
void sdf::SDF_VERSION_NAMESPACE::Imu::SetLinearAccelerationXNoise | ( | const Noise & | _noise | ) |
Set the noise values related to the body-frame linear acceleration on the X-axis.
[in] | _noise | Noise values for the X-axis linear acceleration. |
void sdf::SDF_VERSION_NAMESPACE::Imu::SetLinearAccelerationYNoise | ( | const Noise & | _noise | ) |
Set the noise values related to the body-frame linear acceleration on the Y-axis.
[in] | _noise | Noise values for the Y-axis linear acceleration. |
void sdf::SDF_VERSION_NAMESPACE::Imu::SetLinearAccelerationZNoise | ( | const Noise & | _noise | ) |
Set the noise values related to the body-frame linear acceleration on the Z-axis.
[in] | _noise | Noise values for the Z-axis linear acceleration. |
void sdf::SDF_VERSION_NAMESPACE::Imu::SetLocalization | ( | const std::string & | _localization | ) |
See Localization(const std::string &).
[in] | _localization | Localization frame name |
void sdf::SDF_VERSION_NAMESPACE::Imu::SetOrientationEnabled | ( | bool | _enabled | ) |
Set whether to enable orientation data generation.
[in] | _enabled | True to enabled orientation data, false to disable it. |
sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Imu::ToElement | ( | ) | const |
sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Imu::ToElement | ( | sdf::Errors & | _errors | ) | const |