Trajectory constraint that limits acceleration based on available battery voltage and motor capabilities.
More...
#include <tank_voltage_constraint.h>
|
| | TankVoltageConstraint (units::LinearVelocityFeedforward Kv, units::LinearAccelerationFeedforward Ka, units::Voltage max_voltage, units::Length track_width) |
| | Constructs a TankVoltageConstraint from track width.
|
| | TankVoltageConstraint (units::LinearVelocityFeedforward Kv, units::LinearAccelerationFeedforward Ka, units::Voltage max_voltage, const TankKinematics &kinematics) |
| | Constructs a TankVoltageConstraint from TankKinematics.
|
| units::Velocity | max_velocity (const Pose2d &pose, units::Curvature curvature, units::Velocity velocity) const override |
| | Computes maximum allowed velocity.
|
| MinMax | min_max_acceleration (const Pose2d &pose, units::Curvature curvature, units::Velocity speed) const override |
| | Computes minimum and maximum allowed linear accelerations based on voltage limits.
|
| std::unique_ptr< TrajectoryConstraint > | clone () const override |
| | Creates an independent copy of this constraint.
|
Trajectory constraint that limits acceleration based on available battery voltage and motor capabilities.
◆ TankVoltageConstraint() [1/2]
| TankVoltageConstraint::TankVoltageConstraint |
( |
units::LinearVelocityFeedforward | Kv, |
|
|
units::LinearAccelerationFeedforward | Ka, |
|
|
units::Voltage | max_voltage, |
|
|
units::Length | track_width ) |
|
inline |
Constructs a TankVoltageConstraint from track width.
- Parameters
-
| Kv | Linear velocity feedforward constant. |
| Ka | Linear acceleration feedforward constant. |
| max_voltage | Maximum available voltage. |
| track_width | Robot track width (distance between left and right wheels). |
◆ TankVoltageConstraint() [2/2]
| TankVoltageConstraint::TankVoltageConstraint |
( |
units::LinearVelocityFeedforward | Kv, |
|
|
units::LinearAccelerationFeedforward | Ka, |
|
|
units::Voltage | max_voltage, |
|
|
const TankKinematics & | kinematics ) |
|
inline |
Constructs a TankVoltageConstraint from TankKinematics.
- Parameters
-
| Kv | Linear velocity feedforward constant. |
| Ka | Linear acceleration feedforward constant. |
| max_voltage | Maximum available voltage. |
| kinematics | Kinematics model for tank drive. |
◆ clone()
◆ max_velocity()
| units::Velocity TankVoltageConstraint::max_velocity |
( |
const Pose2d & | pose, |
|
|
units::Curvature | curvature, |
|
|
units::Velocity | velocity ) const |
|
inlineoverridevirtual |
Computes maximum allowed velocity.
- Parameters
-
| pose | 2D position and orientation. |
| curvature | Path curvature in rad/meter. |
| velocity | Candidate linear velocity. |
- Returns
- Constrained units::Velocity limit.
Implements TrajectoryConstraint.
◆ min_max_acceleration()
| MinMax TankVoltageConstraint::min_max_acceleration |
( |
const Pose2d & | pose, |
|
|
units::Curvature | curvature, |
|
|
units::Velocity | speed ) const |
|
inlineoverridevirtual |
Computes minimum and maximum allowed linear accelerations based on voltage limits.
- Parameters
-
| pose | 2D position and orientation. |
| curvature | Path curvature in rad/meter. |
| speed | Current scalar speed. |
- Returns
- MinMax acceleration bounds struct.
Implements TrajectoryConstraint.
The documentation for this class was generated from the following file: