RaidZeroLib
Coroutine robot framework for VEX V5
Loading...
Searching...
No Matches
TwoEncoderImuOdometry.hpp
1#pragma once
2#include "RaidZeroLib/api/Geometry/Rotation.hpp"
3#include "RaidZeroLib/api/Hardware/Sensor.hpp"
4#include "RaidZeroLib/api/Odometry/Odometry.hpp"
5
6namespace rz {
7
14class TwoEncoderImuOdometry final : public Odometry {
15 public:
22
25
26 protected:
27 [[nodiscard]] Twist displacement() override;
28
29 private:
30 Sensor<Length>& forward;
31 Sensor<Length>& sideways;
32 Sensor<Rotation>& heading;
33 Config config;
34};
35
36} // namespace rz
Odometry(std::string_view name)
Definition Odometry.hpp:40
A reading from hardware, or computed from other sensors.
Definition Sensor.hpp:25
Differential motion (twist) in SE(2) space.
Definition Twist.hpp:16
Twist displacement() override
How the robot moved in its own frame since the previous tick.
TwoEncoderImuOdometry(Sensor< Length > &forward, Sensor< Length > &sideways, Sensor< Rotation > &heading, Config config)
au::QuantityD< au::Meters > Length
Definition Units.hpp:9
Definition DriverControl.hpp:11
Definition TwoEncoderImuOdometry.hpp:16
Length sidewaysOffset
How far the sideways wheel is in front of the tracking center; behind is negative.
Definition TwoEncoderImuOdometry.hpp:20
Length forwardOffset
How far the forward wheel is left of the tracking center; right is negative.
Definition TwoEncoderImuOdometry.hpp:18