Skip to content

feat: Add API for requesting a new mesh from the MeshManager#796

Merged
azeey merged 3 commits intogazebosim:mainfrom
azeey:create_mesh
Mar 27, 2026
Merged

feat: Add API for requesting a new mesh from the MeshManager#796
azeey merged 3 commits intogazebosim:mainfrom
azeey:create_mesh

Conversation

@azeey
Copy link
Copy Markdown
Contributor

@azeey azeey commented Mar 27, 2026

🎉 New feature

Summary

This allows allocating new common::Mesh objects within the gz-common shared library avoiding cross-shared library lifetime mismatch issues. Such issues currently cause a segfault in gz-physics COMMON_TEST_collisions_bullet-featherstone test, even though Jenkins doesn't report it (I'm working on a fix for that too).

Test it

Run UNIT_MeshManager_TEST

Checklist

  • Signed all commits for DCO
  • Added a screen capture or video to the PR description that demonstrates the feature
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • Updated Bazel files (if adding new files). Created an issue otherwise.
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers
  • Was GenAI used to generate this PR? If so, make sure to add "Generated-by" to your commits. (See this policy for more info.)

Generated-by: Gemini 3.1 Pro

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by and Generated-by messages.

Backports: If this is a backport, please use Rebase and Merge instead.

This allows allocating new `common::Mesh` objects within the gz-common
shared library avoiding cross-shared library lifetime mismatch issues.

Generated-By: Gemini 3.1 Pro
Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
Copy link
Copy Markdown
Contributor

@caguero caguero left a comment

Choose a reason for hiding this comment

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

Looks good besides one minor comment.

My only other question is whether we should deprecate AddMesh() in favor of CreateMesh() or consider to add a comment in AddMesh() about the issue and the option to use CreateMesh().

Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
@azeey
Copy link
Copy Markdown
Contributor Author

azeey commented Mar 27, 2026

I think deprecating AddMesh is a good idea. Done in db245f8. I will have a follow up on gz-sim to use CreateMesh instead.

@github-project-automation github-project-automation bot moved this from Inbox to In review in Core development Mar 27, 2026
@azeey azeey merged commit e276648 into gazebosim:main Mar 27, 2026
13 of 15 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Core development Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants