RaidZeroLib
Coroutine robot framework for VEX V5
Loading...
Searching...
No Matches
rz::TwoEncoderImuOdometry Class Referencefinal

A wheel that rolls forward and one that rolls sideways, with the heading from an inertial sensor. More...

#include <TwoEncoderImuOdometry.hpp>

Inheritance diagram for rz::TwoEncoderImuOdometry:
rz::Odometry rz::Component

Classes

struct  Config

Public Member Functions

 TwoEncoderImuOdometry (Sensor< Length > &forward, Sensor< Length > &sideways, Sensor< Rotation > &heading, Config config)
Public Member Functions inherited from rz::Odometry
const Pose & pose () const noexcept
void setPose (const Pose &pose) noexcept
 Sets where the robot is now, e.g. its starting position at the start of autonomous. distance() is unchanged.
Sensor< Rotation > & heading () noexcept
 The heading on the field (the pose's rotation), counterclockwise positive.
Sensor< Length > & distance () noexcept
 How far the robot has driven along its own forward axis in total; driving backward counts down.
Public Member Functions inherited from rz::Component
 Component (const Component &)=delete
Component & operator= (const Component &)=delete
 Component (Component &&)=delete
Component & operator= (Component &&)=delete
virtual ~Component ()
std::string_view name () const noexcept
 Used in log and error messages.

Protected Member Functions

Twist displacement () override
 How the robot moved in its own frame since the previous tick.
Protected Member Functions inherited from rz::Odometry
 Odometry (std::string_view name)
Protected Member Functions inherited from rz::Component
 Component (std::string_view name)

Additional Inherited Members

Static Public Member Functions inherited from rz::Component
static Task runAll ()
 Runs the loop of every component constructed so far, in construction order, until cancelled. rz::robot runs it; tests without rz::robot run it alongside their script.

Detailed Description

A wheel that rolls forward and one that rolls sideways, with the heading from an inertial sensor.

The pose tracks the robot's tracking center, the point the offsets are measured from: usually the center of rotation.

Constructor & Destructor Documentation

◆ TwoEncoderImuOdometry()

rz::TwoEncoderImuOdometry::TwoEncoderImuOdometry ( Sensor< Length > & forward,
Sensor< Length > & sideways,
Sensor< Rotation > & heading,
Config config )
Parameters
headingCounterclockwise positive, e.g. an InertialSensor.

Member Function Documentation

◆ displacement()

Twist rz::TwoEncoderImuOdometry::displacement ( )
nodiscardoverrideprotectedvirtual

How the robot moved in its own frame since the previous tick.

Implements rz::Odometry.


The documentation for this class was generated from the following file: