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

View Source

A position and orientation in 3D space.

Fields

  • position - Position as {:vec3, x, y, z} in metres
  • orientation - Orientation as {:quaternion, x, y, z, w}

Examples

alias BB.Message.Geometry.Pose
alias BB.Message.{Vec3, Quaternion}

{:ok, msg} = Pose.new(:end_effector, Vec3.new(1.0, 0.0, 0.5), Quaternion.identity())

Summary

Types

t()

@type t() :: %BB.Message.Geometry.Pose{
  orientation: BB.Message.Quaternion.t(),
  position: BB.Message.Vec3.t()
}

Functions

new(frame_id, attrs)

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

new(frame_id, position, orientation)

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

Create a new Pose message.

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

Examples

alias BB.Message.{Vec3, Quaternion}

{:ok, msg} = Pose.new(:base_link, Vec3.new(1.0, 2.0, 3.0), Quaternion.identity())