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

Visual::SetPose performance improvement / minor fixes #3350

Merged
merged 2 commits into from Oct 5, 2023

Conversation

jmachowinski
Copy link
Contributor

Summary

This commit adds caching for the SDF 'pose' element in the visual. For us this gave a 10x speed improvement in
the poseMsgs block in Scene.cc reducing the runtime from over 10ms to ~1ms.

I am not sure if the caching is allowed for all cases, as it was implemented now.

Janosch Machowinski added 2 commits October 2, 2023 10:40
The old implementation relied hard on internals of map to not crash.
Caching this entry, speeds up poseMsgs block in Scenes.cc from ~10ms
to 1ms for our use case.

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Copy link
Member

@scpeters scpeters left a comment

Choose a reason for hiding this comment

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

both of these commits make sense to me, though I suspect there's still more of a performance improvement that can be achieved in Scene::PreRender by preventing Visual::SetPose from touching any sdf::ElementPtr values at all, but this would break any code that reads from dataPtr->sdf and assumes it has the current pose. I think we can merge this as is since it is already an improvement.

Thanks for your contribution!

@scpeters scpeters changed the title Performance improvement / minor fixes Visual::SetPose performance improvement / minor fixes Oct 5, 2023
@scpeters scpeters merged commit 13f8dfe into gazebosim:gazebo11 Oct 5, 2023
8 of 10 checks passed
@roncapat
Copy link
Contributor

roncapat commented Oct 5, 2023

@scpeters sorry for the OT, but is there any plan for a new point release anytime soon?

@scpeters
Copy link
Member

scpeters commented Oct 6, 2023

@scpeters sorry for the OT, but is there any plan for a new point release anytime soon?

#3351

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