-
Notifications
You must be signed in to change notification settings - Fork 132
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
rqt_reconfigure: Parameters values do not update if changed from keyboard #101
Comments
@bgromov Does this happen with all kind of data type? Or only with enum? I can't test right now because I don't have an access to any robot that uses |
I noticed that while changing parameters of Just tried the version from |
Changing position of slider with mouse wheel also makes no effect. Seems it reacts only to mouse Left-Click. |
bump |
The original maintainer is not actively working in this. And due to the many ticket pending for this plugin it has been marked to be experimental (https://github.com/ros-visualization/rqt_common_plugins/blob/groovy-devel/rqt_reconfigure/plugin.xml#L12). Please consider to provide pull requests and/or take over the maintainer role for this plugin. |
Please checkout the latest code from the repo and give it a try and provide feedback if the problem is solved for you, too. Until then I will mark this a closed. |
I am getting Could some one else try to reproduce the problem? To reproduce:
I did not face this problem while changing |
Okay, I'll take a look sometime tonight. |
Okay, I can't reproduce this, but I think I know what is causing it. This is similar to when rqt_reconfigure was sending parameter server updates while sliding the slider bar. The backtrace is a pretty clear indicator that there was an internal crash in PyQt. I think there is simply too much going on for PyQt to handle it. The key repeat rate causes the changes to be sent, and as the slider moves, we update the parameter server VERY quickly (at the key repeat rate). When the updates from the server come back to rqt_reconfigure, the delay often puts the slider in a different place (making the slider move in a rather jagged motion). Since the slider is moved for every keystroke, I can't control the rate at which the slider is modified. Would it be reasonable to NOT update the parameter server until you release the key? This would prevent the rapid reconfigurations and subsequent rapid updates. |
I'll put a vote in for that being reasonable. |
I am not sure how the threading model of dynamic_reconfigure and rqt_reconfigure is done. It could be that the incoming parameter changes are handled in the ROS callback thread and then try to change values of the Qt controls which is forbidden. Any UI element in Qt can only be changed from within the Qt event loop. So usually the callback would use a Qt signal to trigger a slot in the context of the event loop which actually interacts with the widget. |
This makes sense. I'll try using some connect()s to make the changes happen and see if that helps. I was able to repro' this after some time. I think I have it narrowed down to updating the gui from the parameter server, which would align with what @dirk-thomas is saying. It might be possible to leave the updates from keyboard on slider as-is, and fix the segfault instead. I'd like to find a way to get rid of the stuttering if we keep it like this, though. |
Pull Request #210:
Please comment on the pull request when you have tested for your issue. |
@cottsay thank you for taking over the maintainer-ship, and I confirm that the set of your commits resolves two issues raised in this ticket (changing values by arrow key and mouse wheel). Just fyi how I confirmed:
|
(sorry this isn't related to either this ticket nor @bgromov just wanted to mention that I first tried to test by using the repository you mentioned in this comment but the building was stopped by this orocos_kdl issue, and trying to rebase with the |
Now I confirmed the patch also works with what @bgromov wrote in this comment without segfault after using it for several minutes. (to compile his |
Fixed via 51715b2 |
Changing values with a slider by arrow keys on keyboard does not update parameters. Though directly entered in edit box values work.
The text was updated successfully, but these errors were encountered: