TinyRobotics
Loading...
Searching...
No Matches
IOdometryModel3D.h
1#pragma once
2#include <cmath>
3
4#include "TinyRobotics/units/Units.h"
5#include "TinyRobotics/coordinates/Coordinate.h"
6#include "TinyRobotics/coordinates/Orientation3D.h"
7
8namespace tinyrobotics {
9
10/**
11 * @brief Abstract interface for 3D odometry models.
12 * Provides access to current linear and angular velocities for Odometry3D.
13 */
14class IOdometryModel3D : public MessageHandler {
15 public:
16 virtual ~IOdometryModel3D() = default;
17 /**
18 * @brief Register a callback to be invoked on relevant events (e.g., input change, update).
19 * @param callback Function pointer with signature void callback(void* userData)
20 * @param userData User-provided pointer passed to the callback
21 */
22 virtual void registerCallback(void (*callback)(void*), void* userData) {}
23 /**
24 * @brief Get the current linear velocity (vx, vy, vz) in m/s (robot frame).
25 */
26 virtual void getLinearVelocity(float& vx, float& vy, float& vz) const = 0;
27 /**
28 * @brief Get the current angular velocity (wx, wy, wz) in rad/s (robot frame).
29 */
30 virtual void getAngularVelocity(float& wx, float& wy, float& wz) const = 0;
31};
32
33} // namespace tinyrobotics
Abstract interface for 3D odometry models. Provides access to current linear and angular velocities f...
Definition: IOdometryModel3D.h:14
virtual void getAngularVelocity(float &wx, float &wy, float &wz) const =0
Get the current angular velocity (wx, wy, wz) in rad/s (robot frame).
virtual void getLinearVelocity(float &vx, float &vy, float &vz) const =0
Get the current linear velocity (vx, vy, vz) in m/s (robot frame).
virtual void registerCallback(void(*callback)(void *), void *userData)
Register a callback to be invoked on relevant events (e.g., input change, update).
Definition: IOdometryModel3D.h:22