Skip to content

Commit

Permalink
pbio/motor/servo_settings: Update EV3 control gains.
Browse files Browse the repository at this point in the history
These values were not updated since introducing numerous updates to the
controllers. These motors have similar torque capabilities as the SPIKE
medium and large motors, so use similar values.

Fixes pybricks/support#941
  • Loading branch information
laurensvalk committed Feb 23, 2023
1 parent 77951d4 commit da78224
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
- Fixed position based commands starting from the wrong position if the
previous command was a time based command that could not hit its
target ([support#956]).
- Fixed EV3 motors getting out of date with the updated motor
controllers ([support#941]) and ([support#955]).

[support#941]: https://github.com/pybricks/support/issues/941
[support#955]: https://github.com/pybricks/support/issues/955
[support#956]: https://github.com/pybricks/support/issues/956

## [3.3.0b1] - 2023-02-17
Expand Down
8 changes: 4 additions & 4 deletions lib/pbio/src/motor/servo_settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,16 +249,16 @@ pbio_error_t pbio_servo_load_settings(pbio_control_settings_t *ctl, pbio_observe
*model = &model_ev3_m;
ctl->speed_max = DEG_TO_MDEG(2000);
ctl->acceleration = DEG_TO_MDEG(8000);
ctl->pid_kp = 3000;
ctl->pid_kd = 30;
ctl->pid_kp = 15000;
ctl->pid_kd = 1800;
obs->feedback_gain_low = 45;
break;
case PBIO_IODEV_TYPE_ID_EV3_LARGE_MOTOR:
*model = &model_ev3_l;
ctl->speed_max = DEG_TO_MDEG(1600);
ctl->acceleration = DEG_TO_MDEG(3200);
ctl->pid_kp = 15000;
ctl->pid_kd = 250;
ctl->pid_kp = 40000;
ctl->pid_kd = 5000;
obs->feedback_gain_low = 40;
break;
#endif // PBIO_CONFIG_SERVO_EV3_NXT
Expand Down

0 comments on commit da78224

Please sign in to comment.