TinyRobotics
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Odometry3D Class Reference

Tracks 3D position and orientation of a robot using velocity and angular rates. More...

#include <Odometry3D.h>

Collaboration diagram for Odometry3D:
Collaboration graph
[legend]

Public Member Functions

 Odometry3D (MessageSource &vehicle, IOdometryModel3D &model)
 
bool begin (Coordinate< float > initialPosition={0, 0, 0}, Orientation3D initialOrientation=Orientation3D())
 Initialize the odometry state.
 
void update ()
 Update the odometry state with new velocities and angular rates.
 
Coordinate< float > getPosition () const
 Get the current 3D position (meters)
 
Orientation3D getOrientation () const
 Get the current orientation as Orientation3D (yaw, pitch, roll in radians)
 
Distance getTotalDistance () const
 Get the total distance traveled.
 
Distance3D getLastDelta () const
 Get the last delta update (dx, dy, dz)
 

Protected Attributes

MessageSourcevehicle
 
IOdometryModel3Dmodel
 
Coordinate< float > position
 
Orientation3D orientation
 
float totalDistance = 0.0f
 
Distance3D lastDelta = Distance3D(0.0f, 0.0f, 0.0f, DistanceUnit::M)
 
uint32_t lastUpdateTimeMs = 0
 

Detailed Description

Tracks 3D position and orientation of a robot using velocity and angular rates.

This class provides simple 3D odometry for mobile robots, such as drones or underwater vehicles. It integrates linear velocity and angular velocity over time to estimate the robot's position (x, y, z) and orientation (yaw, pitch, roll) in meters and radians.

Inputs

Outputs

Limitations

Author
TinyRobotics contributors
Date
2026-03-31

Member Function Documentation

◆ begin()

bool begin ( Coordinate< float >  initialPosition = {0, 0, 0},
Orientation3D  initialOrientation = Orientation3D() 
)
inline

Initialize the odometry state.

Parameters
initialPositionThe starting position (x, y, z) in meters.
initialOrientationThe starting orientation (yaw, pitch, roll) in radians.
Returns
true on success

The documentation for this class was generated from the following file: