[wpilibc] Fix const-qualification in kinematics and constraints (#2478)

This commit is contained in:
Prateek Machiraju
2020-04-14 01:32:25 -04:00
committed by GitHub
parent a3a8472b82
commit e5935a4737
21 changed files with 71 additions and 66 deletions

View File

@@ -15,7 +15,7 @@ CentripetalAccelerationConstraint::CentripetalAccelerationConstraint(
units::meters_per_second_t CentripetalAccelerationConstraint::MaxVelocity(
const Pose2d& pose, units::curvature_t curvature,
units::meters_per_second_t velocity) {
units::meters_per_second_t velocity) const {
// ac = v^2 / r
// k (curvature) = 1 / r
@@ -33,7 +33,7 @@ units::meters_per_second_t CentripetalAccelerationConstraint::MaxVelocity(
TrajectoryConstraint::MinMax
CentripetalAccelerationConstraint::MinMaxAcceleration(
const Pose2d& pose, units::curvature_t curvature,
units::meters_per_second_t speed) {
units::meters_per_second_t speed) const {
// The acceleration of the robot has no impact on the centripetal acceleration
// of the robot.
return {};