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

lazy creating of dynamic_reconfigure client for each node #20

Merged
merged 1 commit into from Apr 19, 2018

Conversation

furushchev
Copy link
Contributor

@furushchev furushchev commented Feb 25, 2018

This fixes #19.

In current implementation, the rqt_reconfigure node tries to connect all nodes available when it starts.
If I understand ROS ecosystem correctly, each connection uses one socket, so if there are many nodes running in one ROS master such as PR2 robot, it can use up all available sockets.

In this pull request, I fixed codes not to connect to all nodes on the start of the node and only connect when any node is selected instead.

I'm not sure if there is any side effect on this change, but at least it works on my laptop, so any feedback from community is very welcome!

@furushchev furushchev changed the title lazy load dynamic_reconfigure client for each node lazy creating of dynamic_reconfigure client for each node Feb 25, 2018
@furushchev
Copy link
Contributor Author

Could you please review and merge if there is no problem so that every PR2 users can use this?
If you have any problem (or question), please let me know.

@cottsay
Copy link
Member

cottsay commented Mar 5, 2018

The changes seem sound to me. I just want to take some time to understand more about why the connections were made during start-up to begin with. Please give me a little while to fully grasp the repercussions of this change from a conceptual perspective.

@cottsay
Copy link
Member

cottsay commented Apr 19, 2018

Thanks for the PR - I was able to verify your change.

I can see how connecting to all of the available dynamic reconfigure nodes could slow things down, and it looks like the only benefit is that unusable nodes would be dropped from the list and become unavailable. Unfortunately, this experience was incomplete as-is, because if a node went down after rqt_reconfigure startup, it wasn't removed from the list. I'm not sure you would want to remove it from the list, either, so it is probably best to take the master at its word, and trust that sending us dead nodes won't become a problem.

Maybe we could consider adding functionality to trigger a "pruning" on-demand or something, if folks are finding this to be a problem. But after your change, at least the experience is consistent.

@cottsay cottsay merged commit 1130f9d into ros-visualization:master Apr 19, 2018
@furushchev furushchev deleted the lazy branch April 19, 2018 05:31
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.

Cannot select any node if many nodes are running
2 participants