Ramsete Command not Following Path: Not Sure What to Tune

We are working on implementing the WPILIB RamseteCommand for autonomous, but are running into some issues. We are primarily following the Trajectory Tutorial, however when we attempted to run some paths for the first time the robot was nowhere close to getting to the right spot.

Two of the tests can be seen here:
Example S Curve in Tutorial
Drive Straight 1 Meter

When we ran the same path multiple times the robot also ended up in different spots each time as well.

We are not sure where we went wrong at this point.

Our characterization graphs can be seen below, they seem off but we are not sure what we did wrong when characterizing our drivetrain. We have two Falcons per side and a NavX, and our config file can be seen here. We had to manually switch the negative in the generated code to get the flipped encoder to work with the Falcons, but when we ran the tests the encoders read out the right sign values. We ran the tests for about 15ft approximately, all of them were at least 10 and the readings for distance it gave us seemed about right. The NavX has been tested and gives us the correct heading with positive values when turning counterclockwise to 180 and negative to -180 when turning clockwise. The EPR was found by spinning the wheel one full rotation and measuring encoder ticks. We were not able to manage to convert the ticks through our gearbox for some reason, I guess we aren’t great at dimensional analysis, but it seemed to be a very close approximation.



Our drivetrain subsytem is here. The getEncoderSpeed and Postion methods have all been tested and work, as well as the getHeading method. Everything is zeroed at the start of auto. We double checked we were in low gear so the ratio should be correct. Our constants are here and the command itself is here. The ENCODER_DPP was measured by pushing the robot forward a set amount of meters and dividing the encoder units by that number.

Is it just a simple case of needing to tune the P values, or have we messed up somewhere far more critical? Any advice would be appreciated.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.