RaidZeroLib
Coroutine robot framework for VEX V5
Loading...
Searching...
No Matches
ThreeEncoderOdometry.hpp
1#pragma once
2#include "RaidZeroLib/api/Hardware/Sensor.hpp"
3#include "RaidZeroLib/api/Odometry/Odometry.hpp"
4
5namespace rz {
6
12class ThreeEncoderOdometry final : public Odometry {
13 public:
21
24
25 protected:
26 [[nodiscard]] Twist displacement() override;
27
28 private:
29 Sensor<Length>& left;
30 Sensor<Length>& right;
31 Sensor<Length>& sideways;
32 Config config;
33};
34
35} // namespace rz
Odometry(std::string_view name)
Definition Odometry.hpp:40
A reading from hardware, or computed from other sensors.
Definition Sensor.hpp:25
Twist displacement() override
How the robot moved in its own frame since the previous tick.
ThreeEncoderOdometry(Sensor< Length > &left, Sensor< Length > &right, Sensor< Length > &sideways, Config config)
Differential motion (twist) in SE(2) space.
Definition Twist.hpp:16
au::QuantityD< au::Meters > Length
Definition Units.hpp:9
Definition DriverControl.hpp:11
Definition ThreeEncoderOdometry.hpp:14
Length sidewaysOffset
Definition ThreeEncoderOdometry.hpp:19
Length trackWidth
Between the left and right wheels.
Definition ThreeEncoderOdometry.hpp:16