gazebosim / gz-sim

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

`scopedName` returns different values when called from `Configure` vs `PreUpdate` #1786

Open azeey opened 1 year ago

azeey commented 1 year ago

Environment

Description

Steps to reproduce

  1. In any system (eg. LiftDrag), call scopedName in Configure and any of the *Update functions and print the output

Output

For LiftDrag for example, running examples/worlds/lift_drag.sdf prints:

Configure name: model/lift_drag_demo_model
PreUpdate name: world/lift_drag/model/lift_drag_demo_model
azeey commented 1 year ago

I believe this is due to the fact that Configure is called before all entities have been created. It would be nice to change this, but it will be a change in behavior so should probably go into Harmonic.