Skip to content
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

Allow different PID values for pre/post rotate and target vs max error #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

olliewalsh
Copy link

While FOLLOWING angle PID needs to be weaker so that lat PID dominates, in PRE/POST rotate it needs to be stronger.

Also make the max error the maximum, not the target, to allow the integral error to build.

While FOLLOWING angle PID needs to be weaker so that lat PID dominates,
in PRE/POST rotate it needs to be stronger.

Also make the max error the maximum, not the target, to allow the
integral error to build.
Comment on lines +28 to +31
grp_pid.add("kp_ang_rotate", double_t, 0, "KP for angle in pre/post rotate", 1.0, 0.0, 50.0)
grp_pid.add("ki_ang_rotate", double_t, 0, "KI for angle in pre/post rotate", 0.0, 0.0, 5.0)
grp_pid.add("ki_ang_max_rotate", double_t, 0, "KI windup for angle in pre/post rotate", 10.0, 0.0, 500.0)
grp_pid.add("kd_ang_rotate", double_t, 0, "KD for angle in pre/post rotate", 0.0, 0.0, 5.0)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intended that these values are the same as those without _rotate? So different settings would be possible, but not used by default?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly, didn't want to change current behaviour but I'm using higher values

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which values do you use then? I'll see if the target vs. error helps, but if not, it would be good to know which values to increase how much.

Copy link
Author

@olliewalsh olliewalsh May 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using completely different values as I've changed how the motors are controlled.
Looking at https://github.com/ClemensElflein/open_mower_ros/blob/main/src/open_mower/params/ftc_local_planner.yaml
I would start with kp_ang_rotate: 3.5, ki_ang_rotate: 0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants