-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
i_clamp use between ros parameters and dynamic_reconfigure in pid class is inconsistent #28
Comments
I'm the author of the dynamic_reconfigure PID functionality. I haven't run into that issue but also I've never really fully understood the i_clam functionality. You are probably right in identifying that bug - do you have the commit that fixes it so that I can look at it and understand a little better your issue? |
@ipa-fxm, thanks for proposing a fix. This is what I take from reading the code:
What needs to be checked now that #29 has been proposed is whether dynamic reconfigure updates of the min and max clamping values are getting picked up correctly. |
I guess changing |
There is just one more "inconsistency" where I don't know whether it was meant to be like this: Thus, having reconfigure running we end up with something like this:
Where the p, i, d were initially set from the yaml and p_gain, i_gain, d_gain are used by reconfigure, where p, i, d (and i_clamp) are not updated by reconfigure. Was there a reason for this or should this be harmonized? |
Thanks for the PR! |
@ipa-fxm its called See my dev note: |
Thanks @davetcoleman for clarification. So, shall we further harmonize or would renaming the reconfigure |
Dynamic reconfigure is only used by end-users manually, right? You don't really use it in the API I believe, in which case I don't see how it would hurt to change it for Indigo, or at latest ROS-J. +1 changing it in Indigo. We'd just need to update the documentation on the gazebosim.org website |
Almost. When you launch a node that has a dynamic reconfigure server, it tries to initialize the (dynamic) parameter values from the parameter server, otherwise it takes the defaults from the cfg file. So, setups which override the cfg defaults with rosparam settings would break. On the other hand, I expect most people that define gains via rosparam to use the old fashioned How about asking on the SIG if someone adheres to the above unlikely case, and if nobody comes out, we can consider fixing this in indigo. |
@ipa-fxm can you ask on the sig? I don't have time to get too involved in this, I just wanted to help with my past experience since i was original creator |
I decided to do the harmonization in a new PR (see #30).
As to the use-case @adolfo-rt mentioned: Or am I missing something? |
You have a point here, which only means good news :D |
+1 makes sense |
fix issue #28: i_clamp/i_clamp_min/i_clamp_max reconfigure inconsistency
Can close this with recent pull of #30 |
We just had a lengthy debugging session because we uploaded "i_clamp_min" and "i_clamp_max" to the parameter server (after using dynamic_reconfigure with these params for a while and also looking up the dynamic_reconfigure config, seeing these two parameters). Strangely, the parameters somehow always defaulted to 0 when running our controllers, no matter what value we set them to.
Turns out, on startup, only a "i_clamp" parameter is read from the parameter server. This was not set in our setup, so it defaulted to 0, which triggered setting "i_clamp_min" and "i_clamp_max" symmetrically (to -0.0/0.0) on the parameter server, too.
Would it make sense to also check for the existence of "i_clamp_min" and "i_clamp_max" on the parameter first on init? Appears this wouldn´t break existing code, but allow using the parameters without running into this annoyance.
The text was updated successfully, but these errors were encountered: