Struct Odometry

Struct Documentation

struct Odometry

An estimate of position, orientation, and velocity for an object or reference frame in 3D space.

Public Functions

FoxgloveError encode(uint8_t *ptr, size_t len, size_t *encoded_len)

Encoded the Odometry as protobuf to the provided buffer.

On success, writes the serialized length to *encoded_len. If the provided buffer has insufficient capacity, writes the required capacity to *encoded_len and returns FoxgloveError::BufferTooShort. If the message cannot be encoded, writes the reason to stderr and returns FoxgloveError::EncodeError.

Parameters:
  • ptr – the destination buffer. must point to at least len valid bytes.

  • len – the length of the destination buffer.

  • encoded_len – where the serialized length or required capacity will be written to.

Public Members

std::optional<Timestamp> timestamp

Timestamp of the message.

std::string frame_id

Reference coordinate frame (e.g. map or odom)

std::string body_frame_id

Coordinate frame of the body whose motion is being estimated (e.g. base_link)

std::optional<Pose> pose

Position and orientation of body_frame_id in frame_id.

std::optional<Vector3> linear_velocity

Linear velocity in m/s in body_frame_id.

std::optional<Vector3> angular_velocity

Angular velocity in rad/s in body_frame_id.

std::array<double, 36> pose_covariance = {}

Row-major 6x6 covariance matrix (x, y, z, rotation about x, rotation about y, rotation about z). Set to zero if unknown.

std::array<double, 36> velocity_covariance = {}

Row-major 6x6 covariance matrix (vx, vy, vz, angular rate about x, angular rate about y, angular rate about z). Set to zero if unknown.

std::vector<KeyValuePair> metadata

Additional user-provided metadata associated with the odometry message. Keys must be unique.

Public Static Functions

static Schema schema()

Get the Odometry schema.

The schema data returned is statically allocated.