Skip to content

Applying a SwerveRequest introduces a significant amount of GC spikes #94

@mjansen4857

Description

@mjansen4857

We started noticing significant amounts of GC spikes (or possibly just general lockups) in our loop times when running our teleop drive command, and tracked down the cause to applying a swerve request, specifically ApplyChassisSpeeds. Simply commenting out the drivetrain.setControl() call without changing any other code resolves the issue with our loop timings.

When running our code while enabled without setting the drive request, we see loop times hovering between 10-15ms, with only occasional noticeable GC spikes every second or so. Uncommenting the setControl call sees our loop times hovering at ~20ms with multiple 50ms+ spikes per second.

Not really sure what would be causing it to perform like this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions