-
Notifications
You must be signed in to change notification settings - Fork 765
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
Only subscribe to /gazebo/performance_metrics when necessary #1202
Merged
scpeters
merged 3 commits into
ros-simulation:noetic-devel
from
scpeters:fix_performance_metrics_noetic
Dec 15, 2020
Merged
Only subscribe to /gazebo/performance_metrics when necessary #1202
scpeters
merged 3 commits into
ros-simulation:noetic-devel
from
scpeters:fix_performance_metrics_noetic
Dec 15, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>
jacobperron
approved these changes
Dec 14, 2020
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.
LGTM
chapulina
approved these changes
Dec 14, 2020
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.
I haven't tried running it but it looks like a reasonable workaround 👍
scpeters
added a commit
that referenced
this pull request
Dec 22, 2020
Backport of #1202 to melodic-devel. 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. This also adds a GAZEBO_ROS_HAS_PERFORMANCE_METRICS macro that reduces duplication of the version checking logic for performance metrics in gazebo and adds fixes some doc-string and typos in existing code Signed-off-by: Steve Peters <scpeters@openrobotics.org>
This was referenced Dec 22, 2020
scpeters
added a commit
that referenced
this pull request
Dec 23, 2020
Backport of #1202 to kinetic-level. 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. This also adds a GAZEBO_ROS_HAS_PERFORMANCE_METRICS macro that reduces duplication of the version checking logic for performance metrics in gazebo and adds fixes some doc-string and typos in existing code Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are currently subscribing to the
/gazebo/performance_metrics
topic even if there are no subscribers to the ROS topic forwarding this data. Thelink_states
andmodel_states
topics currently use an advertise mechanism with callbacks when a subscriber connects or disconnects, so I've used that same pattern for theperformance_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.