Skip to content

Generated ChassisSpeeds setpoints are not smooth #925

@mpaulonis

Description

@mpaulonis

Describe the bug
When simulating the AdvantageKit talonfx_swerve project and running the included Example Auto, the ChassisSpeeds setpoints generated by PathPlanner are not smooth. The screenshot from AdvantageScope shows what "not smooth" is.

PP_output_lumpy

The PP telemetry shows the same variation in the actual velocity, although the commanded velocity in telemetry appears to be ramping smoothly.

PP_lumpy_telemetry

The strange chassis velocity setpoints are even more obvious if you change the max velocity and acceleration on the Example Path to 1.0 each and simulate.

PP_output_lumpy_slow

I've seen the same non-smooth ChassisSpeeds setpoints on an actual robot. It's not just this simulation. However, it may be easier to track down the problem because it occurs in simulation.

To Reproduce
Steps to reproduce the behavior:

  1. Get the AdvantageKit talonfx_swerve project
  2. Simulate it on a computer with WPILib 2025.1.1 beta 2 installed.
  3. Select the Example Auto from the auto chooser and change the robot state to Autonomous.
  4. Use AdvantageScope to plot ChassisSpeeds setpoints and optionally measured values

Expected behavior
ChassisSpeeds setpoints should ramp smoothly throughout the path. The "hitches" seen in the screenshots should not be present.

Versions: (please complete the following information):

  • OS: Windows 11
  • GUI Version: v2025.0.0-beta-5
  • PPLib Version: 2025.0.0-beta-5
  • PPLib Language: Java

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions