BB.Message.Sensor.Imu (bb v0.2.1)

View Source

Inertial Measurement Unit data.

Fields

  • orientation - Orientation as {:quaternion, x, y, z, w}
  • angular_velocity - Angular velocity as {:vec3, x, y, z} in rad/s
  • linear_acceleration - Linear acceleration as {:vec3, x, y, z} in m/s²

Examples

alias BB.Message.Sensor.Imu
alias BB.Message.{Vec3, Quaternion}

{:ok, msg} = Imu.new(:imu_link,
  orientation: Quaternion.identity(),
  angular_velocity: Vec3.zero(),
  linear_acceleration: Vec3.new(0.0, 0.0, 9.81)
)

Summary

Types

t()

@type t() :: %BB.Message.Sensor.Imu{
  angular_velocity: BB.Message.Vec3.t(),
  linear_acceleration: BB.Message.Vec3.t(),
  orientation: BB.Message.Quaternion.t()
}

Functions

new(frame_id, attrs)

@spec new(
  atom(),
  keyword()
) :: {:ok, BB.Message.t()} | {:error, term()}