LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
threeEncoderSkidSteerModel.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
9
10namespace okapi {
12 public:
23 ThreeEncoderSkidSteerModel(std::shared_ptr<AbstractMotor> ileftSideMotor,
24 std::shared_ptr<AbstractMotor> irightSideMotor,
25 std::shared_ptr<ContinuousRotarySensor> ileftEnc,
26 std::shared_ptr<ContinuousRotarySensor> irightEnc,
27 std::shared_ptr<ContinuousRotarySensor> imiddleEnc,
28 double imaxVelocity,
29 double imaxVoltage);
30
36 std::valarray<std::int32_t> getSensorVals() const override;
37
41 void resetSensors() override;
42
43 protected:
44 std::shared_ptr<ContinuousRotarySensor> middleSensor;
45};
46} // namespace okapi
std::shared_ptr< ContinuousRotarySensor > middleSensor
std::valarray< std::int32_t > getSensorVals() const override
Read the sensors.
void resetSensors() override
Reset the sensors to their zero point.
ThreeEncoderSkidSteerModel(std::shared_ptr< AbstractMotor > ileftSideMotor, std::shared_ptr< AbstractMotor > irightSideMotor, std::shared_ptr< ContinuousRotarySensor > ileftEnc, std::shared_ptr< ContinuousRotarySensor > irightEnc, std::shared_ptr< ContinuousRotarySensor > imiddleEnc, double imaxVelocity, double imaxVoltage)
Model for a skid steer drive (wheels parallel with robot's direction of motion).