# Odometry

`Odometry` extends [TransformData](https://docs.luxonis.com/software-v3/depthai/depthai-components/messages/transform_data.md)
with a `velocity` field of type `Point3d`. It carries the tracked body's pose and linear velocity in one message. Velocity is
measured in metres per second and uses the same reference coordinate system as the pose translation.

The `transform` outputs of `BasaltVIO` and `RTABMapVIO` emit `Odometry`. The inherited `transform` field contains the pose;
`velocity.x`, `velocity.y`, and `velocity.z` contain the linear velocity components. A default-constructed message has an identity
pose and zero velocity.

## Reference

### dai::Odometry

Kind: class

Odometry message. Carries a pose and the linear velocity of the tracked body. The pose is inherited from TransformData . Velocity
is expressed in the same reference coordinate system as the pose translation and is measured in m/s.

#### Point3d velocity

Kind: variable

Linear velocity in the pose reference coordinate system, in m/s.

#### int64_t sequenceNum

Kind: variable

#### Timestamp ts

Kind: variable

#### Timestamp tsDevice

Kind: variable

#### std::optional< Timestamp > tsSystem

Kind: variable

#### Transform transform

Kind: variable

Transform .

#### Odometry()

Kind: function

Construct an Odometry message with an identity pose and zero velocity.

#### Odometry(const Transform & transform, const Point3d & velocity)

Kind: function

Construct an Odometry message. parameters: transform: Pose of the tracked body.; velocity: Linear velocity in the pose reference
coordinate system, in m/s.

#### Odometry(double x, double y, double z, double qx, double qy, double qz, double qw, const Point3d & velocity)

Kind: function

Construct an Odometry message from translation, quaternion, and velocity. parameters: x: Translation along the x axis, in meters.;
y: Translation along the y axis, in meters.; z: Translation along the z axis, in meters.; qx: Quaternion x component.; qy:
Quaternion y component.; qz: Quaternion z component.; qw: Quaternion w component.; velocity: Linear velocity in the pose reference
coordinate system, in m/s.

#### ~Odometry()

Kind: function

#### void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)

Kind: function

#### DatatypeEnum getDatatype()

Kind: function

Get the datatype of this specific message.

return: DatatypeEnum

#### DEPTHAI_SERIALIZE(Odometry, sequenceNum, ts, tsDevice, tsSystem, transform, velocity)

Kind: function

### Need assistance?

Head over to [Discussion Forum](https://discuss.luxonis.com/) for technical support or any other questions you might have.
