gazebosim / gz-sim

Open source robotics simulator. The latest version of Gazebo.
https://gazebosim.org
Apache License 2.0
719 stars 272 forks source link

Fix making breadcrumb static if it's a nested model #2593

Closed iche033 closed 2 months ago

iche033 commented 2 months ago

🦟 Bug fix

Fixes https://github.com/gazebosim/gazebo_test_cases/issues/1593

Breadcrumbs are made static some time after being deployed. This is done by attaching a fixed joint between its canonical link and a dummy static model. However, the logic for finding the canonical link did not work if the breadcrumb is a nested model. This PR fixes finding the canonical link in a nested breadcrumb model so that it can be made static.

To test

launch breadcrumbs.sdf world

gz sim -v 4 -r breadcrumbs.sdf

Deploy B2

gz topic -t "/B2/deploy" -m gz.msgs.Empty -p "unused: true"

Wait a few seconds and make sure no error msgs such as [error] Failed to make breadcrumb 'B2_0' static. is printed.

The deployed breadcrumb model should be static.

Checklist

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

iche033 commented 2 months ago

The UNIT_Server_TEST failed on gz_sim-ci-pr_any-noble-amd64. Looks like it's flaky, I see it failing on gz-sim9 branch and other PRs. Ticketed https://github.com/gazebosim/gz-sim/issues/2609