-
Notifications
You must be signed in to change notification settings - Fork 938
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
PlanningSceneDisplay speedup #2049
Conversation
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 like most of these changes. But, not sure, we should increase the default publish frequency of the PSM from 2Hz to 30Hz.
Well I think people expect smooth visualizations in 2020 ... Try adding a |
33e6dd0
to
89e6add
Compare
I've never seen a problem with having a PlanningScene "snapshot" every 0.5 seconds and a RobotDisplay showing the latest robot state at the same time... The snapshots simply trail the RobotDisplay during motions. But I do see your motivation for the patch.
This is not an acceptable default if it almost surely overloads systems with sensor-based live updates of the scene. Actually, even the planning scene monitor allows to subscribe directly to |
Scene rebuilds still occur if The publish rate is an upper limit btw, ie if nothing happens update rates will be lower. Also all sensor interfaces have update limits themselves, so you can still tune that to what your system can handle (but then you should maybe just reduce the update rate sensor-side). All of that being said, I'm fine with bargaining for what we change the publish rate to ;) (I prefer having the data go via a common path so that there are no "multiple realities" and what the display shows is what the code acts upon. That's why I'm not a fan of using the |
How about defaulting to 10 or 15Hz? (And postponing a further increase to once CollisionObject updates have been optimized equivalently) |
Are we on a market haggling? updates with less than 30Hz might look even worse than the current version because it might look like RViz stutters. Also it's still a lot of overhead if you have to sent octomaps. Are you unhappy with both of my proposed solutions? |
I'm not particularily keen on consuming the joint_states directly yes, as I'm a bit afraid of the visualization diverging from the logic. Also I think there are too many options already. For the second proposal that exists already via rate limiting your input. Octomaps are only send when they have changed. They are unfortunately currently redrawn/repopulated whenever the geometry changes (ie not when there is just a joint position changing but when changing any CollisionObject). Selectively rate limiting some part of the output could also create weird divergences (at least for some frames). I'll drop changing the publishing rate and re-propose that once I got some input /experiments on #2079 and on octomap "rendering". Would that be an acceptable intermediate step?
it doesn't now? |
My impression was always that it is obviously throttled by program logic, but if you suspect your system is under heavy load, it might look like that too, yes...
Sounds good to me. Your other changes here are a definite improvement. |
89e6add
to
bbf110e
Compare
Codecov Report
@@ Coverage Diff @@
## master #2049 +/- ##
==========================================
- Coverage 57.80% 57.35% -0.45%
==========================================
Files 328 328
Lines 25663 25664 +1
==========================================
- Hits 14834 14720 -114
- Misses 10829 10944 +115
Continue to review full report at Codecov.
|
@simonschmeisser Looks good to me. |
instead of the robots root node, this will move them automatically
bbf110e
to
2fc2876
Compare
@v4hn should be clean now, sorry for the mess. |
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.
Looks good to me.
Please merge via Merge commit. This request addresses a number of related but independent points.
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.
In general, I still approve these changes. However, I'm still not sure about the increase of the update frequency:
PSM will publish with 30Hz instead of 10Hz now, and this includes the full octomap (if published at all):
https://github.com/ros-planning/moveit/pull/2049/files#diff-fb6e26ecc9a73d59dbdae3f3e08145e6R370-R377
@simonschmeisser states that the octomap is only published on changes. In principle that's true, but given some depth camera publishing at 30Hz, we effectively will have a change in each cycle...
In #2049 (comment), @simonschmeisser promised to not increase the publishing rate, but the commit is still there: 1df820b. Am I missing something?
The commit you cite decreases the timer that includes update from |
Thanks for review and merging, I'll prepare a backport PR later on. Now if I could have your opinion on #2079 that would be great (but not sure when I get around to it though) |
* Use $DISPLAY rather than assuming : * Double quotes --------- Co-authored-by: Sebastian Jahr <sebastian.jahr@picknik.ai>
Alternative title: "MoveIt like it's 2020!"
This utilizes the
robot_state.is_diff
field inPlanningScene
messages to send only joint state updates and teachesPlanningSceneDisplay
to simply update the transforms in OGRE's scene graph instead of rebuilding the representation of both attached objects and collision objects. This reduces the time required for handling one update from 150-250ms down to 0.5ms in a simple scene typical for us. (one attached object (240kb), a couple more of those as collision objects, two boxes (few vertices) and an octomap) (Note that updates where the scene geometry changes are still slow ...)AttachedObjects
are now attached to the corresponding link in OGRE as well, so their position no longer needs to be updated manually.Furthermore this increases the default rate limit for joint state updates to ca 33hz, the publishing rate to 30hz and the incoming update limit in
PlanningSceneDisplay
to 100hz. This allows for smooth animations at 30fps