Search documentation of bb

# BB.Message.Sensor.Imu (bb v0.17.0)

Copy Markdown View Source

Inertial Measurement Unit data.

## Fields

- `orientation` - Orientation as `BB.Quaternion.t()`
- `angular_velocity` - Angular velocity as `BB.Vec3.t()` in rad/s
- `linear_acceleration` - Linear acceleration as `BB.Vec3.t()` in m/s²

## Examples

    alias BB.Message.Sensor.Imu
    alias BB.{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()

### Functions

new(frame_id, attrs)

## Types

# t()

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

## Functions

# new(frame_id, attrs)

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