PIDF Velocity Control SparkMax Tuning and SmartDashboard

We are trying to use SparkMax motor controllers and the CANPIDController from the SparkMax library to have Velocity PIDF Control. How exactly do we go about testing/tuning? We created the CANPIDController and are able to tune it by constantly redeploying code, but I want to tune it from the SmartDashboard(or shuffleboard).

We are using C++ and also are confused on how to get data to output to the SmartDashboard continuously (i.e. always see velocity of a motor). I have looked through the SmartDashboard tutorials but I am having trouble applying that to our actual code. We are using the command-base template.

Take a look at the run tab in our Spark Max client. You can tune in real time without a roboRIO, just a single usb connector to a computer.

Thank you, I will give that a try.

If the mechanism you are programming for is a Drivetrain, Elevator, or Arm you might consider taking a look at the Robot Characterization tool. After following the instructions, it will spit out feedforward, P, and D values.

Are there any instructions for using the run tab for tuning? I couldn’t find any details about the client software (other than firmware updates) on the site.

The mechanism is a ball shooter, so it needs to maintain velocity using PIDF

check out this post. REV FRC 2020 Kickoff Updates

Great! I’ll try this out. It would be great to have this info on the web site as well :slight_smile:

Yup, we know. Its on our list :slight_smile:

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