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

Error in flattening logic for nested model names #574

Closed
j-rivero opened this issue May 19, 2021 · 1 comment
Closed

Error in flattening logic for nested model names #574

j-rivero opened this issue May 19, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@j-rivero
Copy link
Contributor

Environment

  • OS Version: Ubuntu Bionic
  • Binaries: SDFormat 9.5.1 , Gazebo 11.5.1

Description

In the test case provided in https://github.com/j-rivero/sdf_bug, Gazebo11 is complaining with:

[Err] [Joint.cc:297] EXCEPTION: Couldn't Find Child Link[sub_door::door]

when using an SDF similar to:

<?xml version="1.0" ?>
<sdf version="1.5">
  <model name='hinged_door_ticket'>
      <static>0</static>
      <link name='frame'>
      </link>
      <model name='sub_door'>
	<static>0</static>
	<link name='door'>
	  <pose frame=''>-0 0 2.04 3.14159 -0 1.58</pose>	   
	</link>
      </model>
      <joint name='hinge' type='revolute'>
        <parent>frame</parent>
        <child>sub_door::door</child>       
      </joint>
    </model>
</sdf>

The great @azeey first impression was: "It looks like the breaking change is that we added a prefix to nested models when flattening (#399). Running gz sdf -p frame.world shows that the joint is looking for sub_door::door. In Gazebo7, there is a model called sub_door. In Gazebo11, that model is now hinged_door_frame::sub_door. For some reason, the flattening logic is not handling that properly

  • Expected behavior: the name got resolved correctly
  • Actual behavior: failing to resolve the name, error message is emitted

Steps to reproduce

  1. Download the example repository in the description
  2. Execute GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:${PWD} gazebo --verbose frame.world
@j-rivero j-rivero added the bug Something isn't working label May 19, 2021
@j-rivero j-rivero self-assigned this Jun 8, 2021
@azeey
Copy link
Collaborator

azeey commented Jul 23, 2021

Can this be closed now that #597 is merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants