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
MotionPlanning RViz plugin have to be manually refreshed after clear_octomap #3045
Comments
I've been experiencing the same issue. Have you had any progress towards fixing this @FSund ? |
Quickly skimming the code clearing the octomap should trigger `UPDATE_GEOMETRY` which *should* trigger publishing a new ROS message with the cleared octomap. Can you see the message on the `move_group/monitored_planning_scene` topic when you clear the scene?
Either the trigger fails or the new message is interpreted wrongly in the RViz plugin.
|
Yes, the following message appears on the
The Octomap is still visible in RViz though. |
I see. The error is that we check for whether data is empty [here](https://github.com/ros-planning/moveit/blob/master/moveit_core/planning_scene/src/planning_scene.cpp#L1291-L1293) to decide whether or not an octomap is represented in the message or whether it is not filled in.
But the empty data array should be permitted to mean the octomap is empty.
I would propose to change that conditional to `!scene_msg.world.octomap.id.empty()` to decide whether the map is filled in.
However, from your paste it also seems we do not actually set the `id` field when it's cleared, so in order for this change to work you also have to modify the places that can fill in the octomap message in case it is empty and set the `id` field to `OcTree` [which is the only allowed non-empty value anyway](https://github.com/ros-planning/moveit/blob/master/moveit_core/planning_scene/src/planning_scene.cpp#L1371).
Could you implement this and provide a PR if it works? I do not have a setup around to test this.
|
EDIT: I think I understand what you meant now. An empty
|
EDIT: I've now realized that removing that check will clear the octomap every time a diff message is sent, if the octomap field is not filled.
|
I have made a pull request with a preliminary test, to check how CI responds to my changes. |
It seems the octomap message is created in PlanningScene::getOctomapMsg. The issue I'm having is that the Seeing as |
Description
After calling the
/clear_octomap
service, the MotionPlanning RViz plugin have to be reloaded (uncheck and re-check the plugin, or remove/add), for the octomap to disappear from the Planning Scene.The same happens if an empty octomap is loaded from a file via
/move_group/load_map
(the old octomap is still shown until the plugin is reloaded). The empty map is generated via/move_group/save_map
on a fresh scene.The same behaviour is present when calling the
/apply_planning_scene
service with an empty octomap:(untested code, it is a minimal version of the actual code I use)
I am not sure if any of these 3 methods of clearing the octomap are related, but I thought I'd just as well report all the similar issues I've run into.
Your environment
master
(moveit repo is on commit e7b388d)Steps to reproduce
/clear_octomap
Expected behaviour
I would expect the octomap to disappear from the Planning Scene after the service is called.
Actual behaviour
The octomap is still shown until I reload the MotionPlanning plugin.
The text was updated successfully, but these errors were encountered: