**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_stddev)


#####  <precision> Element


#####  <lens> Element


i was facing this issue with the gazebo depth camera ...


**Required:** 1
**Type:** string
**Default:** gaussian
**Description:** The type of noise. Currently supported types are: "gaussian"
(draw noise values independently for each beam from a Gaussian distribution).
](spec?ver=1.11&elem=sensor#noise_type)


|  [ transport::NodePtr
](namespacegazebo_1_1transport.html#ae54bb65ed6e30aae97dc1dc067c530b2) node
---
protected  inherited

Node for communication.


#####  <scan> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the noise
used to drive a process to model slow variations in a sensor bias.
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_stddev)


#####  <image> Element


**Required:** 1
**Type:** string
**Default:** none
**Description:** The type of noise. Currently supported types are: "none" (no
noise). "gaussian" (draw noise values independently for each measurement from
a Gaussian distribution). "gaussian_quantized" ("gaussian" plus quantization
of outputs (ie. rounding))  ](spec?ver=1.11&elem=sensor#noise_type)


#####  <dynamic_bias_correlation_time> Element


#####  <mean> Element


#####  <bias_mean> Element


**Required:** 0
**Type:**
**Default:**
**Description:** These elements are specific to the force torque sensor.
](spec?ver=1.11&elem=sensor#sensor_force_torque)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_mean)


Reimplemented from [ gazebo::sensors::Sensor
](classgazebo_1_1sensors_1_1Sensor.html#a051f0c353a1222e2d2271336557e32c1) .


[ Why there is no timestamp field in sensor_msgs ? ](/question/338345/why-
there-is-no-timestamp-field-in-sensor_msgs/)


#####  <plugin> Element


#####  <noise> Element


#####  type  Attribute


ignition::math::Quaterniond Orientation  |  (  |  |  )  |  const
---|---|---|---|---

get orientation of the IMU relative to a reference pose Initially, the
reference pose is the boot up pose of the IMU, but user can call either
SetReferencePose to define current pose as the reference frame, or call
SetWorldToReferencePose to define transform from world frame to reference
frame.


#####  <stddev> Element


**Required:** 1
**Type:** double
**Default:** 0
**Description:** Must be greater or equal to min_angle
](spec?ver=1.11&elem=sensor#horizontal_max_angle)


**Required:** 0
**Type:**
**Default:**
**Description:** Noise parameters for vertical velocity measurement, in units
of meters/second.  ](spec?ver=1.11&elem=sensor#velocity_sensing_vertical)


Returns


Imu message.


**Required:** 0
**Type:** string
**Default:** semantic
**Description:** The segmentation type of the segmentation camera. Valid
options are: - semantic: Semantic segmentation, which provides 2 images: 1. A
grayscale image, with the pixel values representing the label of an object 2.
A colored image, with the pixel values being a unique color for each label -
panoptic | instance: Panoptic segmentation, which provides an image where each
pixel has 1 channel for label value of the object and 2 channels for the
number of the instances of that label, and a colored image which its pixels
have a unique color for each instance.
](spec?ver=1.11&elem=sensor#camera_segmentation_type)


**Required:** 0
**Type:** double
**Default:** 1
**Description:** This number is multiplied by samples to determine the number
of range data points returned. If resolution is not equal to one, range data
is interpolated.  ](spec?ver=1.11&elem=sensor#vertical_resolution)


**Required:** 0
**Type:**
**Default:**
**Description:** Parameters related to the body-frame Z axis of the
magnetometer  ](spec?ver=1.11&elem=sensor#magnetometer_z)


[ Sensors ](group__gazebo__sensors.html)


**Required:** 0
**Type:** double
**Default:** 120
**Description:** Y principal point for projection matrix(in pixels, overrides
cy)  ](spec?ver=1.11&elem=sensor#projection_p_cy)


**Required:** 1
**Type:** double
**Default:** 0
**Description:** The maximum distance for each ray.
](spec?ver=1.11&elem=sensor#range_max)


u can accept the answer <3


#####  <bias_stddev> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the correlation time in seconds of the
noise used to drive a process to model slow variations in a sensor bias. A
typical value, when used, would be on the order of 3600 seconds (1 hour).
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_correlation_time)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian_quantized", the precision of output
signals. A value of zero implies infinite precision / no quantization.
](spec?ver=1.11&elem=sensor#noise_precision)


**Required:** 0
**Type:**
**Default:**
**Description:** These elements are specific to an air pressure sensor.
](spec?ver=1.11&elem=sensor#sensor_air_pressure)


Parameters


##  Public Member Functions

---
|  [ ImuSensor
](classgazebo_1_1sensors_1_1ImuSensor.html#af560063ed6fd27b662a2026d32f347d2)
()
|  Constructor.  More...

virtual  |  [ ~ImuSensor
](classgazebo_1_1sensors_1_1ImuSensor.html#a80447fe997fc18b534290a86e96f7d52)
()
|  Destructor.  More...

[ math::Vector3 ](classgazebo_1_1math_1_1Vector3.html) |  [ GetAngularVelocity
](classgazebo_1_1sensors_1_1ImuSensor.html#ae38c02036a704a32a79fbb839bdb3865)
() const
|  Returns the angular velocity.  More...

msgs::IMU  |  [ GetImuMessage
](classgazebo_1_1sensors_1_1ImuSensor.html#a3f823d3f5fa7ee6f6fb09e45b37d5992)
() const
|  Returns the imu message.  More...

[ math::Vector3 ](classgazebo_1_1math_1_1Vector3.html) |  [
GetLinearAcceleration
](classgazebo_1_1sensors_1_1ImuSensor.html#a86ec0ff338d5198594320c20989719a3)
() const
|  Returns the imu linear acceleration.  More...

[ math::Quaternion ](classgazebo_1_1math_1_1Quaternion.html) |  [
GetOrientation
](classgazebo_1_1sensors_1_1ImuSensor.html#a3e80a2d400af876dca1188d4036f6ecd)
() const
|  get orientation of the IMU relative to the reference pose  More...

virtual void  |  [ Init
](classgazebo_1_1sensors_1_1ImuSensor.html#a9fe6b52597b1c9e177dcfd91c823db55)
()
|  Initialize the IMU.  More...


#####  <bias_mean> Element


#####  type  Attribute


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which noise values are drawn.
](spec?ver=1.11&elem=sensor#noise_stddev)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_stddev)


**Required:** 1
**Type:** bool
**Default:** false
**Description:** True = saving enabled
](spec?ver=1.11&elem=sensor#save_enabled)


#####  <imu> Element


#####  <stddev> Element


#####  <contact> Element


The SDFormat version shown in the dropdown above defines the specification
version. This version number may be different from the release version of
libsdformat, which contains the C++ library used to parse SDFormat files. See
[ http://sdformat.org/tutorials?tut=roadmap
](http://sdformat.org/tutorials?tut=roadmap) to find out which specification
version goes with which libsdformat version.


Linear acceleration.


#####  <min> Element


#####  <y> Element


**Required:** 0
**Type:**
**Default:**
**Description:** Parameters related to NAVSAT position measurement.
](spec?ver=1.11&elem=sensor#navsat_position_sensing)


|  uint32_t parentId
---
protected  inherited

The sensor's parent ID.


Reimplemented from [ Sensor
](classgazebo_1_1sensors_1_1Sensor.html#a3e0b39e1326de703012f81ac2be7feba) .


#####  <dynamic_bias_correlation_time> Element


#####  <format> Element


#####  <x> Element


|  virtual ignition::math::Pose3d Pose  |  (  |  |  )  |  const
---|---|---|---|---
virtual  inherited

Get the current pose.


|  void Load  |  (  |  const std::string & |  __worldName_ ,
---|---|---|---
|  |  sdf::ElementPtr  |  __sdf_
|  )  |  |
protected  virtual

Load the sensor with SDF parameters.


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the noise
used to drive a process to model slow variations in a sensor bias.
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_stddev)


#####  <min_angle> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which noise values are drawn.  ](spec?ver=1.11&elem=sensor#noise_mean)


* [ imu ](/questions/scope:all/sort:activity-desc/tags:imu/page:1/)


#####  <sensor> Element


|  std::string ScopedName  |  (  |  |  )  |  const
---|---|---|---|---
inherited

Get fully scoped name of the sensor.


#####  <dynamic_bias_stddev> Element


#####  <air_pressure> Element


#####  <bias_stddev> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian_quantized", the precision of output
signals. A value of zero implies infinite precision / no quantization.
](spec?ver=1.11&elem=sensor#noise_precision)


Returns


#####  <mean> Element


#####  <cy> Element


you'r welcome <3


##  Member Function Documentation


#####  <force> Element


**Required:** 1
**Type:** string
**Default:** gaussian
**Description:** The type of noise. Currently supported types are: "gaussian"
(draw additive noise values independently for each pixel from a Gaussian
distribution).  ](spec?ver=1.11&elem=sensor#noise_type)


##  Comments


**Required:** 0
**Type:** bool
**Default:** false
**Description:** If true, the sensor will publish performance metrics
](spec?ver=1.11&elem=sensor#sensor_enable_metrics)


[ iimata ](/users/101281/iimata/)
40  ●  8  ●  26  ●  32


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the correlation time in seconds of the
noise used to drive a process to model slow variations in a sensor bias. A
typical value, when used, would be on the order of 3600 seconds (1 hour).
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_correlation_time)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_stddev)


#####  <noise> Element


**Required:** 1
**Type:** string
**Default:** none
**Description:** The type of noise. Currently supported types are: "none" (no
noise). "gaussian" (draw noise values independently for each measurement from
a Gaussian distribution). "gaussian_quantized" ("gaussian" plus quantization
of outputs (ie. rounding))  ](spec?ver=1.11&elem=sensor#noise_type)


#####  <clip> Element


**Required:** 0
**Type:** double
**Default:** 2442
**Description:** Specifies the frequency of transmission in MHz
](spec?ver=1.11&elem=sensor#transceiver_frequency)


#####  rotation_format  Attribute


[ SensorCategory
](namespacegazebo_1_1sensors.html#a6358b5db68197314fc06924102e4b7fb) |  [
GetCategory
](classgazebo_1_1sensors_1_1Sensor.html#a22cdf70cb4317a6347f1a77d6b5bae9e) ()
const
|  Get the category of the sensor.  More...

uint32_t  |  [ GetId
](classgazebo_1_1sensors_1_1Sensor.html#afac77de91a686c49150f23d69397b135) ()
const
|  Get the sensor's ID.  More...

[ common::Time ](classgazebo_1_1common_1_1Time.html) |  [
GetLastMeasurementTime
](classgazebo_1_1sensors_1_1Sensor.html#a116e82e87d1b0bb03038a96f4ddf4fbc) ()
|  Return last measurement time.  More...

[ common::Time ](classgazebo_1_1common_1_1Time.html) |  [ GetLastUpdateTime
](classgazebo_1_1sensors_1_1Sensor.html#a4bb163e952c13acbcce41eb2a6d20265) ()
|  Return last update time.  More...

std::string  |  [ GetName
](classgazebo_1_1sensors_1_1Sensor.html#a8ff23e413ef03f89cdb4a69a9df93970) ()
const
|  Get name.  More...

[ NoisePtr
](namespacegazebo_1_1sensors.html#a78b16878dcf8c99b93d0da0832d4355f) |  [
GetNoise
](classgazebo_1_1sensors_1_1Sensor.html#a9d9e58fb82855e559203f40eef71349d)
(unsigned int _index=0) const
|  Get the sensor's noise model.  More...

uint32_t  |  [ GetParentId
](classgazebo_1_1sensors_1_1Sensor.html#a95992885adff9a539e52377b33e1215b) ()
const
|  Get the sensor's parent's ID.  More...

std::string  |  [ GetParentName


#####  <essid> Element


**Required:** 0
**Type:** string
**Default:**
**Description:** If specified, this pose is expressed in the named frame. The
named frame must be declared within the same scope (world/model) as the
element that has its pose specified by this tag. If missing, the pose is
expressed in the frame of the parent XML element of the element that contains
the pose. For exceptions to this rule and more details on the default
behavior, see http://sdformat.org/tutorials?tut=pose_frame_semantics. Note
that @relative_to merely affects an element's initial pose and does not affect
the element's dynamic movement thereafter. New in v1.8: @relative_to may use
frames of nested scopes. In this case, the frame is specified using `::` as
delimiter to define the scope of the frame, e.g.
`nested_model_A::nested_model_B::awesome_frame`.
](spec?ver=1.11&elem=sensor#pose_relative_to)


**Required:** 0
**Type:**
**Default:**
**Description:** ](spec?ver=1.11&elem=sensor#scan_vertical)


|  virtual bool gazebo::sensors::ImuSensor::IsActive  |  (  |  |  )  |
---|---|---|---|---
virtual

Returns true if sensor generation is active.


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian," the mean of the Gaussian distribution
from which noise values are drawn.  ](spec?ver=1.11&elem=sensor#noise_mean)


#####  <rfid> Element


#####  <dynamic_bias_stddev> Element


ignition::math::Vector3d AngularVelocity  |  (  |  const bool  |  __noiseFree_
= ` false ` |  )  |  const
---|---|---|---|---|---

Returns the angular velocity in the IMU sensor local frame.


#####  <precision> Element


**Required:** 0
**Type:**
**Default:**
**Description:** Angular velocity about the Y axis
](spec?ver=1.11&elem=sensor#angular_velocity_y)


#####  <bias_stddev> Element


#####  type  Attribute


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the noise
used to drive a process to model slow variations in a sensor bias.
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_stddev)


  {
    return;
  }
  // Computes simulation update rate and real update rate.
  double simUpdateRate = 0;
  double realUpdateRate = 0;
  const auto clockNow = std::chrono::steady_clock::now();
  // If lastUpdateTime == 0 means it wasn't initialized yet.
  if (this->lastUpdateTime.count() > 0)
  {
    const double diffSimUpdate = _now.count() -
      this->lastUpdateTime.count();
    simUpdateRate = 1.0 / diffSimUpdate;
    const double diffRealUpdate =
      std::chrono::duration_cast<std::chrono::duration<double>>(
        clockNow - this->lastRealTime).count();
    realUpdateRate = diffRealUpdate < std::numeric_limits<double>::epsilon() ?
      std::numeric_limits<double>::infinity() : 1.0 / diffRealUpdate;
  }
  // Update last time values.
  this->lastUpdateTime = _now;
  this->lastRealTime = clockNow;
  // Fill performance sensor metrics message.
  msgs::PerformanceSensorMetrics performanceSensorMetricsMsg;
  performanceSensorMetricsMsg.set_name(this->name);
  performanceSensorMetricsMsg.set_real_update_rate(realUpdateRate);
  performanceSensorMetricsMsg.set_sim_update_rate(simUpdateRate);
  performanceSensorMetricsMsg.set_nominal_update_rate(this->updateRate);
  // Publish data
  performanceSensorMetricsPub.Publish(performanceSensorMetricsMsg);
}
//////////////////////////////////////////////////
void SensorPrivate::SetRate(const gz::msgs::Double &_rate)
{
  auto rate = _rate.data();
  if (rate < 0.0)
    rate = 0.0;
  // if SDF has zero, any value can be set; for non-zero SDF values, we need to
  // check whether they are in bounds, i.e. greater than zero and lower or equal
  // to the SDF value


below the imu link.


#####  <min_angle> Element


For example, if this IMU works with respect to NED frame, then call this
function with the transform that transforms world frame to NED frame.
Subsequently, [ ImuSensor::Orientation
](classgazebo_1_1sensors_1_1ImuSensor.html#a66db2fd83d1d832184d888adc367115b
"get orientation of the IMU relative to a reference pose Initially, the
reference pose is the boot up ...") will return identity transform if the IMU
is aligned with the NED frame. This call replaces SetWorldToReferencePose.


    <link name="sensor_link">
        <gravity>false</gravity>
        <pose>? ? ? ? ? ? </pose>
    </link>


#####  <mean> Element


Parameters


This function is called during [ Sensor::Update
](classgazebo_1_1sensors_1_1Sensor.html#a656b04321733a6ac969093e8e8372132
"Update the sensor. ") . And in turn, [ Sensor::Update
](classgazebo_1_1sensors_1_1Sensor.html#a656b04321733a6ac969093e8e8372132
"Update the sensor. ") is called by [ SensorManager::Update
](classgazebo_1_1sensors_1_1SensorManager.html#a8c74e9ae43c0146dc6ae7ed40ff4d076
"Update all the sensors. ")


Angular velocity.


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian_quantized", the precision of output
signals. A value of zero implies infinite precision / no quantization.
](spec?ver=1.11&elem=sensor#noise_precision)


#####  <frame> Element


**Required:** 0
**Type:**
**Default:**
**Description:** These elements are specific to camera sensors.
](spec?ver=1.11&elem=sensor#sensor_camera)


#####  <bias_mean> Element


Please note: ROS Answers requires javascript to work properly, please enable
javascript in your browser, [ here is how
](https://www.google.com/support/bin/answer.py?answer=23852)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which noise values are drawn.  ](spec?ver=1.11&elem=sensor#noise_mean)


**Required:** 1
**Type:** string
**Default:** __default__
**Description:** A unique name for the sensor. This name must not match
another model in the model.  ](spec?ver=1.11&elem=sensor#sensor_name)


**Required:** 1
**Type:** double
**Default:** 1
**Description:** This number is multiplied by samples to determine the number
of range data points returned. If resolution is less than one, range data is
interpolated. If resolution is greater than one, range data is averaged.
](spec?ver=1.11&elem=sensor#horizontal_resolution)


|  bool active
---
protected  inherited

True if sensor generation is active.


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_stddev)


//////////////////////////////////////////////////
sdf::ElementPtr Sensor::SDF() const
{
  return this->dataPtr->sdf;
}
//////////////////////////////////////////////////
SensorId Sensor::Id() const
{
  return this->dataPtr->id;
}
//////////////////////////////////////////////////
std::string Sensor::Name() const
{
  return this->dataPtr->name;
}
//////////////////////////////////////////////////
std::string Sensor::FrameId() const
{
  return this->dataPtr->frame_id;
}
//////////////////////////////////////////////////
void Sensor::SetFrameId(const std::string &_frameId)
{
  this->dataPtr->frame_id = _frameId;
}
//////////////////////////////////////////////////
std::string Sensor::Topic() const
{
  return this->dataPtr->topic;
}
//////////////////////////////////////////////////
bool Sensor::SetTopic(const std::string &_topic)
{
  return this->dataPtr->SetTopic(_topic);
}
//////////////////////////////////////////////////
bool SensorPrivate::SetTopic(const std::string &_topic)
{
  auto validTopic = transport::TopicUtils::AsValidTopic(_topic);
  if (validTopic.empty())


#####  <dynamic_bias_stddev> Element


**Required:** 0
**Type:**
**Default:**
**Description:** These elements are specific to the NAVSAT sensor.
](spec?ver=1.11&elem=sensor#sensor_navsat)


#####  <stddev> Element


#####  <max_angle> Element


#####  <dynamic_bias_correlation_time> Element


#####  <horizontal> Element


#####  <type> Element


**Required:** 1
**Type:** double
**Default:** 1
**Description:** This number is multiplied by samples to determine the number
of range data points returned. If resolution is not equal to one, range data
is interpolated.  ](spec?ver=1.11&elem=sensor#horizontal_resolution)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** The initial altitude in meters. This value can be used by a
sensor implementation to augment the altitude of the sensor. For example, if
you are using simulation instead of creating a 1000 m mountain model on which
to place your sensor, you could instead set this value to 1000 and place your
model on a ground plane with a Z height of zero.
](spec?ver=1.11&elem=sensor#air_pressure_reference_altitude)


|  Get the sensor's ID.  More...

msgs::IMU  |  [ ImuMessage
](classgazebo_1_1sensors_1_1ImuSensor.html#a9ce83fe75cf155bf7144c9ad1df7f441)
() const
|  Returns the imu message.  More...

virtual void  |  [ Init
](classgazebo_1_1sensors_1_1ImuSensor.html#a3e0b39e1326de703012f81ac2be7feba)
()
|  Initialize the IMU.  More...

virtual bool  |  [ IsActive
](classgazebo_1_1sensors_1_1ImuSensor.html#aa58bb55f74716e3435ae09ed212df26f)
() const
|  Returns true if sensor generation is active.  More...

[ common::Time ](classgazebo_1_1common_1_1Time.html) |  [ LastMeasurementTime
](classgazebo_1_1sensors_1_1Sensor.html#aaf95984a0edfdede754b56ed2aa1ab4e) ()
const
|  Return last measurement time.  More...

[ common::Time ](classgazebo_1_1common_1_1Time.html) |  [ LastUpdateTime
](classgazebo_1_1sensors_1_1Sensor.html#a029d505f617dc122b74a8098adbd0d4d) ()
const
|  Return last update time.  More...

ignition::math::Vector3d  |  [ LinearAcceleration
](classgazebo_1_1sensors_1_1ImuSensor.html#a299383b14c34056cb4ab4518770a691c)
(const bool _noiseFree=false) const
|  Returns the imu linear acceleration in the IMU sensor local frame.  More...

std::string  |  [ Name
](classgazebo_1_1sensors_1_1Sensor.html#aae12797b16ddf926c017dcad9305addc) ()
const
|  Get name.  More...

[ NoisePtr
](namespacegazebo_1_1sensors.html#a63589b4b647df1e01e9f2e5e30c95be1) |  [
Noise


#####  <noise> Element


**Required:** 0
**Type:**
**Default:**
**Description:** Angular velocity about the Z axis
](spec?ver=1.11&elem=sensor#angular_velocity_z)


#####  name  Attribute


#####  <max_frequency> Element


#####  <precision> Element


[ **asked 2022-08-16 11:22:08 -0500  ** ](/questions/405106/revisions/)


|  void ResetLastUpdateTime  |  (  |  |  )  |
---|---|---|---|---
inherited

Reset the lastUpdateTime to zero.


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian_quantized", the precision of output
signals. A value of zero implies infinite precision / no quantization.
](spec?ver=1.11&elem=sensor#noise_precision)


**Required:** 0
**Type:**
**Default:**
**Description:** The properties of the noise model that should be applied to
generated images  ](spec?ver=1.11&elem=sensor#camera_noise)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the correlation time in seconds of the
noise used to drive a process to model slow variations in a sensor bias. A
typical value, when used, would be on the order of 3600 seconds (1 hour).
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_correlation_time)


**Required:** 0
**Type:**
**Default:**
**Description:** These elements are specific to measurement-frame torque,
which is expressed in Newton-meters
](spec?ver=1.11&elem=sensor#force_torque_torque)


#####  <bias_mean> Element


**Required:** 0
**Type:** string
**Default:** __default__
**Description:** Name of the camera info
](spec?ver=1.11&elem=sensor#camera_camera_info_topic)


Time of last update.


**Required:** 1
**Type:** double
**Default:** 14.5
**Description:** Specifies the transmission power in dBm
](spec?ver=1.11&elem=sensor#transceiver_power)


**Required:** 1
**Type:**
**Default:**
**Description:** The properties of a sensor noise model.
](spec?ver=1.11&elem=sensor#vertical_position_noise)


[ ![ROS Answers logo](/m/ros/media/images/logoros.png?v=28) ](/questions/)


**Required:** 0
**Type:**
**Default:**
**Description:** ](spec?ver=1.11&elem=sensor#scan_vertical)


**Required:** 1
**Type:** double
**Default:** 100
**Description:** Far clipping plane  ](spec?ver=1.11&elem=sensor#clip_far)


Reimplemented in [ GpuRaySensor
](classgazebo_1_1sensors_1_1GpuRaySensor.html#a5c1570a89eb756891f9533b09124d37e)
, [ RaySensor
](classgazebo_1_1sensors_1_1RaySensor.html#a5c1570a89eb756891f9533b09124d37e)
, [ CameraSensor
](classgazebo_1_1sensors_1_1CameraSensor.html#a5c1570a89eb756891f9533b09124d37e)
, [ ForceTorqueSensor
](classgazebo_1_1sensors_1_1ForceTorqueSensor.html#a5c1570a89eb756891f9533b09124d37e)
, [ LogicalCameraSensor
](classgazebo_1_1sensors_1_1LogicalCameraSensor.html#a5c1570a89eb756891f9533b09124d37e)
, [ MultiCameraSensor
](classgazebo_1_1sensors_1_1MultiCameraSensor.html#a5c1570a89eb756891f9533b09124d37e)
, [ SonarSensor
](classgazebo_1_1sensors_1_1SonarSensor.html#a5c1570a89eb756891f9533b09124d37e)
, and [ WirelessTransceiver
](classgazebo_1_1sensors_1_1WirelessTransceiver.html#a5c1570a89eb756891f9533b09124d37e)
.


{
  this->dataPtr->nextUpdateTime = std::chrono::steady_clock::duration::zero();
  return true;
}
//////////////////////////////////////////////////
Sensor::~Sensor()
{
}
//////////////////////////////////////////////////
bool Sensor::Load(const sdf::Sensor &_sdf)
{
  const bool success = this->dataPtr->PopulateFromSDF(_sdf);
  if (!success)
    return false;
  auto sensorTopic = this->Topic();
  if (sensorTopic.empty())
    sensorTopic = "/" + this->Name();
  const auto rateTopic = sensorTopic + "/set_rate";
  if (!this->dataPtr->node.Advertise(rateTopic,
    &SensorPrivate::SetRate, this->dataPtr.get()))
  {
    gzerr << "Unable to create service server on topic["
           << rateTopic << "].\n";
    return false;
  }
  return true;
}
//////////////////////////////////////////////////
bool Sensor::Load(sdf::ElementPtr _sdf)
{
  if (!this->dataPtr->sdf)
  {
    this->dataPtr->sdf = _sdf->Clone();
  }
  else
    this->dataPtr->sdf->Copy(_sdf);
  sdf::Sensor sdfSensor;
  sdfSensor.Load(_sdf);
  return this->Load(sdfSensor);
}


#####  <mean> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** The tangential distortion coefficient p1
](spec?ver=1.11&elem=sensor#distortion_p1)


**Required:** 1
**Type:** string
**Default:** __default__
**Description:** Name of the shared library to load. If the filename is not a
full path name, the file will be searched for in the configuration paths.
](spec?ver=1.11&elem=sensor#plugin_filename)


**System description**


#####  <transceiver> Element


#####  <bias_stddev> Element


If I update imu_link pose data (by clicking again at imu_link field in
gzclient window), then z value is going to be even lower, then it's keeping
falling.


[ [ legend ](graph_legend.html) ]


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_stddev)


**Required:** 0
**Type:** double
**Default:** 2484
**Description:** Only a frequency range is filtered. Here we set the upper
bound (MHz).  ](spec?ver=1.11&elem=sensor#transceiver_max_frequency)


#####  <dynamic_bias_correlation_time> Element


**Required:** 0
**Type:** bool
**Default:** true
**Description:** Some IMU sensors rely on external filters to produce
orientation estimates. True to generate and output orientation data, false to
disable orientation data generation.
](spec?ver=1.11&elem=sensor#imu_enable_orientation)


**Required:** 0
**Type:**
**Default:**
**Description:** Angular velocity about the X axis
](spec?ver=1.11&elem=sensor#angular_velocity_x)


**Required:** 0
**Type:** double
**Default:** 1
**Description:** This number is multiplied by samples to determine the number
of range data points returned. If resolution is less than one, range data is
interpolated. If resolution is greater than one, range data is averaged.
](spec?ver=1.11&elem=sensor#vertical_resolution)


#####  <range> Element


**Required:** 0
**Type:**
**Default:**
**Description:** These elements are specific to a Magnetometer sensor.
](spec?ver=1.11&elem=sensor#sensor_magnetometer)


#####  <position_sensing> Element


**Required:** 0
**Type:**
**Default:**
**Description:** Force along the Y axis  ](spec?ver=1.11&elem=sensor#force_y)


#####  <radius> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which noise values are drawn.
](spec?ver=1.11&elem=sensor#noise_stddev)


##  Public Member Functions

---
|  [ ImuSensor
](classgazebo_1_1sensors_1_1ImuSensor.html#a66de38dd6ad3c996646f66e13311ffe6)
()
|  Constructor.  More...

virtual  |  [ ~ImuSensor
](classgazebo_1_1sensors_1_1ImuSensor.html#a1f5a733443da5b46db5bf9bc9cbf8494)
()
|  Destructor.  More...

ignition::math::Vector3d  |  [ AngularVelocity
](classgazebo_1_1sensors_1_1ImuSensor.html#a2894421052b9ad2a3dfe351d710179d0)
(const bool _noiseFree=false) const
|  Returns the angular velocity in the IMU sensor local frame.  More...

[ SensorCategory
](namespacegazebo_1_1sensors.html#a166beb8385a31979c4f08a85aabdd1da) |  [
Category
](classgazebo_1_1sensors_1_1Sensor.html#a4c8414b81f4cfc798118ecd1d4514039) ()
const
|  Get the category of the sensor.  More...

[ event::ConnectionPtr
](namespacegazebo_1_1event.html#a2d370e7ba9de036fe110e1f94a982773) |  [
ConnectUpdated
](classgazebo_1_1sensors_1_1Sensor.html#ad087607b9131bdd7e63ffa65908ad586)
(std::function< void()> _subscriber)
|  Connect a signal that is triggered when the sensor is updated.  More...

void  |  [ FillMsg
](classgazebo_1_1sensors_1_1Sensor.html#a83506841c325841af9d24d6e2ff2c052)
(msgs::Sensor &_msg)
|  fills a msgs::Sensor message.  More...

uint32_t  |  [ Id
](classgazebo_1_1sensors_1_1Sensor.html#a93077cf54536f212c3ab5a80c6c829c7) ()
const


sam_bot config is the same as in Nav2 tutorial:


#####  <mean> Element


#####  <min> Element


#####  <center> Element


Asked: ** 2022-08-16 11:22:08 -0500  **


#####  <stddev> Element


**Required:** 1
**Type:**
**Default:**
**Description:** The image size in pixels and format.
](spec?ver=1.11&elem=sensor#camera_image)


#####  <resolution> Element


#####  type  Attribute


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the correlation time in seconds of the
noise used to drive a process to model slow variations in a sensor bias. A
typical value, when used, would be on the order of 3600 seconds (1 hour).
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_correlation_time)


True if the sensor was updated.


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_mean)


**Required:** 1
**Type:** string
**Default:** none
**Description:** The type of noise. Currently supported types are: "none" (no
noise). "gaussian" (draw noise values independently for each measurement from
a Gaussian distribution). "gaussian_quantized" ("gaussian" plus quantization
of outputs (ie. rounding))  ](spec?ver=1.11&elem=sensor#noise_type)


#####  name  Attribute


Returns


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which noise values are drawn.  ](spec?ver=1.11&elem=sensor#noise_mean)


#####  <z> Element


**Required:** 0
**Type:** pose
**Default:** 0 0 0 0 0 0
**Description:** A pose (translation, rotation) expressed in the frame named
by @relative_to. The first three components (x, y, z) represent the position
of the element's origin (in the @relative_to frame). The rotation component
represents the orientation of the element as either a sequence of Euler
rotations (r, p, y), see http://sdformat.org/tutorials?tut=specify_pose, or as
a quaternion (x, y, z, w), where w is the real component.
](spec?ver=1.11&elem=sensor#camera_pose)


     [in]  |  _force  |  True if update is forced, false if not
---|---|---

Returns


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian_quantized", the precision of output
signals. A value of zero implies infinite precision / no quantization.
](spec?ver=1.11&elem=sensor#noise_precision)


     [ Common ](group__gazebo__common.html)
     [ Events ](group__gazebo__event.html)
     [ Math ](group__gazebo__math.html)
     [ Messages ](group__gazebo__msgs.html)
     [ Physics ](group__gazebo__physics.html)
     [ Rendering ](group__gazebo__rendering.html)
     [ Sensors ](group__gazebo__sensors.html)
     [ Transport ](group__gazebo__transport.html)


#####  <mean> Element


#####  <noise> Element


**Required:** 0
**Type:** double
**Default:** 277
**Description:** Y focal length for projection matrix(in pixels, overrides fy)
](spec?ver=1.11&elem=sensor#projection_p_fy)


|  [ SensorCategory
](namespacegazebo_1_1sensors.html#a166beb8385a31979c4f08a85aabdd1da) Category
|  (  |  |  )  |  const
---|---|---|---|---
inherited

Get the category of the sensor.


##  Constructor & Destructor Documentation


gazebo::sensors::ImuSensor::ImuSensor  |  (  |  |  )  |
---|---|---|---|---

Constructor.


#####  enabled  Attribute


#####  <visibility_mask> Element


**Required:** 0
**Type:**
**Default:**
**Description:** Noise parameters for horizontal position measurement, in
units of meters.  ](spec?ver=1.11&elem=sensor#position_sensing_horizontal)


#####  <dynamic_bias_correlation_time> Element


**Required:** 0
**Type:**
**Default:**
**Description:** Parameters related to the body-frame Y axis of the
magnetometer  ](spec?ver=1.11&elem=sensor#magnetometer_y)


**Required:** 1
**Type:**
**Default:**
**Description:** The properties of a sensor noise model.
](spec?ver=1.11&elem=sensor#pressure_noise)


**Required:** 0
**Type:** unsigned int
**Default:** 4294967295
**Description:** Visibility mask of a lidar. When (lidar's visibility_mask &
object's visibility_flags) evaluates to non-zero, the object will be visible
to the lidar.  ](spec?ver=1.11&elem=sensor#lidar_visibility_mask)


#####  <p_cy> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_stddev)


**Required:** 0
**Type:**
**Default:**
**Description:** Camera projection matrix P for overriding camera intrinsic
matrix K values so that users can configure P independently of K. This is
useful when working with stereo cameras where P may be different from K due to
the transform between the two cameras.
](spec?ver=1.11&elem=sensor#lens_projection)


#####  <dynamic_bias_stddev> Element


##  [ ![](gazebo_logo.png) ](index.html)


#####  <min_angle> Element


|  void gazebo::sensors::ImuSensor::Load  |  (  |  const std::string & |
__worldName_ ,
---|---|---|---
|  |  sdf::ElementPtr  |  __sdf_
|  )  |  |
protected  virtual

Load the sensor with SDF parameters.


#####  <precision> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian," the standard deviation of the Gaussian
distribution from which noise values are drawn.
](spec?ver=1.11&elem=sensor#noise_stddev)


#####  <grav_dir_x> Element


#####  <mean> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** Linear resolution of each lidar ray.
](spec?ver=1.11&elem=sensor#range_resolution)


](classgazebo_1_1sensors_1_1Sensor.html#ab5de71c38dc2a600888a42eda6ca5410) ()
const
|  Returns the name of the sensor parent.  More...

virtual [ math::Pose ](classgazebo_1_1math_1_1Pose.html) |  [ GetPose
](classgazebo_1_1sensors_1_1Sensor.html#a6c4de84005e99af5c504684a4370612d) ()
const
|  Get the current pose.  More...

std::string  |  [ GetScopedName
](classgazebo_1_1sensors_1_1Sensor.html#ac72410290be17f16a1a89f8e6b4b36b1) ()
const
|  Get fully scoped name of the sensor.  More...

virtual std::string  |  [ GetTopic
](classgazebo_1_1sensors_1_1Sensor.html#a64dd4b19d72b78ccbad3e12d0a5ca852) ()
const
|  Returns the topic name as set in SDF.  More...

std::string  |  [ GetType
](classgazebo_1_1sensors_1_1Sensor.html#aa7be454c35a74353c2efa01836cfc0e7) ()
const
|  Get sensor type.  More...

double  |  [ GetUpdateRate
](classgazebo_1_1sensors_1_1Sensor.html#a5a3d413536cbce3e0701411d891e91ba) ()
|  Get the update rate of the sensor.  More...

bool  |  [ GetVisualize
](classgazebo_1_1sensors_1_1Sensor.html#a53e68bbff62c67aac15b08df1c04add2) ()
const
|  Return true if user requests the sensor to be visualized via tag:
<visualize>true</visualize> in SDF.  More...

std::string  |  [ GetWorldName
](classgazebo_1_1sensors_1_1Sensor.html#a31bcd9efe47fbf274ce7fc4e040b6ae2) ()
const
|  Returns the name of the world the sensor is in.  More...

void  |  [ ResetLastUpdateTime


#####  <bias_stddev> Element


Linear acceleration.


**Required:** 1
**Type:**
**Default:**
**Description:** The properties of a sensor noise model.
](spec?ver=1.11&elem=sensor#vertical_noise)


#####  <topic> Element


Parameters


[ SLAM and AMCL conflict ](/question/416991/slam-and-amcl-conflict/)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which noise values are drawn.  ](spec?ver=1.11&elem=sensor#noise_mean)


True if visualized, false if not.


     [ Common ](group__gazebo__common.html)
     [ Events ](group__gazebo__event.html)
     [ Messages ](group__gazebo__msgs.html)
     [ Physics ](group__gazebo__physics.html)
     [ Rendering ](group__gazebo__rendering.html)
     [ Sensors ](group__gazebo__sensors.html)
     [ Transport ](group__gazebo__transport.html)


This function is called during [ Sensor::Update
](classgazebo_1_1sensors_1_1Sensor.html#a523c36734a3eca17f44ebed440a5ca5e
"Update the sensor. ") . And in turn, [ Sensor::Update
](classgazebo_1_1sensors_1_1Sensor.html#a523c36734a3eca17f44ebed440a5ca5e
"Update the sensor. ") is called by [ SensorManager::Update
](classgazebo_1_1sensors_1_1SensorManager.html#a2e8df6fbab72ec386c4f91a67bf6fb78
"Update all the sensors. ")


add a comment


#####  <stddev> Element


#####  <precision> Element


**Required:** 1
**Type:**
**Default:**
**Description:** The properties of a sensor noise model.
](spec?ver=1.11&elem=sensor#x_noise)


#####  <dynamic_bias_correlation_time> Element


|  std::string ParentName  |  (  |  |  )  |  const
---|---|---|---|---
inherited

Returns the name of the sensor parent.


[ ![iimata gravatar image](/upfiles/avatars/iimata/resized/32/BB8-robot-Star-
Wars_1024x768.jpg) ](/users/101281/iimata/)


    auto secs = std::chrono::duration_cast<std::chrono::duration<double>>(_now);
    this->PublishMetrics(secs);
  }
  if (!_force && this->dataPtr->updateRate > 0.0)
  {
    // Update the time the plugin should be loaded
    auto delta = std::chrono::duration_cast< std::chrono::milliseconds>
      (std::chrono::duration< double >(1.0 / this->dataPtr->updateRate));
    this->dataPtr->nextUpdateTime += delta;
    // Catch up to "now", if necessary.
    while (this->dataPtr->nextUpdateTime <= _now)
    {
      this->dataPtr->nextUpdateTime += delta;
    }
  }
  return result;
}
//////////////////////////////////////////////////
std::chrono::steady_clock::duration Sensor::NextDataUpdateTime() const
{
  return this->dataPtr->nextUpdateTime;
}
//////////////////////////////////////////////////
void Sensor::SetNextDataUpdateTime(
    const std::chrono::steady_clock::duration &_time)
{
  this->dataPtr->nextUpdateTime = _time;
}
/////////////////////////////////////////////////
void Sensor::AddSequence(gz::msgs::Header *_msg,
                         const std::string &_seqKey)
{
  std::string value = "0";
  if (this->dataPtr->sequences.find(_seqKey) == this->dataPtr->sequences.end())
    this->dataPtr->sequences[_seqKey] = 0;
  else
    value = std::to_string(++this->dataPtr->sequences[_seqKey]);
  // Set the value if a `sequence` key already exists.
  for (int index = 0; index < _msg->data_size(); ++index)
  {


**Required:** 1
**Type:** string
**Default:** __default__
**Description:** The type name of the sensor. By default, SDFormat supports
types air_pressure, air_speed, altimeter, camera, contact, boundingbox_camera,
boundingbox, custom, depth_camera, depth, force_torque, gps, gpu_lidar,
gpu_ray, imu, lidar, logical_camera, magnetometer, multicamera, navsat, ray,
rfid, rfidtag, rgbd_camera, rgbd, segmentation_camera, segmentation, sonar,
thermal_camera, thermal, wireless_receiver, and wireless_transmitter. The
"ray", "gpu_ray", and "gps" types are equivalent to "lidar", "gpu_lidar", and
"navsat", respectively. It is preferred to use "lidar", "gpu_lidar", and
"navsat" since "ray", "gpu_ray", and "gps" will be deprecated. The "ray",
"gpu_ray", and "gps" types are maintained for legacy support.
](spec?ver=1.11&elem=sensor#sensor_type)


#####  type  Attribute


#####  <near> Element


Name of sensor.


**Required:** 1
**Type:** string
**Default:** none
**Description:** The type of noise. Currently supported types are: "none" (no
noise). "gaussian" (draw noise values independently for each measurement from
a Gaussian distribution). "gaussian_quantized" ("gaussian" plus quantization
of outputs (ie. rounding))  ](spec?ver=1.11&elem=sensor#noise_type)


  if (!gz::math::lessOrNearEqual(this->sdfUpdateRate, 0.0))
  {
    if (gz::math::lessOrNearEqual(rate, 0.0))
    {
      gzerr << "Cannot set update rate of sensor " << this->name << " to zero "
             << "because the <update_rate> SDF element is non-zero."
             << std::endl;
      return;
    }
    // apply the upper rate limit from SDF
    else if (!gz::math::lessOrNearEqual(rate, this->sdfUpdateRate))
    {
      gzerr << "Trying to set update rate of sensor " << this->name << " to "
             << rate << ", but the maximum rate in <update_rate> SDF element "
             << "is " << this->sdfUpdateRate << ". Ignoring the request."
             << std::endl;
      return;
    }
  }
  gzdbg << "Setting update rate of sensor " << this->name << " to " << rate
         << " Hz" << std::endl;
  this->updateRate = rate;
}
//////////////////////////////////////////////////
gz::math::Pose3d Sensor::Pose() const
{
  return this->dataPtr->pose;
}
//////////////////////////////////////////////////
std::string Sensor::Parent() const
{
  return this->dataPtr->parent;
}
//////////////////////////////////////////////////
void Sensor::SetParent(const std::string &_parent)
{
  this->dataPtr->parent = _parent;
}
//////////////////////////////////////////////////
void Sensor::SetPose(const gz::math::Pose3d &_pose)


      z: 9.719326321457395
    linear_acceleration_covariance:
    - 0.00028900000000000003
    - 0.0
    - 0.0
    - 0.0
    - 0.00028900000000000003
    - 0.0
    - 0.0
    - 0.0
    - 0.00028900000000000003
    ---


**Required:** 0
**Type:** string
**Default:**
**Description:** Name of parent frame which the custom_rpy transform is
defined relative to. It can be any valid fully scoped Gazebo Link name or the
special reserved "world" frame. If left empty, use the sensor's own local
frame.  ](spec?ver=1.11&elem=sensor#custom_rpy_parent_frame)


#####  <measure_direction> Element


#####  <mean> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which noise values are drawn.
](spec?ver=1.11&elem=sensor#noise_stddev)


Returns


#####  <linear_acceleration> Element


X axis of the IMU is aligned with North, Y axis of the IMU is aligned with
East, Z axis of the IMU is aligned with Downward (gravity) direction.


#####  <far> Element


**Required:** 0
**Type:**
**Default:**
**Description:** Lens distortion to be applied to camera images. See
http://en.wikipedia.org/wiki/Distortion_(optics)#Software_correction
](spec?ver=1.11&elem=sensor#camera_distortion)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the correlation time in seconds of the
noise used to drive a process to model slow variations in a sensor bias. A
typical value, when used, would be on the order of 3600 seconds (1 hour).
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_correlation_time)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** Y translation for projection matrix (in pixels)
](spec?ver=1.11&elem=sensor#projection_ty)


**Required:** 1
**Type:** unsigned int
**Default:** 640
**Description:** The number of simulated rays to generate per complete laser
sweep cycle.  ](spec?ver=1.11&elem=sensor#horizontal_samples)


#####  <precision> Element


##  Member Data Documentation


#####  name  Attribute


#####  <bias_mean> Element


![Inheritance graph](classgazebo_1_1sensors_1_1ImuSensor__inherit__graph.png)


     [ Gazebo Website ](http://gazebosim.org)
     [ Wiki ](https://bitbucket.org/osrf/gazebo/wiki)
     [ Tutorials ](http://gazebosim.org/tutorials)
     [ Download ](http://gazebosim.org/download)
     [ Report Documentation Issues ](https://bitbucket.org/osrf/gazebo/issues/new)


The category of the sensor.


#####  <dynamic_bias_stddev> Element


like


|  [ common::Time ](classgazebo_1_1common_1_1Time.html) lastUpdateTime
---
protected  inherited

Time of the last update.


` #include < [ sensors/sensors.hh ](ImuSensor_8hh_source.html) > `


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_mean)


**Required:** 1
**Type:** int
**Default:** 240
**Description:** Height in pixels  ](spec?ver=1.11&elem=sensor#image_height)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian_quantized", the precision of output
signals. A value of zero implies infinite precision / no quantization.
](spec?ver=1.11&elem=sensor#noise_precision)


#####  <custom_function> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the noise
used to drive a process to model slow variations in a sensor bias.
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_stddev)


**Required:** 1
**Type:**
**Default:**
**Description:** ](spec?ver=1.11&elem=sensor#ray_scan)


[ Powered by Askbot version 0.10.2 ](http://askbot.com)


**Required:** 1
**Type:** string
**Default:** none
**Description:** The type of noise. Currently supported types are: "none" (no
noise). "gaussian" (draw noise values independently for each measurement from
a Gaussian distribution). "gaussian_quantized" ("gaussian" plus quantization
of outputs (ie. rounding))  ](spec?ver=1.11&elem=sensor#noise_type)


#####  rotation_format  Attribute


**Required:** 0
**Type:** double
**Default:** 0
**Description:** The radial distortion coefficient k1
](spec?ver=1.11&elem=sensor#distortion_k1)


#####  <sonar> Element


|  virtual void Load  |  (  |  const std::string & |  __worldName_ |  )  |
---|---|---|---|---|---
protected  virtual

Load the sensor with default parameters.


|  [ Ask Your Question ](/questions/ask/)
---|---|---|---

0


**Required:** 0
**Type:** unsigned int
**Default:** 4294967295
**Description:** Visibility mask of a ray sensor. When (rays' visibility_mask
& object's visibility_flags) evaluates to non-zero, the object will be visible
to the ray sensor.  ](spec?ver=1.11&elem=sensor#ray_visibility_mask)


#####  <save> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which noise values are drawn.  ](spec?ver=1.11&elem=sensor#noise_mean)


#####  <dynamic_bias_stddev> Element


     [in]  |  _hz  |  update rate of sensor.
---|---|---

void SetWorldToReferenceOrientation  |  (  |  const
ignition::math::Quaterniond & |  __orientation_ |  )  |
---|---|---|---|---|---

Sets the rotation transform from world frame to IMU's reference frame.


#####  <cutoff_angle> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which noise values are drawn.
](spec?ver=1.11&elem=sensor#noise_stddev)


#####  <mean> Element


#####  <type> Element


#####  <path> Element


#####  <precision> Element


{
  this->dataPtr->pose = _pose;
}
//////////////////////////////////////////////////
double Sensor::UpdateRate() const
{
  return this->dataPtr->updateRate;
}
//////////////////////////////////////////////////
void Sensor::SetUpdateRate(const double _hz)
{
  if (_hz < 0)
  {
    this->dataPtr->updateRate = 0;
  }
  else
  {
    this->dataPtr->updateRate = _hz;
  }
}
//////////////////////////////////////////////////
bool Sensor::Update(const std::chrono::steady_clock::duration &_now,
                  const bool _force)
{
  GZ_PROFILE("Sensor::Update");
  bool result = false;
  // Check if it's time to update
  if (_now < this->dataPtr->nextUpdateTime && !_force &&
      this->dataPtr->updateRate > 0)
  {
    return result;
  }
  // prevent update if not active, unless forced
  if (!this->dataPtr->active && !_force)
    return result;
  // Make the update happen
  result = this->Update(_now);
  // Publish metrics
  if (this->EnableMetrics())
  {


#####  <dynamic_bias_correlation_time> Element


|  virtual bool gazebo::sensors::ImuSensor::UpdateImpl  |  (  |  bool  |  |  )
|
---|---|---|---|---|---
protected  virtual

This gets overwritten by derived sensor types.


Returns


#####  <fun> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_mean)


#####  <min_frequency> Element


#####  <z> Element


**Required:** 0
**Type:**
**Default:**
**Description:** Parameters related to NAVSAT position measurement.
](spec?ver=1.11&elem=sensor#navsat_velocity_sensing)


#####  type  Attribute


**Required:** 0
**Type:** double
**Default:** 0.10000000000000001
**Description:** Near clipping plane for depth camera
](spec?ver=1.11&elem=sensor#clip_near)


ImuSensor Class Reference


|  uint32_t ParentId  |  (  |  |  )  |  const
---|---|---|---|---
inherited

Get the sensor's parent's ID.


Inherits [ Sensor ](classgazebo_1_1sensors_1_1Sensor.html) .


**Required:** 0
**Type:** string
**Default:** __default__
**Description:** An optional name for the camera.
](spec?ver=1.11&elem=sensor#camera_name)


**Required:** 1
**Type:** int
**Default:** 320
**Description:** Width in pixels  ](spec?ver=1.11&elem=sensor#image_width)


**Required:** 0
**Type:**
**Default:**
**Description:** Torque about the Z axis
](spec?ver=1.11&elem=sensor#torque_z)


#####  <x> Element


#####  <noise> Element


**Required:** 0
**Type:**
**Default:**
**Description:** Enable or disable saving of camera frames.
](spec?ver=1.11&elem=sensor#camera_save)


#####  <mean> Element


#####  <max> Element


**Required:** 1
**Type:** double
**Default:** 1
**Description:** Max range  ](spec?ver=1.11&elem=sensor#sonar_max)


#####  <stddev> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the noise
used to drive a process to model slow variations in a sensor bias.
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_stddev)


[ ![ gravatar image]() ]() [ ]() (  2024-04-18 13:44:04 -0500  )  edit


**Required:** 0
**Type:**
**Default:**
**Description:** These elements are specific to the lidar sensor.
](spec?ver=1.11&elem=sensor#sensor_lidar)


##  Related questions


|  Desired time between updates, set indirectly by [ Sensor::SetUpdateRate
](classgazebo_1_1sensors_1_1Sensor.html#ab690e2f1eb0abc5714d5b46728484138 "Set
the update rate of the sensor. ") .  More...

[ gazebo::physics::WorldPtr
](namespacegazebo_1_1physics.html#ac3c64bcc94673efe731c498c8421e1db) |  [
world
](classgazebo_1_1sensors_1_1Sensor.html#ac577ca57deec049c2ff582ec10696eed)
|  Pointer to the world.  More...

##  Detailed Description


Is that imu falling problem is just my local problem? Or anybody could
reproduce the same problem with unmodified Nav2 Getting started example? How
to resolve this issue i.e. how fix the imu_link properly to body_link?


If you could prepare a MWE repository with your model and launcher we could
check it out properly :)


##  Member Function Documentation


#####  <bias_stddev> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_stddev)


**Required:** 0
**Type:**
**Default:**
**Description:** Depth camera parameters
](spec?ver=1.11&elem=sensor#camera_depth_camera)


#####  type  Attribute


![image description](/upfiles/1660664452471522.png)


#####  <distortion> Element


|  [ common::Time ](classgazebo_1_1common_1_1Time.html) lastMeasurementTime
---
protected  inherited

Stores last time that a sensor measurement was generated; this value must be
updated within each sensor's UpdateImpl.


**Required:** 1
**Type:** string
**Default:** none
**Description:** The type of noise. Currently supported types are: "none" (no
noise). "gaussian" (draw noise values independently for each measurement from
a Gaussian distribution). "gaussian_quantized" ("gaussian" plus quantization
of outputs (ie. rounding))  ](spec?ver=1.11&elem=sensor#noise_type)


**Required:** 0
**Type:**
**Default:**
**Description:** These elements are specific to the GPS sensor.
](spec?ver=1.11&elem=sensor#sensor_gps)


**Required:** 1
**Type:**
**Default:**
**Description:** ](spec?ver=1.11&elem=sensor#scan_horizontal)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian," the standard deviation of the Gaussian
distribution from which noise values are drawn.
](spec?ver=1.11&elem=sensor#noise_stddev)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the correlation time in seconds of the
noise used to drive a process to model slow variations in a sensor bias. A
typical value, when used, would be on the order of 3600 seconds (1 hour).
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_correlation_time)


|  std::string Name  |  (  |  |  )  |  const
---|---|---|---|---
inherited

Get name.


#####  <p_fx> Element


[ edit ](/s/answers/405137/edit/) flag offensive  delete  [ link
](/question/405106/gazebo-imu-sensor-is-falling-down-in-nav2-getting-started-
example/?answer=405137#post-id-405137 "permanent link") more


#####  <noise> Element


Returns


  *[
              2022-08-16 11:22:08 -0500
             ]: 2022-08-16 11:22:08 -0500
  *[
              2022-08-18 19:30:19 -0500
             ]: 2022-08-18 19:30:19 -0500
  *[
              2022-08-17 03:31:20 -0500
             ]: 2022-08-17 03:31:20 -0500
  *[
              2022-08-17 03:36:43 -0500
             ]: 2022-08-17 03:36:43 -0500
  *[
             2022-08-18 19:32:55 -0500
            ]: 2022-08-18 19:32:55 -0500
  *[
             2022-08-19 07:18:30 -0500
            ]: 2022-08-19 07:18:30 -0500
  *[
             2022-08-19 07:19:00 -0500
            ]: 2022-08-19 07:19:00 -0500
  *[
             2022-08-19 07:35:43 -0500
            ]: 2022-08-19 07:35:43 -0500
  *[
             2022-08-19 08:28:25 -0500
            ]: 2022-08-19 08:28:25 -0500
  *[
        2022-08-16 11:22:08 -0500
       ]: 2022-08-16 11:22:08 -0500
  *[
        2024-04-18 13:44:04 -0500
       ]: 2024-04-18 13:44:04 -0500


[ about ](/about/) |  [ faq ](/faq/) |  [ help ](/help/ "help") |  [ privacy
policy ](/privacy/) |  [ terms of service ](/terms/)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian," the mean of the Gaussian distribution
from which noise values are drawn.  ](spec?ver=1.11&elem=sensor#noise_mean)


**Required:** 1
**Type:** double
**Default:** 0.10000000000000001
**Description:** Near clipping plane  ](spec?ver=1.11&elem=sensor#clip_near)


#####  <p1> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which noise values are drawn.  ](spec?ver=1.11&elem=sensor#noise_mean)


Maybe it was lack of something like?


|  bool Visualize  |  (  |  |  )  |  const
---|---|---|---|---
inherited

Return true if user requests the sensor to be visualized via tag:
<visualize>true</visualize> in SDF.


|  void SetUpdateRate  |  (  |  const double  |  __hz_ |  )  |
---|---|---|---|---|---
inherited

Set the update rate of the sensor.


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the noise
used to drive a process to model slow variations in a sensor bias.
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_stddev)


**Required:** 1
**Type:** double
**Default:** 1
**Description:** Far clipping distance of the view frustum
](spec?ver=1.11&elem=sensor#logical_camera_far)


Topic name.


#####  <precision> Element


#####  <cx> Element


#####  <dynamic_bias_correlation_time> Element


#####  <x> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which noise values are drawn.
](spec?ver=1.11&elem=sensor#noise_stddev)


Returns


**Required:** 0
**Type:**
**Default:**
**Description:** Noise parameters for horizontal velocity measurement, in
units of meters/second.
](spec?ver=1.11&elem=sensor#velocity_sensing_horizontal)


#####  <dynamic_bias_stddev> Element


[ Point cloud misaligned with gazebo sensor plugin ](/question/409868/point-
cloud-misaligned-with-gazebo-sensor-plugin/)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_stddev)


Parameters


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_mean)


##  Constructor & Destructor Documentation


#####  <mean> Element


#####  type  Attribute


[ math::Vector3 ](classgazebo_1_1math_1_1Vector3.html)
gazebo::sensors::ImuSensor::GetAngularVelocity  |  (  |  |  )  |  const
---|---|---|---|---

Returns the angular velocity.


[ How to properly use nav2_costmap_2d node ](/question/397026/how-to-properly-
use-nav2_costmap_2d-node/)


**Required:** 1
**Type:**
**Default:**
**Description:** The properties of a sensor noise model.
](spec?ver=1.11&elem=sensor#z_noise)


#####  <noise> Element


**Required:** 1
**Type:** double
**Default:** 2.5
**Description:** Specifies the antenna gain in dBi
](spec?ver=1.11&elem=sensor#transceiver_gain)


#####  <stddev> Element


#####  <angular_velocity> Element


#####  <bias_mean> Element


#####  <reference_altitude> Element


[ Publish dynamic TF with this->get_node_topics_interface() works in foxy but
not in humble. (passed non-default qos overriding options without providing a
parameters interface) ](/question/414157/publish-dynamic-tf-with-this-
get_node_topics_interface-works-in-foxy-but-not-in-humble-passed-non-default-
qos-overriding-options-without-providing-a/)


[ **answered 2022-08-17 03:31:20 -0500  ** ](/answers/405137/revisions/)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the correlation time in seconds of the
noise used to drive a process to model slow variations in a sensor bias. A
typical value, when used, would be on the order of 3600 seconds (1 hour).
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_correlation_time)


#####  <precision> Element


* [ bug ](/questions/scope:all/sort:activity-desc/tags:bug/page:1/)


#####  <horizontal> Element


#####  <max_angle> Element


    if (_msg->data(index).key() == "seq")
    {
      if (_msg->data(index).value_size() == 0)
        _msg->mutable_data(index)->add_value(value);
      else
        _msg->mutable_data(index)->set_value(0, value);
      return;
    }
  }
  // Otherwise, add the sequence key-value pair.
  gz::msgs::Header::Map *map = _msg->add_data();
  map->set_key("seq");
  map->add_value(value);
}
/////////////////////////////////////////////////
bool Sensor::IsActive() const
{
  return this->dataPtr->active;
}
/////////////////////////////////////////////////
void Sensor::SetActive(bool _active)
{
  this->dataPtr->active = _active;
}
//////////////////////////////////////////////////
bool Sensor::HasConnections() const
{
  return true;
}


* [ nav2_bringup ](/questions/scope:all/sort:activity-desc/tags:nav2_bringup/page:1/)


**Required:** 1
**Type:** unsigned int
**Default:** 1
**Description:** The number of simulated rays to generate per complete laser
sweep cycle.  ](spec?ver=1.11&elem=sensor#vertical_samples)


**Required:** 1
**Type:** string
**Default:** __default__
**Description:** The path name which will hold the frame data. If path name is
relative, then directory is relative to current working directory.
](spec?ver=1.11&elem=sensor#save_path)


[ ImuSensor ](classgazebo_1_1sensors_1_1ImuSensor.html) |  (  |  |  )  |
---|---|---|---|---

Constructor.


**Required:** 0
**Type:** double
**Default:** 0
**Description:** The frequency at which the sensor data is generated. If left
unspecified, the sensor will generate data every cycle.
](spec?ver=1.11&elem=sensor#sensor_update_rate)


     _orientation  |  rotation from world frame to imu reference frame.
---|---

|  virtual std::string Topic  |  (  |  |  )  |  const
---|---|---|---|---
virtual  inherited

Returns the topic name as set in SDF.


#####  <mean> Element


Parameters


##  Stats


**Required:** 0
**Type:** string
**Default:** 2d
**Description:** The boundingbox type of the boundingbox camera. Valid options
are: - 2d | visible_2d | visible_box_2d: a visible 2d box mode which provides
axis aligned 2d boxes on the visible parts of the objects - full_2d |
full_box_2d: a full 2d box mode which provides axis aligned 2d boxes that
fills the object dimentions, even if it has an occluded part - 3d: a 3d mode
which provides oriented 3d boxes  ](spec?ver=1.11&elem=sensor#camera_box_type)


#####  <camera> Element


**Required:** 1
**Type:** string
**Default:** stereographic
**Description:** Type of the lens mapping. Supported values are gnomonical,
stereographic, equidistant, equisolid_angle, orthographic, custom. For
gnomonical (perspective) projection, it is recommended to specify a
horizontal_fov of less than or equal to 90°
](spec?ver=1.11&elem=sensor#lens_type)


virtual bool  |  [ IsActive
](classgazebo_1_1sensors_1_1ImuSensor.html#ad768410e66873491788d7ea52fe208dc)
()
|  Returns true if sensor generation is active.  More...

void  |  [ SetReferencePose
](classgazebo_1_1sensors_1_1ImuSensor.html#a9fbf67c08cc255398d061a4f74e96d74)
()
|  Sets the current pose as the IMU reference pose.  More...

![-](closed.png) Public Member Functions inherited from [
gazebo::sensors::Sensor ](classgazebo_1_1sensors_1_1Sensor.html)
|  [ Sensor
](classgazebo_1_1sensors_1_1Sensor.html#a7eeb485222cf2a1ec541e060d10f7bee) ( [
SensorCategory
](namespacegazebo_1_1sensors.html#a6358b5db68197314fc06924102e4b7fb) _cat)
|  Constructor.  More...

virtual  |  [ ~Sensor
](classgazebo_1_1sensors_1_1Sensor.html#ae9bd6994ecced3e11b567fc48c610eee) ()
|  Destructor.  More...

template<typename T >
[ event::ConnectionPtr
](namespacegazebo_1_1event.html#ab7d29de03846af7dd2ef8b4f09587fc7) |  [
ConnectUpdated
](classgazebo_1_1sensors_1_1Sensor.html#a504a494bb2e3bedec98c1ec76d0d050f) (T
_subscriber)
|  Connect a signal that is triggered when the sensor is updated.  More...

void  |  [ DisconnectUpdated
](classgazebo_1_1sensors_1_1Sensor.html#a84681d8d7aefd1e60cfe9a0d49a71f0c) ( [
event::ConnectionPtr
](namespacegazebo_1_1event.html#ab7d29de03846af7dd2ef8b4f09587fc7) &_c)
|  Disconnect from a the updated signal.  More...

void  |  [ FillMsg
](classgazebo_1_1sensors_1_1Sensor.html#ac526797ef27e4a6717c469497fe589d5)
(msgs::Sensor &_msg)
|  fills a msgs::Sensor message.  More...


#####  <bias_mean> Element


#####  <stddev> Element


     [in]  |  _worldName  |  Name of world to load from.
---|---|---

Reimplemented from [ gazebo::sensors::Sensor
](classgazebo_1_1sensors_1_1Sensor.html#a478b4dcdf67630e3e6048c09809f8063) .


See Also


#####  <dynamic_bias_correlation_time> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_mean)


**Required:** 1
**Type:** double
**Default:** 0
**Description:** Must be greater or equal to min_angle
](spec?ver=1.11&elem=sensor#horizontal_max_angle)


[ Sensors ](group__gazebo__sensors.html)


An IMU sensor.


#####  <horizontal> Element


|  virtual void gazebo::sensors::ImuSensor::Init  |  (  |  |  )  |
---|---|---|---|---
virtual

Initialize the IMU.


**Required:** 0
**Type:** int
**Default:** 256
**Description:** Resolution of the environment cube map used to draw the world
](spec?ver=1.11&elem=sensor#lens_env_texture_size)


**Required:** 0
**Type:**
**Default:**
**Description:** These elements are specific to body-frame linear
acceleration, which is expressed in meters per second squared
](spec?ver=1.11&elem=sensor#imu_linear_acceleration)


#####  <dynamic_bias_stddev> Element


Parameters


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which noise values are drawn.
](spec?ver=1.11&elem=sensor#noise_stddev)


](classgazebo_1_1sensors_1_1Sensor.html#ad54bc2b40e161d6101bfa5468377079a)
(const [ SensorNoiseType
](namespacegazebo_1_1sensors.html#a8569effcecad158424f2c50f24e93433) _type)
const
|  Get the sensor's noise model for a specified noise type.  More...

ignition::math::Quaterniond  |  [ Orientation
](classgazebo_1_1sensors_1_1ImuSensor.html#a66db2fd83d1d832184d888adc367115b)
() const
|  get orientation of the IMU relative to a reference pose Initially, the
reference pose is the boot up pose of the IMU, but user can call either
SetReferencePose to define current pose as the reference frame, or call
SetWorldToReferencePose to define transform from world frame to reference
frame.  More...

uint32_t  |  [ ParentId
](classgazebo_1_1sensors_1_1Sensor.html#abb919cf42d60424a480d3cd0f26ae949) ()
const
|  Get the sensor's parent's ID.  More...

std::string  |  [ ParentName
](classgazebo_1_1sensors_1_1Sensor.html#a90c529011d20e908d92aea7f91d7ede1) ()
const
|  Returns the name of the sensor parent.  More...

virtual ignition::math::Pose3d  |  [ Pose
](classgazebo_1_1sensors_1_1Sensor.html#ae2c6fd57bfe81802af49c5c470a8aa2f) ()
const
|  Get the current pose.  More...

void  |  [ ResetLastUpdateTime
](classgazebo_1_1sensors_1_1Sensor.html#ac5fea039522f8f2669e43b144705f854) ()
|  Reset the lastUpdateTime to zero.  More...

std::string  |  [ ScopedName
](classgazebo_1_1sensors_1_1Sensor.html#a0b789f926c46eac9f3f1376bfe039cab) ()
const
|  Get fully scoped name of the sensor.  More...

virtual void  |  [ SetActive


**Required:** 1
**Type:** string
**Default:** __default_topic__
**Description:** Topic on which contact data is published.
](spec?ver=1.11&elem=sensor#contact_topic)


#####  <vertical_velocity> Element


**Required:** 0
**Type:**
**Default:**
**Description:** Noise parameters for vertical position measurement, in units
of meters.  ](spec?ver=1.11&elem=sensor#position_sensing_vertical)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which noise values are drawn.  ](spec?ver=1.11&elem=sensor#noise_mean)


**Required:** 1
**Type:** string
**Default:** none
**Description:** The type of noise. Currently supported types are: "none" (no
noise). "gaussian" (draw noise values independently for each measurement from
a Gaussian distribution). "gaussian_quantized" ("gaussian" plus quantization
of outputs (ie. rounding))  ](spec?ver=1.11&elem=sensor#noise_type)


#####  <stddev> Element


#####  <bias_mean> Element


#####  <bias_stddev> Element


The documentation for this class was generated from the following file:


##  Question Tools


**Required:** 0
**Type:**
**Default:**
**Description:** Linear acceleration about the Y axis
](spec?ver=1.11&elem=sensor#linear_acceleration_y)


  * [ Specification ](/spec)
  * [ API ](/api)
  * [ Documentation ](/tutorials?)
  * [ Download ](/download)


     [in]  |  _noiseFree  |  True if the returned measurement should not use noise.
---|---|---

Returns


#####  <precision> Element


**Required:** 1
**Type:** unsigned int
**Default:** 640
**Description:** The number of simulated lidar rays to generate per complete
laser sweep cycle.  ](spec?ver=1.11&elem=sensor#horizontal_samples)


[ __ ](/questions/) |


**Required:** 0
**Type:** double
**Default:** 0
**Description:** The radial distortion coefficient k3
](spec?ver=1.11&elem=sensor#distortion_k3)


Last updated: **Aug 18 '22**


#####  <dynamic_bias_stddev> Element


The sensor's noise model for the given noise type


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_stddev)


#####  <type> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the noise
used to drive a process to model slow variations in a sensor bias.
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_stddev)


     [in]  |  _name  |  The sensor's parent's name.
---|---|---
[in]  |  _id  |  The sensor's parent's ID.

|  virtual void SetPose  |  (  |  const ignition::math::Pose3d & |  __pose_ |
)  |
---|---|---|---|---|---
virtual  inherited

Set the current pose.


#####  <y> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the correlation time in seconds of the
noise used to drive a process to model slow variations in a sensor bias. A
typical value, when used, would be on the order of 3600 seconds (1 hour).
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_correlation_time)


#####  <bias_stddev> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which noise values are drawn.
](spec?ver=1.11&elem=sensor#noise_stddev)


#####  Tree Key


#####  <power> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian_quantized", the precision of output
signals. A value of zero implies infinite precision / no quantization.
](spec?ver=1.11&elem=sensor#noise_precision)


[ ![iimata gravatar image](/upfiles/avatars/iimata/resized/16/BB8-robot-Star-
Wars_1024x768.jpg) ](/users/101281/iimata/) [ iimata ](/users/101281/iimata/)
(  2022-08-19 07:19:00 -0500  )  edit


#####  <torque> Element


**Required:** 1
**Type:** double
**Default:** 1.0469999999999999
**Description:** Horizontal field of view
](spec?ver=1.11&elem=sensor#camera_horizontal_fov)


**Required:** 0
**Type:**
**Default:**
**Description:** The properties of the noise model that should be applied to
generated scans  ](spec?ver=1.11&elem=sensor#ray_noise)


**Required:** 1
**Type:**
**Default:**
**Description:** The properties of a sensor noise model.
](spec?ver=1.11&elem=sensor#y_noise)


#####  <noise> Element


**Required:** 0
**Type:** string
**Default:** wireless
**Description:** Service set identifier (network name)
](spec?ver=1.11&elem=sensor#transceiver_essid)


#####  <resolution> Element


**Required:** 1
**Type:**
**Default:**
**Description:** The properties of a sensor noise model.
](spec?ver=1.11&elem=sensor#vertical_noise)


Returns


[ Robotics010 ](/users/12336/robotics010/)
13  ●  3  ●  6  ●  9


**Required:** 0
**Type:** string
**Default:**
**Description:** An optional frame id name to be used in the camera_info
message header.  ](spec?ver=1.11&elem=sensor#camera_optical_frame_id)


**Required:** 1
**Type:** string
**Default:** none
**Description:** The type of noise. Currently supported types are: "none" (no
noise). "gaussian" (draw noise values independently for each measurement from
a Gaussian distribution). "gaussian_quantized" ("gaussian" plus quantization
of outputs (ie. rounding))  ](spec?ver=1.11&elem=sensor#noise_type)


#####  <tx> Element


**Required:** 0
**Type:**
**Default:**
**Description:** Force along the X axis  ](spec?ver=1.11&elem=sensor#force_x)


#####  <dynamic_bias_correlation_time> Element


#####  <bias_stddev> Element


#####  <stddev> Element


An IMU sensor.


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian," the mean of the Gaussian distribution
from which noise values are drawn.  ](spec?ver=1.11&elem=sensor#noise_mean)


|  [ common::Time ](classgazebo_1_1common_1_1Time.html) LastMeasurementTime  |
(  |  |  )  |  const
---|---|---|---|---
inherited

Return last measurement time.


#####  <samples> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_stddev)


#####  <lidar> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the noise
used to drive a process to model slow variations in a sensor bias.
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_stddev)


#####  <air_speed> Element


True if active, false if not.


#####  <force_torque> Element


  * [ gazebo ](namespacegazebo.html)
  * [ sensors ](namespacegazebo_1_1sensors.html)
  * [ ImuSensor ](classgazebo_1_1sensors_1_1ImuSensor.html)


#####  <vertical_position> Element


**Required:** 0
**Type:** bool
**Default:** false
**Description:** Whether or not the euler angles are in degrees, otherwise
they will be interpreted as radians by default.
](spec?ver=1.11&elem=sensor#pose_degrees)


Links


#####  relative_to  Attribute


#####  <vertical> Element


**Required:** 0
**Type:** string
**Default:** child_to_parent
**Description:** Direction of the wrench measured by the sensor. The supported
options are: "parent_to_child" if the measured wrench is the one applied by
the parent link on the child link, "child_to_parent" if the measured wrench is
the one applied by the child link on the parent link.
](spec?ver=1.11&elem=sensor#force_torque_measure_direction)


##  [ ![](gazebo_logo.png) ](index.html)


SDFormat Version 1.4  SDFormat Version 1.5  SDFormat Version 1.6  SDFormat
Version 1.7  SDFormat Version 1.8  SDFormat Version 1.9  SDFormat Version 1.10
SDFormat Version 1.11


#####  <noise> Element


**Required:** 0
**Type:** string
**Default:**
**Description:** A name for the plugin.
](spec?ver=1.11&elem=sensor#plugin_name)


[ math::Quaternion ](classgazebo_1_1math_1_1Quaternion.html)
gazebo::sensors::ImuSensor::GetOrientation  |  (  |  |  )  |  const
---|---|---|---|---

get orientation of the IMU relative to the reference pose


[ none ](/questions/scope:all/sort:activity-desc/tags:none/page:1/) ×


**Required:** 0
**Type:** double
**Default:** 0
**Description:** Angle offset constant
](spec?ver=1.11&elem=sensor#custom_function_c3)


Parameters


Returns


#####  degrees  Attribute


#####  type  Attribute


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the correlation time in seconds of the
noise used to drive a process to model slow variations in a sensor bias. A
typical value, when used, would be on the order of 3600 seconds (1 hour).
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_correlation_time)


#####  <mean> Element


|  std::string Type  |  (  |  |  )  |  const
---|---|---|---|---
inherited

Get sensor type.


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_mean)


#####  <stddev> Element


* [ tutorials ](/questions/scope:all/sort:activity-desc/tags:tutorials/page:1/)


**Required:** 0
**Type:** double
**Default:** 2412
**Description:** Only a frequency range is filtered. Here we set the lower
bound (MHz).  ](spec?ver=1.11&elem=sensor#transceiver_min_frequency)


The documentation for this class was generated from the following file:


#####  <dynamic_bias_stddev> Element


#####  <precision> Element


#####  <altimeter> Element


#####  <max> Element


     [ Gazebo Website ](http://gazebosim.org)
     [ Tutorials ](http://gazebosim.org/tutorials)
     [ Download ](http://gazebosim.org/download)
     [ Report Documentation Issues ](https://bitbucket.org/osrf/gazebo/issues/new)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian_quantized", the precision of output
signals. A value of zero implies infinite precision / no quantization.
](spec?ver=1.11&elem=sensor#noise_precision)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the noise
used to drive a process to model slow variations in a sensor bias.
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_stddev)


[ Ros2 humble bandwidth usage limited to 3MiB/s
](/question/417709/ros2-humble-bandwidth-usage-limited-to-3mibs/)


#####  <samples> Element


    $ ros2 topic echo /imu --once
    header:
      stamp:
        sec: 6
        nanosec: 298000000
      frame_id: imu_link
    orientation:
      x: 0.0
      y: 0.0
      z: 0.0
      w: 1.0
    orientation_covariance:
    - 0.0
    - 0.0
    - 0.0
    - 0.0
    - 0.0
    - 0.0
    - 0.0
    - 0.0
    - 0.0
    angular_velocity:
      x: 3.674648740750363e-05
      y: -1.5758485404928543e-05
      z: 8.80878528687566e-05
    angular_velocity_covariance:
    - 4.0e-08
    - 0.0
    - 0.0
    - 0.0
    - 4.0e-08
    - 0.0
    - 0.0
    - 0.0
    - 4.0e-08
    linear_acceleration:
      x: -0.006802633792902658
      y: -0.0074336465388991375


**Required:** 0
**Type:**
**Default:**
**Description:** Definition of custom mapping function in a form of
r=c1*f*fun(theta/c2 + c3). See
https://en.wikipedia.org/wiki/Fisheye_lens#Mapping_function
](spec?ver=1.11&elem=sensor#lens_custom_function)


     [in]  |  _type  |  Index of the noise type. Refer to SensorNoiseType enumeration for possible indices
---|---|---

Returns


#####  <clip> Element


My distribution is ROS2 Humble with Gazebo 11.10.2. ROS2 Humble installed via
sudo apt install ros-humble-desktop as [ default way of installation
](https://docs.ros.org/en/humble/Installation/Ubuntu-Install-
Debians.html#install-ros-2-packages) . ROS2 Nav2 is installed with ...  (more)


     [in]  |  _worldName  |  Name of world to load from.
---|---|---

Reimplemented from [ Sensor
](classgazebo_1_1sensors_1_1Sensor.html#a59498969e3e295cdd4631fa193c0dfd0) .


#####  relative_to  Attribute


#####  <noise> Element


#####  <y> Element


#####  <resolution> Element


[ Pose() ](classgazebo_1_1sensors_1_1Sensor.html#ae2c6fd57bfe81802af49c5c470a8aa2f "Get the current pose. ")


  /// \param[in] _topic Topic sensor publishes data to.
  /// \return True if a valid topic was set.
  public: bool SetTopic(const std::string &_topic);
  /// \brief Publishes information about the performance of the sensor.
  /// \param[in] _now Current simulation time.
  public: void PublishMetrics(const std::chrono::duration<double> &_now);
  /// \brief Set the rate on which the sensor should publish its data. This
  /// method doesn't allow to set a higher rate than what is in the SDF.
  /// \param[in] _rate Maximum rate of the sensor. It is capped by the
  /// <update_rate> value from SDF, and zero is allowed only when zero is also
  /// in SDF.
  /// \return True if a valid topic was set.
  public: void SetRate(const gz::msgs::Double &_rate);
  /// \brief id given to sensor when constructed
  public: SensorId id;
  /// \brief Counter used to generate unique sensor identifiers.
  public: static SensorId idCounter;
  /// \brief name given to sensor when loaded
  public: std::string name;
  /// \brief name given to the sensor parent link
  public: std::string parent;
  /// \brief topic to send sensor data
  public: std::string topic;
  /// \brief Pose of the sensor
  public: gz::math::Pose3d pose;
  /// \brief Flag to enable publishing performance metrics.
  public: bool enableMetrics{false};
  /// \brief How many times the sensor will generate data per second (value from
  /// SDF.
  public: double sdfUpdateRate = 0.0;
  /// \brief How many times the sensor will generate data per second (currently
  /// used value).
  public: double updateRate = 0.0;
  /// \brief What sim time should this sensor update at
  public: std::chrono::steady_clock::duration nextUpdateTime
    {std::chrono::steady_clock::duration::zero()};
  /// \brief Last steady clock time reading from last Update call.
  public: std::chrono::time_point<std::chrono::steady_clock> lastRealTime;
  /// \brief Last sim time at Update call.
  public: std::chrono::duration<double> lastUpdateTime{0};


#####  <max_angle> Element


|  Load the sensor with default parameters.  More...

virtual bool  |  [ UpdateImpl
](classgazebo_1_1sensors_1_1ImuSensor.html#a26bd3d82a9e74f73ab917bb03ba9ea02)
(bool _force)
|  This gets overwritten by derived sensor types.  More...

![-](closed.png) Protected Member Functions inherited from [
gazebo::sensors::Sensor ](classgazebo_1_1sensors_1_1Sensor.html)
bool  |  [ NeedsUpdate
](classgazebo_1_1sensors_1_1Sensor.html#a41020464225ce9e4939fe4e08e7e835e) ()
|  Return true if the sensor needs to be updated.  More...

##  Additional Inherited Members

---
![-](closed.png) Protected Attributes inherited from [ gazebo::sensors::Sensor
](classgazebo_1_1sensors_1_1Sensor.html)
bool  |  [ active
](classgazebo_1_1sensors_1_1Sensor.html#a18e6a5bb1ddc1c87b7b76a7f4611fcf8)
|  True if sensor generation is active.  More...

std::vector< [ event::ConnectionPtr
](namespacegazebo_1_1event.html#ab7d29de03846af7dd2ef8b4f09587fc7) > |  [
connections
](classgazebo_1_1sensors_1_1Sensor.html#ad65f5a1467f1ddbe573189ad45da92eb)
|  All event connections.  More...

[ common::Time ](classgazebo_1_1common_1_1Time.html) |  [ lastMeasurementTime
](classgazebo_1_1sensors_1_1Sensor.html#a3d6d72d7a8b97fa74c61bfd21c1f45b8)
|  Stores last time that a sensor measurement was generated; this value must
be updated within each sensor's UpdateImpl.  More...

[ common::Time ](classgazebo_1_1common_1_1Time.html) |  [ lastUpdateTime
](classgazebo_1_1sensors_1_1Sensor.html#a709c5aedd125a474326d6e5c210e6f50)
|  Time of the last update.  More...

[ transport::NodePtr
](namespacegazebo_1_1transport.html#a800050a0aebc35c7660a689f21a3227f) |  [


* [ ros2 ](/questions/scope:all/sort:activity-desc/tags:ros2/page:1/)


#####  <mean> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the correlation time in seconds of the
noise used to drive a process to model slow variations in a sensor bias. A
typical value, when used, would be on the order of 3600 seconds (1 hour).
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_correlation_time)


#####  <f> Element


#####  <bias_mean> Element


#####  <dynamic_bias_correlation_time> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_mean)


[ tags ](/tags/) [ users ](/users/) [ badges ](/badges/)


An IMU sensor. [ More... ](classgazebo_1_1sensors_1_1ImuSensor.html#details)


#####  <stddev> Element


Reimplemented from [ gazebo::sensors::Sensor
](classgazebo_1_1sensors_1_1Sensor.html#a53290f320cd7593900c2ff66b8186619) .


|  void Update  |  (  |  const bool  |  __force_ |  )  |
---|---|---|---|---|---
inherited

Update the sensor.


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which noise values are drawn.
](spec?ver=1.11&elem=sensor#noise_stddev)


#####  <samples> Element


returns the orientation quaternion of the IMU relative to the imu reference pose.


**Required:** 0
**Type:** string
**Default:**
**Description:** Name of the topic that will trigger the camera if enabled
](spec?ver=1.11&elem=sensor#camera_trigger_topic)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_stddev)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian_quantized", the precision of output
signals. A value of zero implies infinite precision / no quantization.
](spec?ver=1.11&elem=sensor#noise_precision)


Time of last measurement.


* [ gazebo ](/questions/scope:all/sort:activity-desc/tags:gazebo/page:1/)


#####  Example


**Required:** 1
**Type:** double
**Default:** 0
**Description:** The maximum distance for each lidar ray.
](spec?ver=1.11&elem=sensor#range_max)


**Required:** 1
**Type:**
**Default:**
**Description:** The properties of a sensor noise model.
](spec?ver=1.11&elem=sensor#z_noise)


**Required:** 1
**Type:** string
**Default:** none
**Description:** The type of noise. Currently supported types are: "none" (no
noise). "gaussian" (draw noise values independently for each measurement from
a Gaussian distribution). "gaussian_quantized" ("gaussian" plus quantization
of outputs (ie. rounding))  ](spec?ver=1.11&elem=sensor#noise_type)


#####  <box_type> Element


Gazebo client doesn't show any imu_link with spawned sam_bot (though it's not
an issue here):


#####  <segmentation_type> Element


<gravity>false</gravity>


**Required:** 0
**Type:** double
**Default:** 0
**Description:** The tangential distortion coefficient p2
](spec?ver=1.11&elem=sensor#distortion_p2)


#####  <ray> Element


#####  <scan> Element


True when sensor should be updated.


**Required:** 0
**Type:**
**Default:**
**Description:** Noise parameters for the pressure data.
](spec?ver=1.11&elem=sensor#air_pressure_pressure)


#####  <max> Element


#####  <y> Element


**Required:** 0
**Type:** double
**Default:** 1
**Description:** Linear scaling constant
](spec?ver=1.11&elem=sensor#custom_function_c1)


#####  <vertical> Element


#####  <dynamic_bias_correlation_time> Element


/*
 * Copyright (C) 2017 Open Source Robotics Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
*/
#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable: 4005)
#pragma warning(disable: 4251)
#endif
#include <gz/msgs/double.pb.h>
#include <gz/msgs/performance_sensor_metrics.pb.h>
#ifdef _WIN32
#pragma warning(pop)
#endif
#include "gz/sensors/Sensor.hh"
#include <chrono>
#include <map>
#include <vector>
#include <gz/common/Console.hh>
#include <gz/common/Profiler.hh>
#include <gz/transport/Node.hh>
#include <gz/transport/TopicUtils.hh>
using namespace gz::sensors;
class gz::sensors::SensorPrivate
{
  /// \brief Populates fields from a <sensor> DOM
  public: bool PopulateFromSDF(const sdf::Sensor &_sdf);
  /// \brief Set topic where sensor data is published.


Imu message.


**Required:** 1
**Type:**
**Default:**
**Description:** The properties of a sensor noise model.
](spec?ver=1.11&elem=sensor#horizontal_noise)


**Required:** 1
**Type:** double
**Default:** 0
**Description:** XY axis skew  ](spec?ver=1.11&elem=sensor#intrinsics_s)


[ math::Vector3 ](classgazebo_1_1math_1_1Vector3.html)
gazebo::sensors::ImuSensor::GetLinearAcceleration  |  (  |  |  )  |  const
---|---|---|---|---

Returns the imu linear acceleration.


world_name::model_name::link_name::sensor_name.


#####  <noise> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_mean)


**Required:** 0
**Type:** vector2d
**Default:** 0.5 0.5
**Description:** The distortion center or principal point
](spec?ver=1.11&elem=sensor#distortion_center)


#####  <visibility_mask> Element


**Required:** 1
**Type:**
**Default:**
**Description:** The properties of a sensor noise model.
](spec?ver=1.11&elem=sensor#vertical_noise)


**Required:** 0
**Type:**
**Default:**
**Description:** Force along the Z axis  ](spec?ver=1.11&elem=sensor#force_z)


**Required:** 0
**Type:** int
**Default:** 4
**Description:** Value used for anti-aliasing
](spec?ver=1.11&elem=sensor#image_anti_aliasing)


**Required:** 0
**Type:** string
**Default:**
**Description:** Name of parent frame in which the grav_dir_x vector is
defined. It can be any valid fully scoped Gazebo Link name or the special
reserved "world" frame. If left empty, use the sensor's own local frame.
](spec?ver=1.11&elem=sensor#grav_dir_x_parent_frame)


|  bool NeedsUpdate  |  (  |  |  )  |
---|---|---|---|---
protected  inherited

Return true if the sensor needs to be updated.


**Required:** 0
**Type:**
**Default:**
**Description:** Noise parameters for vertical velocity
](spec?ver=1.11&elem=sensor#altimeter_vertical_velocity)


#####  <mean> Element


#####  <stddev> Element


#####  <bias_mean> Element


**Required:** 0
**Type:**
**Default:**
**Description:** These elements are specific to measurement-frame force, which
is expressed in Newtons  ](spec?ver=1.11&elem=sensor#force_torque_force)


#####  <min> Element


**Required:** 0
**Type:**
**Default:**
**Description:** Linear acceleration about the Z axis
](spec?ver=1.11&elem=sensor#linear_acceleration_z)


|  [ common::Time ](classgazebo_1_1common_1_1Time.html) updatePeriod
---
protected  inherited

Desired time between updates, set indirectly by [ Sensor::SetUpdateRate
](classgazebo_1_1sensors_1_1Sensor.html#ab690e2f1eb0abc5714d5b46728484138 "Set
the update rate of the sensor. ") .


     [in]  |  _force  |  True to force update, false otherwise.
---|---|---

|  virtual bool UpdateImpl  |  (  |  const bool  |  |  )  |
---|---|---|---|---|---
protected  virtual

This gets overwritten by derived sensor types.


#####  <dynamic_bias_correlation_time> Element


**Required:** 1
**Type:**
**Default:**
**Description:** The properties of a sensor noise model.
](spec?ver=1.11&elem=sensor#x_noise)


Returns


**Required:** 0
**Type:** bool
**Default:** false
**Description:** If the camera will be triggered by a topic
](spec?ver=1.11&elem=sensor#camera_triggered)


**Required:** 1
**Type:** string
**Default:** none
**Description:** The type of noise. Currently supported types are: "none" (no
noise). "gaussian" (draw noise values independently for each measurement from
a Gaussian distribution). "gaussian_quantized" ("gaussian" plus quantization
of outputs (ie. rounding))  ](spec?ver=1.11&elem=sensor#noise_type)


#####  <horizontal_fov> Element


#####  <z> Element


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which noise values are drawn.
](spec?ver=1.11&elem=sensor#noise_stddev)


#####  <p2> Element


](classgazebo_1_1sensors_1_1Sensor.html#a5da43ae93839929fc5cb8535f83200ec) ()
|  Reset the lastUpdateTime to zero.  More...

virtual void  |  [ SetActive
](classgazebo_1_1sensors_1_1Sensor.html#ad4aa4f0511a6175b3770b4e7bc15b1b0)
(bool _value)
|  Set whether the sensor is active or not.  More...

void  |  [ SetParent
](classgazebo_1_1sensors_1_1Sensor.html#a439b82375bf5ccafb6423c1fe35f8d5f)
(const std::string &_name, uint32_t _id)
|  Set the sensor's parent.  More...

void  |  [ SetUpdateRate
](classgazebo_1_1sensors_1_1Sensor.html#a2be83a9017389ebe8e88d43bcd928648)
(double _hz)
|  Set the update rate of the sensor.  More...

void  |  [ Update
](classgazebo_1_1sensors_1_1Sensor.html#a656b04321733a6ac969093e8e8372132)
(bool _force)
|  Update the sensor.  More...

##  Protected Member Functions

---
virtual void  |  [ Fini
](classgazebo_1_1sensors_1_1ImuSensor.html#a427875b9c29ba6f130e636c64ba7fd7a)
()
|  Finalize the sensor.  More...

void  |  [ Load
](classgazebo_1_1sensors_1_1ImuSensor.html#a2d18c5292fc4537ae920d7c9eaf1d4ae)
(const std::string &_worldName, sdf::ElementPtr _sdf)
|  Load the sensor with SDF parameters.  More...

virtual void  |  [ Load
](classgazebo_1_1sensors_1_1ImuSensor.html#a0f2ddfe50a45e8cd3cb902907dbcd2ab)
(const std::string &_worldName)


#####  <stddev> Element


|  [ gazebo::rendering::ScenePtr
](namespacegazebo_1_1rendering.html#afb4d94a778b7dfb146de03d1830ed8bb) scene
---
protected  inherited

Pointer to the Scene.


#####  <vertical> Element


#####  type  Attribute


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which noise values are drawn.  ](spec?ver=1.11&elem=sensor#noise_mean)


  * [ Sdf ](spec?ver=1.11&elem=sdf)
  * [ World ](spec?ver=1.11&elem=world)
  * [ Scene ](spec?ver=1.11&elem=scene)
  * [ State ](spec?ver=1.11&elem=state)
  * [ Physics ](spec?ver=1.11&elem=physics)
  * [ Light ](spec?ver=1.11&elem=light)
  * [ Actor ](spec?ver=1.11&elem=actor)
  * [ Model ](spec?ver=1.11&elem=model)
  * [ Link ](spec?ver=1.11&elem=link)
  * [ Sensor ](spec?ver=1.11&elem=sensor)
  * [ Joint ](spec?ver=1.11&elem=joint)
  * [ Collision ](spec?ver=1.11&elem=collision)
  * [ Visual ](spec?ver=1.11&elem=visual)
  * [ Material ](spec?ver=1.11&elem=material)
  * [ Geometry ](spec?ver=1.11&elem=geometry)


#####  <pressure> Element


Reimplemented from [ Sensor
](classgazebo_1_1sensors_1_1Sensor.html#a2cab2318072218e46466d00af0345fed) .


**Required:** 1
**Type:** string
**Default:** depths
**Description:** Type of output
](spec?ver=1.11&elem=sensor#depth_camera_output)


#####  <width> Element


#####  <dynamic_bias_stddev> Element


#####  <precision> Element


**Required:** 1
**Type:**
**Default:**
**Description:** The properties of a sensor noise model.
](spec?ver=1.11&elem=sensor#vertical_noise)


Reimplemented from [ Sensor
](classgazebo_1_1sensors_1_1Sensor.html#aa58bb55f74716e3435ae09ed212df26f) .


I'm trying to modify [ Nav2 Getting Started
](https://navigation.ros.org/getting_started/index.html) example to fuse
diff_drive odometry and imu data via robot_localization pkg, but I've noticed
that the simulated imu sensor outputs an inadequate data. Digging in showed,
that the imu sensor is actually detached from the base_link robot body and is
keeping falling down from the beginning.


[ Modules ](modules.html)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian_quantized", the precision of output
signals. A value of zero implies infinite precision / no quantization.
](spec?ver=1.11&elem=sensor#noise_precision)


Parameters


**Required:** *
**Type:**
**Default:**
**Description:** A plugin is a dynamically loaded chunk of code. It can exist
as a child of world, model, and sensor.
](spec?ver=1.11&elem=sensor#sensor_plugin)


The site is read-only. Please transition to use Robotics Stack Exchange


**Required:** 1
**Type:**
**Default:**
**Description:** ](spec?ver=1.11&elem=sensor#lidar_scan)


**Required:** 0
**Type:**
**Default:**
**Description:** Lens projection description
](spec?ver=1.11&elem=sensor#camera_lens)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the correlation time in seconds of the
noise used to drive a process to model slow variations in a sensor bias. A
typical value, when used, would be on the order of 3600 seconds (1 hour).
](spec?ver=1.11&elem=sensor#noise_dynamic_bias_correlation_time)


#####  type  Attribute


#####  <visibility_mask> Element


[ ROS2 humble no such file but installed confirmed
](/question/413937/ros2-humble-no-such-file-but-installed-confirmed/)


Name of the world.


**Required:** 1
**Type:**
**Default:**
**Description:** specifies range properties of each simulated ray
](spec?ver=1.11&elem=sensor#ray_range)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** Linear resolution of each ray.
](spec?ver=1.11&elem=sensor#range_resolution)


**Required:** 1
**Type:** string
**Default:** gaussian
**Description:** The type of noise. Currently supported types are: "gaussian"
(draw noise values independently for each beam from a Gaussian distribution).
](spec?ver=1.11&elem=sensor#noise_type)


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the standard deviation of the Gaussian
distribution from which noise values are drawn.
](spec?ver=1.11&elem=sensor#noise_stddev)


#####  parent_frame  Attribute


**Required:** 0
**Type:** vector3
**Default:** 0 0 0
**Description:** This field and parent_frame are used when localization is set
to CUSTOM. Orientation (fixed axis roll, pitch yaw) transform from
parent_frame to this IMU's reference frame. Some common examples are: - IMU
reports in its local frame on boot. IMU sensor frame is the reference frame.
Example: parent_frame="", custom_rpy="0 0 0" - IMU reports in Gazebo world
frame. Example sdf: parent_frame="world", custom_rpy="0 0 0" - IMU reports in
NWU frame. Uses SphericalCoordinates class to determine world frame in
relation to magnetic north and gravity; i.e. rotation between North-West-Up
and world (+X,+Y,+Z) frame is defined by SphericalCoordinates class. Example
sdf given world is NWU: parent_frame="world", custom_rpy="0 0 0" - IMU reports
in NED frame. Uses SphericalCoordinates class to determine world frame in
relation to magnetic north and gravity; i.e. rotation between North-East-Down
and world (+X,+Y,+Z) frame is defined by SphericalCoordinates class. Example
sdf given world is NWU: parent_frame="world", custom_rpy="M_PI 0 0" - IMU
reports in ENU frame. Uses SphericalCoordinates class to determine world frame
in relation to magnetic north and gravity; i.e. rotation between East-North-Up
and world (+X,+Y,+Z) frame is defined by SphericalCoordinates class. Example
sdf given world is NWU: parent_frame="world", custom_rpy="0 0 -0.5*M_PI" - IMU
reports in ROS optical frame as described in
http://www.ros.org/reps/rep-0103.html#suffix-frames, which is (z-forward,
x-left to right when facing +z, y-top to bottom when facing +z). (default
gazebo camera is +x:view direction, +y:left, +z:up). Example sdf:
parent_frame="local", custom_rpy="-0.5*M_PI 0 -0.5*M_PI"
](spec?ver=1.11&elem=sensor#orientation_reference_frame_custom_rpy)