LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
odometry.hpp
Go to the documentation of this file.
1/*
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 */
6#pragma once
7
12
13namespace okapi {
14class Odometry {
15 public:
20 explicit Odometry() = default;
21
22 virtual ~Odometry() = default;
23
27 virtual void setScales(const ChassisScales &ichassisScales) = 0;
28
32 virtual void step() = 0;
33
41
48 virtual void setState(const OdomState &istate,
50
54 virtual std::shared_ptr<ReadOnlyChassisModel> getModel() = 0;
55
59 virtual ChassisScales getScales() = 0;
60};
61} // namespace okapi
virtual void step()=0
Do one odometry step.
Odometry()=default
Odometry.
virtual std::shared_ptr< ReadOnlyChassisModel > getModel()=0
virtual void setScales(const ChassisScales &ichassisScales)=0
Sets the drive and turn scales.
virtual OdomState getState(const StateMode &imode=StateMode::FRAME_TRANSFORMATION) const =0
Returns the current state.
virtual ~Odometry()=default
virtual ChassisScales getScales()=0
virtual void setState(const OdomState &istate, const StateMode &imode=StateMode::FRAME_TRANSFORMATION)=0
Sets a new state to be the current state.
StateMode
The mode for the OdomState calculated by Odometry.
Definition stateMode.hpp:12
@ FRAME_TRANSFORMATION
+x is forward, +y is right, 0 degrees is along +x