-
Notifications
You must be signed in to change notification settings - Fork 277
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
Crash after adding model and resetting #2624
Comments
Steps to reproduce could be simplified as:
|
I have experienced the same issue. I noticed the strange behavior that it works with two models inside the SDF being spawned, but not with three. Environment
Description
Steps to reproduceUsing the empty.sdf world:
gazebo empty.sdf
gz service -s /world/empty/create --reqtype gz.msgs.EntityFactory --reptype gz.msgs.Boolean --timeout 1000 --req 'sdf_filename: "/home/rafa/test.sdf", name: "my_object"' Using this test.sdf model: <?xml version="1.0" ?>
<sdf version="1.6">
<model name='box0'>
<pose>0 0 0 0 0 0</pose>
<link name="base_link">
<visual name="visual">
<geometry>
<box>
<size>0.2 0.2 0.2</size>
</box>
</geometry>
</visual>
</link>
<model name="box1">
<pose>0.3 0 0.5 0 0 0</pose>
<link name="link1"></link>
</model>
<joint name="box1_joint" type="fixed">
<parent>base_link</parent>
<child>box1::link1</child>
</joint>
<model name="box2">
<pose>0 -0.3 0.5 0 0 0</pose>
<link name="link2"></link>
</model>
<joint name="box2_joint" type="fixed">
<parent>base_link</parent>
<child>box2::link2</child>
</joint>
<model name="box3">
<pose>0 0 0.7 0 0 0</pose>
<link name="link3"></link>
</model>
<joint name="box3_joint" type="fixed">
<parent>base_link</parent>
<child>box3::link3</child>
</joint>
</model>
</sdf>
Important informationIf the model is set inside the world file, it does not crash. Similarly, it doesn't crash if there are no more than two models. The following SDF file does not crash, which is the same as the previous one but without the box3 model: <?xml version="1.0" ?>
<sdf version="1.6">
<model name='box0'>
<pose>0 0 0 0 0 0</pose>
<link name="base_link">
<visual name="visual">
<geometry>
<box>
<size>0.2 0.2 0.2</size>
</box>
</geometry>
</visual>
</link>
<model name="box1">
<pose>0.3 0 0.5 0 0 0</pose>
<link name="link1"></link>
</model>
<joint name="box1_joint" type="fixed">
<parent>base_link</parent>
<child>box1::link1</child>
</joint>
<model name="box2">
<pose>0 -0.3 0.5 0 0 0</pose>
<link name="link2"></link>
</model>
<joint name="box2_joint" type="fixed">
<parent>base_link</parent>
<child>box2::link2</child>
</joint>
</model>
</sdf> Output
|
According @iche033 , we need to implement some bookkeeping to undo the changes after combining the two models together. |
Environment
source build
gz-sim9 version: 3765579
built with
gcc version 13.2.0 (Ubuntu 13.2.0-23ubuntu4)
build options: -DCMAKE_BUILD_TYPE=Coverage
also reproduced on gz-sim8 version: a167312
Description
Steps to reproduce
gz sim examples/worlds/detachable_joint.sdf -r &
Also worked by extracting a.tar.gz, then run
gz sim a.sdf -r&
, andbash a.sh
Output
The text was updated successfully, but these errors were encountered: