# `BB.Message.Estimator.Pose`
[🔗](https://github.com/beam-bots/bb/blob/main/lib/bb/message/estimator/pose.ex#L5)

A 6-DOF pose estimate with optional covariance.

The canonical output payload for any estimator that publishes a fused
pose (e.g. an AHRS, an EKF combining IMU and odometry, a visual SLAM
front-end). Subscribers wanting fused poses specifically can filter on
this payload type to distinguish them from waypoints
(`BB.Message.Geometry.Pose`) or command goals.

## Fields

- `transform` - The pose as `BB.Math.Transform.t()` in the frame named
  by the wrapping message's `:frame_id`.
- `covariance` - Optional `BB.Math.Covariance6.t()` over the pose's
  6 DOF (translation x/y/z, rotation r/p/y). `nil` if the estimator
  does not produce a covariance.

## Examples

    alias BB.Message.Estimator.Pose
    alias BB.Math.{Transform, Covariance6}

    {:ok, msg} =
      Pose.new(:base_link,
        transform: Transform.identity(),
        covariance: Covariance6.diagonal([0.01, 0.01, 0.01, 0.001, 0.001, 0.001])
      )

# `t`

```elixir
@type t() :: %BB.Message.Estimator.Pose{
  covariance: nil | BB.Math.Covariance6.t(),
  transform: BB.Math.Transform.t()
}
```

# `new`

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

---

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