BB.Message.Geometry.Transform (bb v0.2.1)
View SourceA transformation in 3D space (translation and rotation).
Represents the relationship between two coordinate frames.
Fields
translation- Translation as{:vec3, x, y, z}in metresrotation- Rotation as{:quaternion, x, y, z, w}
Examples
alias BB.Message.Geometry.Transform
alias BB.Message.{Vec3, Quaternion}
{:ok, msg} = Transform.new(:base_link, Vec3.new(0.0, 0.0, 1.0), Quaternion.identity())
Summary
Types
@type t() :: %BB.Message.Geometry.Transform{ rotation: BB.Message.Quaternion.t(), translation: BB.Message.Vec3.t() }
Functions
@spec new( atom(), keyword() ) :: {:ok, BB.Message.t()} | {:error, term()}
@spec new(atom(), BB.Message.Vec3.t(), BB.Message.Quaternion.t()) :: {:ok, BB.Message.t()} | {:error, term()}
Create a new Transform message.
Returns {:ok, %BB.Message{}} with the transform as payload.
Examples
alias BB.Message.{Vec3, Quaternion}
{:ok, msg} = Transform.new(:base_link, Vec3.new(0.0, 0.0, 1.0), Quaternion.identity())