BB.Message.Geometry.Twist (bb v0.2.1)

View Source

Linear and angular velocity in 3D space.

Fields

  • linear - Linear velocity as {:vec3, x, y, z} in m/s
  • angular - Angular velocity as {:vec3, x, y, z} in rad/s

Examples

alias BB.Message.Geometry.Twist
alias BB.Message.Vec3

{:ok, msg} = Twist.new(:base_link, Vec3.new(1.0, 0.0, 0.0), Vec3.zero())

Summary

Types

t()

@type t() :: %BB.Message.Geometry.Twist{
  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 Twist message.

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

Examples

alias BB.Message.Vec3

{:ok, msg} = Twist.new(:base_link, Vec3.new(1.0, 0.0, 0.0), Vec3.zero())