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

Remove pause when connecting rviz to planning scene monitor #1934

Merged
merged 1 commit into from
Mar 7, 2020

Conversation

Dale-Koenig
Copy link
Contributor

@Dale-Koenig Dale-Koenig commented Mar 6, 2020

Description

When calling PlanningSceneMonitor::requestPlanningSceneState there is a 5 second wait for the service to be connected to a client. This causes rviz to freeze for 5 seconds for each planning scene topic it is listening for whenever you try to connect to it, unless you specifically broadcast those topics before starting rviz. I propose removing this wait entirely, and simply failing if we are not connected. If it is frequently necessary to wait in order to successfully get the full state of the planning scene when only diffs are being published, I suggest at least reducing the wait to a much lower time.

Changes to call the planning scene request as a background thread so that it does not freeze rviz.

@v4hn
Copy link
Contributor

v4hn commented Mar 6, 2020

It makes sense to keep the wait in the requestPlanningSceneState (although the concrete timeout should probably be a parameter somewhere...).

This causes rviz to freeze for 5 seconds

From my point of view this is the actual bug.
Requesting the planning scene should be a background job in RViz, updating the status of the display on error.

@Dale-Koenig
Copy link
Contributor Author

Requesting the planning scene should be a background job in RViz, updating the status of the display on error.

Fair enough, if there's a possibility the sleep is important I guess that's better. I'll change the PR, although I don't really know enough about the background job manager to be confident I'm not doing something terrible.

@v4hn
Copy link
Contributor

v4hn commented Mar 6, 2020 via email

@Dale-Koenig
Copy link
Contributor Author

Dale-Koenig commented Mar 6, 2020 via email

Copy link
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

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

Works great. Thanks.

@rhaschke rhaschke merged commit 643bc57 into moveit:master Mar 7, 2020
@Dale-Koenig Dale-Koenig deleted the remove_get_psm_wait branch March 7, 2020 14:19
v4hn pushed a commit to v4hn/moveit that referenced this pull request Mar 30, 2020
v4hn pushed a commit to v4hn/moveit that referenced this pull request Mar 31, 2020
v4hn pushed a commit to v4hn/moveit that referenced this pull request Mar 31, 2020
sjahr pushed a commit to sjahr/moveit that referenced this pull request Jun 21, 2024
* Install moveit_ros_occupancy_map_monitor headers additional directory

* Install moveit_ros_perception within additional directory

* Install moveit_ros_planning headers within additional directory

* Install moveit_ros_planning_interface headers within additional directory

* Install moveit_ros_robot_interaction headers within additional directory

* Install moveit_ros_visualization headers within additional directory

* Install moveit_ros_warehouse headers within additional directory
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