![]() |
Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
|
Namespace containing algorithms related to calculating drive powers, odometry, trajectories, kinematics, etc of differential drive (tank drive) robots. More...
Classes | |
struct | DrivePowers |
This struct is used to store the left and right drive powers for the robot. Storing these values in a struct allows for easy handling and access to said variables. More... | |
Enumerations | |
enum class | DifferentialControlMethod { eArcadeDrive , eCurvatureDrive } |
Functions | |
DrivePowers | CalculateTankDrive (double dLeftSpeed, double dRightSpeed, bool bSquareInputs=false) |
Tank drive inverse kinematics for differential drive robots. | |
DrivePowers | CalculateArcadeDrive (double dSpeed, double dRotation, const bool bSquareInputs=false) |
Arcade drive inverse kinematics for differential drive robots. | |
DrivePowers | CalculateCurvatureDrive (double dSpeed, double dRotation, const bool bAllowTurnInPlace, const bool bSquareInputs=false) |
Curvature drive inverse kinematics for differential drive robots. The rotation parameter controls the curvature of the robot's path rather than it's rate of heading change. This makes the robot more controllable at high speeds. | |
DrivePowers | CalculateMotorPowerFromHeading (double dGoalSpeed, double dGoalHeading, double dActualHeading, const DifferentialControlMethod eDriveMethod, controllers::PIDController &PID, const bool bSquareControlInput=false, const bool bCurvatureDriveAllowTurningWhileStopped=true) |
This function will calculate the drive powers for a given speed and absolute heading. The method used to get the drive powers is determined by the given enumerator (must be arcade or curvature). The turning rate or curvature is determined by the given PID controller which must be properly configured. | |
Namespace containing algorithms related to calculating drive powers, odometry, trajectories, kinematics, etc of differential drive (tank drive) robots.
Each drive function provides different inverse kinematic relations for a differential drive robot.
This library uses the NWU axes convention (North-West-Up as external reference in the world frame). The positive X axis points ahead, the positive Y axis points to the left, and the positive Z axis points up. Rotations follow the right-hand rule, so counterclockwise rotation around the Z axis is positive.
Inputs smaller then 0.02 will be set to 0, and larger values will be scaled so that the full range is still used. This deadband value can be changed with SetDeadband().
Referenced from: https://github.com/wpilibsuite/allwpilib/
|
strong |
|
inline |
Tank drive inverse kinematics for differential drive robots.
dLeftSpeed | - The left drive power input for the drive. (-1.0 - 1.0) |
dRightSpeed | - The right drive power input for the drive. (-1.0 - 1.0) |
bSquareInputs | - Decreases the input sensitivity at low input speeds. |
|
inline |
Arcade drive inverse kinematics for differential drive robots.
dSpeed | - Speed at which the robot should drive forward/backward. Forward is positive. (-1.0 - 1.0) |
dRotation | - The rotation rate of the robot. Clockwise is positive. (-1.0 - 1.0) |
bSquareInputs | - Decreases the input sensitivity at low input speeds. |
|
inline |
Curvature drive inverse kinematics for differential drive robots. The rotation parameter controls the curvature of the robot's path rather than it's rate of heading change. This makes the robot more controllable at high speeds.
dSpeed | - Speed at which the robot should drive forward/backwards. Forward is positive. (-1.0, 1.0) |
dRotation | - The normalized curvature of the robot. Clockwise is positive. (-1.0, 1.0) |
bAllowTurnInPlace | - Whether or not forward input is required to turn. True makes this control exactly like a car. |
bSquareInputs | - Decreases the input sensitivity at low input speeds. |
|
inline |
This function will calculate the drive powers for a given speed and absolute heading. The method used to get the drive powers is determined by the given enumerator (must be arcade or curvature). The turning rate or curvature is determined by the given PID controller which must be properly configured.
dGoalSpeed | - The goal speed for the robot. |
dGoalHeading | - The goal absolute heading for the robot. (0-360 degrees, CW positive.) |
dActualHeading | - The actual current heading of the robot. |
eDriveMethod | - The differential drive method to use for navigation. MUST NOT BE TANK. |
PID | - A reference to the PID controller to use for hitting the heading setpoint. |
bSquareControlInput | - Can provide smoother control at goal heading. |
bCurvatureDriveAllowTurningWhileStopped | - Allow DifferentialControlMethod::eCurvatureDrive to turn in-place. |