Using acceleration feed forward with swerve

We are looking to improve our robots ability to track along a path in auto. We currently have a custom feedforward using kS and kV that is used when calculating drive motor output, but I’m not sure how acceleration feed forward can be used with our swerve drive.

The trajectory we are using from PathPlanner provides a chassis acceleration, but I’m not sure what’s the best way to transform that to module accelerations. The kinematics calculations provide the desired module velocity from chassis velocity, but not acceleration.

We thought of writing a custom method to calculate module accelerations from the chassis acceleration, or tracking the previous module velocity and use that to calculate module accelerations. How do other teams deal with acceleration feedforward? Or is it not significant and ignored?

1 Like

Or maybe use new velocity setpoint - measured velocity ? That would be more in the spirit of feed forward.

1 Like

SimpleMotorFeedforward.calculate(currentVelocity, nextVelocity, dtSeconds)

This may be of interest? I’m not sure as I haven’t worked with swerve before.

Accurately getting next velocity setpoint for each module would be the issue.

Each loop the holonometric drive controller calculates the chassis velocity setpoint from the current pose and the current desired trajectory state. We could pull the next velocity setpoint from the trajectory, but we don’t know the actual pose at that future time and it would still be a chassis velocity and not module velocities.

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