Class Odometry2DTracker¶
Defined in File odometry_2d_tracker.hpp
Inheritance Relationships¶
Base Type¶
public tap::algorithms::odometry::Odometry2DInterface(Class Odometry2DInterface)
Class Documentation¶
-
class Odometry2DTracker : public tap::algorithms::odometry::Odometry2DInterface¶
Class for tracking the 2D position of an object over time.
The faster update() is called the better.
Public Functions
-
inline Odometry2DTracker(ChassisWorldYawObserverInterface *chassisYawObserver, ChassisDisplacementObserverInterface *chassisDisplacementObserver)¶
Note
It is essential that the chassisYawObserver and chassisDisplacementObserver use the same positive z-axis. The getter interfaces should enforce that they they use positive z-axis is up, but it’s worth noting here again.
- Parameters:
chassisYawObserver – [in] pointer to an object which implements the ChassisWorldYawObserverInterface. Should return the angle of the chassis forward vector relative to the x-axis of the field.
chassisDisplacementObserver – [in] pointer to an object which implements the ChassisDisplacementObserverInterface. Used for getting the chassis displacement
-
void update()¶
Run logic and update tracked chassis position. Call frequently for better results.
-
inline virtual modm::Location2D<float> getCurrentLocation2D() const final¶
-
- Returns:
The current odometry frame.
-
inline virtual modm::Vector2f getCurrentVelocity2D() const final¶
-
inline virtual float getYaw() const final¶
-
inline virtual uint32_t getLastComputedOdometryTime() const final¶
-
virtual void overrideOdometryPosition(const float positionX, const float positionY)¶
-
inline Odometry2DTracker(ChassisWorldYawObserverInterface *chassisYawObserver, ChassisDisplacementObserverInterface *chassisDisplacementObserver)¶