# `BB.Message.Geometry.Wrench2D`
[🔗](https://github.com/beam-bots/bb/blob/main/lib/bb/message/geometry/wrench2d.ex#L5)

Force and torque within a plane.

The planar counterpart of `BB.Message.Geometry.Wrench`, and the effort of a
`:planar` joint. `fx`/`fy` are in the plane spanned by the joint's `axis`
normal, and `tau` is about that normal — the same basis
`BB.Math.Transform2D.to_transform/2` uses.

Using the 3D `Wrench` with the out-of-plane components zeroed would let a
producer emit a physically impossible out-of-plane force that nothing would
reject.

## Fields

- `fx` - In-plane force along the plane's first axis, in Newtons
- `fy` - In-plane force along the plane's second axis, in Newtons
- `tau` - Torque about the plane's normal, in Newton-metres

## Examples

    alias BB.Message.Geometry.Wrench2D

    {:ok, msg} = Wrench2D.new(:chassis, 12.0, 0.0, 0.4)

# `t`

```elixir
@type t() :: %BB.Message.Geometry.Wrench2D{fx: float(), fy: float(), tau: float()}
```

# `new`

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

# `new`

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

Create a new Wrench2D message.

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

## Examples

    {:ok, msg} = Wrench2D.new(:chassis, 12.0, 0.0, 0.4)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
