-
Notifications
You must be signed in to change notification settings - Fork 580
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
Fix planning_scene_monitor sync when passed empty robot state #3187
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
06b171f
Fix planning_scene_monitor sync when passed empty robot state
MarqRazz 9586c7d
address review
MarqRazz cb72982
check for null current_state_monitor_ and fall back to diff scene_ if…
MarqRazz 2b56c75
Merge branch 'main' into fix_planning_scene_sync
sjahr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
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.
Why didn't you simply use this line only? All you wanted to achieve is to not loose RobotState information from existing planning scene diffs.
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.
When I was testing I found that the diff scene is not updated at a constant rate and wanted to ensure I used the most up to date information. I can make this a single line if you think making the diff scene update run at a fixed rate is worthwhile.
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.
If we go to the single line would it be better to push the diffs to the parent scene? Could there be other changes in the diff that might need to be applied before we replace the scene?
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.
We need to deal with both issues separately.
This PR was about correctly maintaining the RobotState from the diffs. If the planning scene didn't have newer updates from the state monitor yet, we shouldn't care to pull them in early.
That the scene is not updated at a constant rate is another issue. Updates to the PSM's scene are only performed if 1) there are new updates received by CSM and 2) the throttling frequency is met. If both was true in your tests, then their is an issue with those updates, which should get fixed.
As far as I understood, you were observing issues with rviz' PlanningScene. This is updated from move_group's (PSM's) planning scene via a separate topic at a low rate of 2Hz:
moveit2/moveit_ros/planning/planning_scene_monitor/src/planning_scene_monitor.cpp
Line 448 in 80c7f61
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 suggest to cleanup this PR as I did for the MoveIt1 backport (moveit/moveit#3683).
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.
That is what I though too which is why I did not include any of those changes here. I will work on investigating the update rate and try to include a test to ensure it is working as expected.
Yes this issues is visible in Rviz but is also effects future plans because the

parent_scene
contained stale robot state data after executing a move causing it to jump to the last known position on the next motion plan (shown in the plot below).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.
Sure. This is fixed with the present PR. However, the other issue, i.e. the scene not being updated regularly, is a different story.