Search documentation of bb

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

View Source

Force and torque in 3D space.

## Fields

- `force` - Force as `{:vec3, x, y, z}` in Newtons
- `torque` - Torque as `{:vec3, x, y, z}` in Newton-metres

## Examples

    alias BB.Message.Geometry.Wrench
    alias BB.Message.Vec3

    {:ok, msg} = Wrench.new(:end_effector, Vec3.new(0.0, 0.0, -10.0), Vec3.zero())

# Summary

## Types

t()

## Functions

new(frame_id, attrs)
new(frame_id, force, torque)

Create a new Wrench message.

# Types

# t()

    @type t() :: %BB.Message.Geometry.Wrench{
      force: BB.Message.Vec3.t(),
      torque: BB.Message.Vec3.t()
    }

# Functions

# new(frame_id, attrs)

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

# new(frame_id, force, torque)

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

Create a new Wrench message.

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

## Examples

    alias BB.Message.Vec3

    {:ok, msg} = Wrench.new(:end_effector, Vec3.new(0.0, 0.0, -10.0), Vec3.zero())