Search documentation of bb

# BB.Message.Geometry.Accel (bb v0.8.0)

View Source

Linear and angular acceleration in 3D space.

## Fields

- `linear` - Linear acceleration as `{:vec3, x, y, z}` in m/s²
- `angular` - Angular acceleration as `{:vec3, x, y, z}` in rad/s²

## Examples

    alias BB.Message.Geometry.Accel
    alias BB.Message.Vec3

    {:ok, msg} = Accel.new(:base_link, Vec3.new(0.0, 0.0, 9.81), Vec3.zero())

# Summary

## Types

t()

## Functions

new(frame_id, attrs)
new(frame_id, linear, angular)

Create a new Accel message.

# Types

# t()

    @type t() :: %BB.Message.Geometry.Accel{
      angular: BB.Message.Vec3.t(),
      linear: BB.Message.Vec3.t()
    }

# Functions

# new(frame_id, attrs)

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

# new(frame_id, linear, angular)

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

Create a new Accel message.

Returns `{:ok, %BB.Message{}}` with the acceleration as payload.

## Examples

    alias BB.Message.Vec3

    {:ok, msg} = Accel.new(:base_link, Vec3.new(0.0, 0.0, 9.81), Vec3.zero())