11 program hopper#31
Conversation
…obot-Code into 11-program-hopper
…ive to PID tuning.
|
@aidnem Could you look at this branch/run SIM and see if/why PID tuning is completely unresponsive? |
|
I'm merging main into this branch to get the TestMode update. |
What do you mean, specifically? Check the documentation for the TalonFXConfig, which are used directly in coppercore. |
aidnem
left a comment
There was a problem hiding this comment.
I had a couple comments, hopefully these should help your sim become responsive once again.
|
@Samson560915 one thing you need to do here is Resolve the conversations. When you got comments, react to them, and if that concludes the conversation hit "Resolve conversation." Do not leave conversations open longer than required. |
…ocity instead of setting voltage, now the velocity doesn't change in SIM at all.
|
@Samson560915 do you want me to take care of merge conflicts for you? |
|
@aidnem Sure! That would be amazing! Thank you so much! |
|
@Samson560915 Done 👍 . Do you think we can get this merged tonight? I'd like to be "done with subsystems" as soon as possible. |
|
@aidnem I don't know, I did something and now it doesn't spin (velocity does not change). Do you know if I can simulate the velocity changing using the profiled control to spin the motor? |
|
@aidnem |
|
@Samson560915 all of your gains are 0 except for kA. this means that the only time it's applying any power is when the profile commands acceleration. Try tuning the PIDs in test mode. The general process is:
In between all gains changes, make sure you change your target RPM around to see how it responds to commands. |
|
@aidnem Is it supposed to be in test mode when I click |
|
Yes. you also have to select the right hopper test mode elastic. |
- also removed expoKV and expoKA and updated motion profile during tuning
|
@Samson560915 any progress on tuning PIDs for this? As a very optimistic and aggressive goal, I'd like to get this, the hood, the shooter, and the intake merged by the end of the day tomorrow, so we'd like to get this done as soon as physically possible. |
|
@godmar I hate stealing people's tasks, but do you think that, in the interest of getting this merged to un-block the merge of the hood and the shooter, I should just push my changes that I used to fix the test mode & tune PIDs? Edit: never mind, he pushed his changes so there's no longer any need. |
aidnem
left a comment
There was a problem hiding this comment.
This looks very good. I have a couple very quick changes and then I think it should be ready for merge.
| } | ||
|
|
||
| private boolean shouldIdle() { | ||
| return false; // TODO: ask if the hopper should be idling at all |
There was a problem hiding this comment.
It will eventually have to idle but that will come later when we write more of the action coordination stuff.
|
@Samson560915 as soon as you take care of these 4 things it should be good to go. |
…sary casts. Used newLeader method for SIM in InitSubsystems.
aidnem
left a comment
There was a problem hiding this comment.
Just 1 little thing left !
| "hopperKI": 0.0, | ||
| "hopperKD": 0.0, | ||
| "hopperMotionMagicCruiseVelocityRotationsPerSecond": 3.0, | ||
| "maxHopperSetpointVelocityRotationsPerSec": 5.0, |
There was a problem hiding this comment.
What's the difference between motion magic cruise velocity and max setpoint velocity? Couldn't you just remove the setpoint velocity?
|
@aidnem By the way, all of the tuning setpoint velocity stuff in in radians per sec, should I change that to rotations per second or does it not matter? |
|
@Samson560915 yeah I think RPM would be better, if you don't mind making that change really quick. |
aidnem
left a comment
There was a problem hiding this comment.
If you want to change to RPM, go for it, as that would be better. All my other comments are resolved.
|
@aidnem So, the MotorInputsAutoLogged class only logs in Radians per Second, so if you change everything else to rotations it looks really weird on AdvantageScope, do you want to be to convert the inputs also into rotations per second or do you think we just keep the radians per second? |
|
@Samson560915 if all values that you log end in their unit (e.g. "RPM" for RPM, like the field names in the AutoLogged inputs, "RadiansPerSecond"), AdvantageScope will automatically convert them and render them correctly when you put them on the same axis. Then, by clicking the 3 dots above that axis's set of logged fields, you can select the field to render (i believe it defaults to the unit of the first field that you added to the axis). |
|
@Samson560915 since we aren't really going to be tuning this mechanism precisely for speed (since load will be constantly changing with fuel entering and exiting the hopper) I think we might as well just merge this with radians/sec and then update to RPM later if we think it's really necessary. We can always just convert on AdvantageScope anyway. |
|
@aidnem Sure, so do you want to just merge now? |
|
Go for it. |






Follows turret subsystem. SIM runs, however it is not responsive to PID tuning. Constants need to be set and states need to be finished.