BB.Message.Estimator.Odometry (bb v0.20.0)

Copy Markdown View Source

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
  )

Summary

Types

t()

@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()
}

Functions

new(frame_id, attrs)

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