Skip to content

Conversation

@olliewalsh
Copy link
Contributor

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
Contributor 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
Contributor 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

olliewalsh added a commit to olliewalsh/open_mower_ros that referenced this pull request Jun 8, 2025
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