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