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

An odometry estimate: pose + twist with separate covariances.

Mirrors ROS `nav_msgs/Odometry`. The canonical output for IMU + wheel
odometry EKFs and any other fusion stage that publishes both a pose
and a velocity simultaneously.

## Fields

- `pose` - Pose component as `BB.Math.Transform.t()`.
- `twist` - Linear and angular velocity as `BB.Message.Geometry.Twist.t()`.
- `pose_covariance` - Optional `BB.Math.Covariance6.t()` over the pose.
- `twist_covariance` - Optional `BB.Math.Covariance6.t()` over the twist.

## Examples

    alias BB.Message.Estimator.Odometry
    alias BB.Message.Geometry.Twist
    alias BB.Math.{Transform, Vec3, Covariance6}

    twist_payload = %Twist{linear: Vec3.zero(), angular: Vec3.zero()}

    {:ok, msg} =
      Odometry.new(:base_link,
        pose: Transform.identity(),
        twist: twist_payload,
        pose_covariance: Covariance6.identity(),
        twist_covariance: nil
      )

# `t`

```elixir
@type t() :: %BB.Message.Estimator.Odometry{
  pose: BB.Math.Transform.t(),
  pose_covariance: nil | BB.Math.Covariance6.t(),
  twist: BB.Message.Geometry.Twist.t(),
  twist_covariance: nil | BB.Math.Covariance6.t()
}
```

# `new`

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

---

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