[wpilib] Reset odometry in path following examples (#2859)

This commit is contained in:
Prateek Machiraju
2020-11-14 15:01:45 -05:00
committed by GitHub
parent 2ef67f20a7
commit cfac22b4c0
6 changed files with 22 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2019-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -103,6 +103,9 @@ frc2::Command* RobotContainer::GetAutonomousCommand() {
{&m_drive});
// Reset odometry to the starting pose of the trajectory.
m_drive.ResetOdometry(exampleTrajectory.InitialPose());
// no auto
return new frc2::SequentialCommandGroup(
std::move(mecanumControllerCommand),