-
Notifications
You must be signed in to change notification settings - Fork 914
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
added parameter to stop client libraries from generating topics list #1241
Conversation
Adding this Clearpath's testing, appreciating that there will be discussion about naming of the new param. |
The usual comment about ABI breakage applies. I created #1270 to find a consensus on this in order to avoid this "back-and-forth-negotiation" on each patch. |
We've been running this in production since November, merging. |
# check parameter server/cache for omit_topics flag | ||
# the same parameter is checked in rosout_appender.cpp for the same purpose | ||
# parameter accesses are cached automatically in python | ||
if rospy.has_param("/rosout_disable_topics_generation"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds 1 or 2 XMLRPC calls to each log action (?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment indicates that the response is cached, but I agree that this is super bad if it's not the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it got disabled:
ros_comm/clients/rospy/src/rospy/msproxy.py
Line 119 in e96c407
if 1: # disable param cache |
|
||
// check parameter server/cache for omit_topics flag | ||
// the same parameter is checked in rosout.py for the same purpose | ||
ros::param::getCached("/rosout_disable_topics_generation", disable_topics_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this subscribes almost all roscpp-based nodes to param server updates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getCached
calls ROS_DEBUG_NAMED
under the hood. Has this been tested with debug log level?
As a tradeoff this feature could only be activated if the param is present at node start-up. |
if not disable_topics_: | ||
topics = get_topic_manager().get_topics() | ||
else: | ||
topics = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be []
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
As @ipa-mdl pointed out before, this patch outputs a lot of warning message with a debug log level.
And if we activate this feature on the startup, then the warnings disappears
Or check
How do you think? @dirk-thomas @mikepurvis |
Please create a PR with the proposed changes. Comments on a closed tickets will likely get lost. |
…nitialization time ros#1241 outputs a lot of warning message with a debug log level. c.f. ros#1241 (comment)
…nitialization time ros#1241 outputs a lot of warning message with a debug log level. c.f. ros#1241 (comment)
The cached parameter /rosout_disable_topics_generation stops rospy and roscpp from generating the list of topics and sending them over the network stack as part of their log messages. It does not stop rosout from printing an empty topics list.