-
Notifications
You must be signed in to change notification settings - Fork 41
PIDmod #361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
PIDmod #361
Conversation
Bonus: Adding PID D Gain Configuration to Motor Setup ScriptSeeing #325 made me realize that 1. Add to
|
|
The algorithm is listening... I was served this neat visualization for PID control today. It's a pretty cool way of describing this that I hadn't seen before, so I thought I would share (instead of twisting knobs, we're changing values through the |
|
Thanks a lot @brainwavecoder9! That's a really nice contribution! |
|
It seems that something is unexpectedly overwriting PID values back to factory defaults... I wouldn't expect this to happen during a "software only" install. ###================================================== I've run the sever and the reachy_mini_conversation_app, and reinstalled dependencies, and some other things... not sure what to blame, but was surprised to see this. I wouldn't necessarily say this is a 'bug' since we're in beta, but mentioning as an FYI in case it's not on your radar. I can track it down if helpful to isolate the cause. |
|
Not sure to exactly understand. Indeed, we should not write PIDs anywhere in the software at the moment.
I was thinking of maybe running the setup-motors tools at each daemon launch. But I'm still not sure if it's a good idea or not. |
|
Ah yes, this is ram-only so it resets on power cycle. I don't have a depth of experience with this so approach needs to be confirmed, but it sounds like the Dynamixel servos have an option to Backup current configuration (0x20) and then there's a Startup Configuration bit (address 60, bit 1 = 1) which can be set to restore from that backup. So, after flipping the bit for restore from config on startup the process would be "write the desired PID/other params to ram" (like we do with this script) and then just add the backup which would be something like That way when the motors power on the motor's own backup would be restored. Doing it this way would mean set once within the servo and persist indefinitely, whether at the factory or a later re-tune. |
Motor PID Configuration Tool
A utility script for reading and modifying PID gains on Reachy Mini robot motors to address motor oscillation issues.
Problem
This tool addresses motor oscillation by allowing adjustment of PID (Proportional-Integral-Derivative) control parameters. I was able to solve the problem by modifying the D (derivative/damping) gain on the base motor.
Quick Start
Read current values (no changes):
Add damping to reduce oscillation:
Set multiple gains:
Default Values
Initial values that I observed on my base motor (believed to be factory defaults):
Features
Recommendation
Use this tool to identify optimal PID values during testing, then pre-configure motors before shipping. End users should not need to adjust these values except in rare cases, as arbitrary changes could cause issues.
Usage Examples
See
python modify_motor_pid.py --helpfor complete documentation including: