LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
tankmodel.hpp
Go to the documentation of this file.
1
7#ifndef _PHYSICAL_MODEL_TANK_MODEL_HPP_
8#define _PHYSICAL_MODEL_TANK_MODEL_HPP_
9
10#include <tuple>
11#include <vector>
12
14
15namespace squiggles {
16class TankModel : public PhysicalModel {
17 public:
25 TankModel(double itrack_width, Constraints ilinear_constraints);
26
28 constraints(const Pose pose, double curvature, double vel) override;
29
30 std::vector<double> linear_to_wheel_vels(double lin_vel,
31 double curvature) override;
32
33 std::string to_string() const override;
34
35 private:
36 double vel_constraint(const Pose pose, double curvature, double vel);
37 std::tuple<double, double>
38 accel_constraint(const Pose pose, double curvature, double vel) const;
39
40 double track_width;
41 Constraints linear_constraints;
42};
43} // namespace squiggles
44
45#endif
std::string to_string() const override
Constraints constraints(const Pose pose, double curvature, double vel) override
Calculate a set of stricter constraints for the path at the given state than the general constraints ...
std::vector< double > linear_to_wheel_vels(double lin_vel, double curvature) override
Converts a linear velocity and desired curvature into the component for each wheel of the robot.
TankModel(double itrack_width, Constraints ilinear_constraints)
Defines a model of a tank drive or differential drive robot.
Copyright 2020 Jonathan Bayless.