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

gazebo_ros: Use relative namespace for performance metrics #1180

Closed

Conversation

mitschron
Copy link

No description provided.

@mitschron mitschron changed the title Use relative namespace for performance metrics gazebo_ros: Use relative namespace for performance metrics Oct 16, 2020
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

I don't think this will work. Gazebo is publishing at an exact topic without a namespace:

https://github.com/osrf/gazebo/blob/10863ffa8ec28e8e0e3d3a3a588d21cdc78055ab/gazebo/sensors/SensorManager.cc#L186

Also, the ~ will resolve to /gazebo/worldname, not just /gazebo.

Are you trying to solve some issue?

@mitschron
Copy link
Author

mitschron commented Oct 18, 2020

I don't think this will work. Gazebo is publishing at an exact topic without a namespace:

https://github.com/osrf/gazebo/blob/10863ffa8ec28e8e0e3d3a3a588d21cdc78055ab/gazebo/sensors/SensorManager.cc#L186

Also, the ~ will resolve to /gazebo/worldname, not just /gazebo.

Are you trying to solve some issue?

Please have a look at issue #1175. Adding the performance metrics seems to be breaking the plugins.

@scpeters
Copy link
Member

I don't think this will work. Gazebo is publishing at an exact topic without a namespace:
https://github.com/osrf/gazebo/blob/10863ffa8ec28e8e0e3d3a3a588d21cdc78055ab/gazebo/sensors/SensorManager.cc#L186
Also, the ~ will resolve to /gazebo/worldname, not just /gazebo.
Are you trying to solve some issue?

Please have a look at issue #1175. Adding the performance metrics seems to be breaking the plugins.

I believe the underlying issue in #1175 is gazebosim/gazebo-classic#2902, and it can occur whenever there is a subscriber to the gazebo topic /gazebo/performance_metrics and gazebo's SensorManager has sensors in 2 or more SensorContainers (ie a camera and a lidar, or a lidar and an IMU). This pull request works around the issue by breaking the gazebo subscriber so that it subscribes to an incorrect topic. I've submitted a different workaround in #1202 to noetic-devel (and #1203 for melodic and #1205 for ros2) that only subscribes to the gazebo topic if there is anyone subscribing to the corresponding ROS topic. So it will still be possible to encounter the deadlock, but it requires an extra step of subscribing to the /performance_metrics topic. I've opened #1209 to backport this workaround to kinetic-devel, so I think this can be closed once that is merged.

@scpeters
Copy link
Member

I'm going to close this since I've just merged #1209 to kinetic-devel, and I believe it's a suitable workaround to #1175

@scpeters scpeters closed this Dec 23, 2020
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

3 participants