REV Robotics 2024 / 2025

Any luck?

Does anyone have a basic MaxMotion example they are willing to share, or know where to find one? I am not a software guy by trade so I can get a little lost in the docs, but a good example that shows how to set parameters, configs, controllers goes a long way with me. It does not look like REV has updated any of their official example repos with these 2025 changes.

I am trying to update some of our code from last year and I am having a hard figuring out how to set up the controller and add configurations such a current limiting and p, i, d vales, set the reference points.

Looking at the Javadoc it seems like all configs have a config object. The PID settings are set using a ClosedLoopConfig.

Setting a reference point I think is the same as before, just using a different control type.

I’m still going through and updating our code.

I think I’ve mostly figured out the new configuration system, after being nerd-sniped by one of the students. Are there supposed to be examples or usage instructions anywhere, or are we supposed to reconstruct it from just the Javadocs?

Also, is there a list somewhere of the safe parameters (re: ResetMode.kNoResetSafeParameters)? I can guess at what they might be, but I can’t find a definition of the term “safe parameters” anywhere.

Why is it that SparkClosedLoopController.setReference takes a ControlType instead of the ControlType being part of ClosedLoopConfig? The units of kp/ki/kd/kf are related to a particular ControlType, but ControlType is specified through a different object, and at a different time (run-closed-loop-now vs. setup). I suppose the run vs. setup was the same previously, but it feels much weirder to now have this big config object with everything in it, including gains and slots, but the meaning of those gains is separate. Then, the meaning and control mode gets dropped in later. Wouldn’t it make more sense to assign gains and a control mode to a slot, then, at runtime, specify the slot and setpoint?

cfg.closedLoop
        .feedbackSensor(FeedbackSensor.kPrimaryEncoder)
        .pidf(p,i,d,f)
        .maxMotion
        .maxAcceleration(MetersPerSecondPerSecond.of(0).magnitude())
        .maxVelocity(MetersPerSecond.of(0).magnitude())
        .allowedClosedLoopError(Meters.of(0.001).magnitude())
        .positionMode(MAXMotionPositionMode.kMAXMotionTrapezoidal);
    motor.configure(cfg, ResetMode.kNoResetSafeParameters, PersistMode.kPersistParameters);
    motor.getClosedLoopController().setReference(Meters.of(1).magnitude(), ControlType.kMAXMotionPositionControl);

Is what i can tell. Ofcos this is for position not velocity, i think to change to velocity you just have to remove the positionMode and send kMAXMotionVelocity

3 Likes

For config, you might check out the 2025 update to the MaxSwerve template: MAXSwerve-Java-Template/src/main/java/frc/robot/Configs.java at 2025-update · REVrobotics/MAXSwerve-Java-Template · GitHub

2 Likes

Are you guys planning on adding support for jerk limits for position control?

Might’ve missed it, but I couldn’t find it in the docs

Also what about feed forward?

Is there a place to put kS, kV, kA, kG?

3 Likes

There have been a bunch of good questions in the thread about our software release. We are monitoring and will be posting some fixes, and updated documentation in the near future. Please feel free to post in this thread, if you have any specific things you think are bugs, please report them on Github.

We are also have a bunch of new products that we will be announcing in the coming weeks, so stay tuned.

25 Likes

Confirmed yes.

6 Likes

Found a comment to Noah

All due respect. These API comment are a bit of a meme around the shop.
SparkBaseConfig line 33.

// TODO(Noah): Look into finding a way to express “phase” that is more clear

Keep it up Noah you’ve got a cheerleader here. :slight_smile:

1 Like

And static-elevator vs. cosine-arm configurations as

Any more firm timeline on when these announcements might be?

Could influence purchasing decisions that teams want to make before the upcoming season…

11 Likes

Why does SparkSim accept a DCMotor if it already assumes you’re using another external physics sim?

I can see it is used to simulate current, but why not just separate that into a period function / move into the iterate function?

Hi! Is there an update on this as we approach the start of the season?

Thank you!

11 Likes

Might want to direct these questions to the REVLib discussion on the WPILib 2025beta GitHub repo.

2 Likes

Any updates on SRPP?

1 Like