BB.Message.Geometry.Accel (bb v0.15.0)

View Source

Linear and angular acceleration in 3D space.

Fields

  • linear - Linear acceleration as BB.Vec3.t() in m/s²
  • angular - Angular acceleration as BB.Vec3.t() in rad/s²

Examples

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

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

Summary

Types

t()

@type t() :: %BB.Message.Geometry.Accel{
  angular: BB.Math.Vec3.t(),
  linear: BB.Math.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.Math.Vec3.t(), BB.Math.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.Math.Vec3

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