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

Backport #1202 to kinetic: fix performance metrics #1209

Merged

Conversation

scpeters
Copy link
Member

Backport of #1202 to kinetic-devel, an alternative to #1180:

We are currently subscribing to the /gazebo/performance_metrics topic even if there are no subscribers to the ROS topic forwarding this data. The link_states and model_states topics currently use an advertise mechanism with callbacks when a subscriber connects or disconnects, so I've used that same pattern for the performance_metrics topic.

This also helps workaround the deadlock documented in #1175 and gazebosim/gazebo-classic#2902.

I've also added the GAZEBO_ROS_HAS_PERFORMANCE_METRICS macro to de-duplicate the gazebo version checking logic and made some minor doc-string and spelling fixes.

This reduces duplication of the version checking logic for
performance metrics in gazebo.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
We are currently subscribing to the /gazebo/performance_metrics topic
even if there are no subscribers to the ROS topic forwarding this data.
The link_states and model_states topics currently use an advertise
mechanism with callbacks when a subscriber connects or disconnects,
so I've used that same pattern for the performance_metrics topic.
This also helps workaround the deadlock documented in ros-simulation#1175 and
gazebosim/gazebo-classic#2902.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with green CI

@scpeters scpeters merged commit 4da3acf into ros-simulation:kinetic-devel Dec 23, 2020
@scpeters scpeters deleted the fix_performance_metrics_kinetic branch December 23, 2020 21:42
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.

None yet

2 participants