added parameter to stop client libraries from generating topics list#1241
added parameter to stop client libraries from generating topics list#1241mikepurvis merged 1 commit intoros:melodic-develfrom
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.
This adds 1 or 2 XMLRPC calls to each log action (?)
There was a problem hiding this comment.
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.
Looks like it got disabled:
ros_comm/clients/rospy/src/rospy/msproxy.py
Line 119 in e96c407
|
|
||
| // 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.
this subscribes almost all roscpp-based nodes to param server updates
There was a problem hiding this comment.
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 = "" |
|
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.