-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix included nested model expansion in SDF generation (#768)
* fixed included nested model expansion Signed-off-by: Jenn Nguyen <[email protected]> * added resource path to test Signed-off-by: Jenn Nguyen <[email protected]> * use orig URIs & support multi level nesting Signed-off-by: Jenn Nguyen <[email protected]> * save fuel version when enabled Signed-off-by: Jenn Nguyen <[email protected]> * retrieve uri from map Signed-off-by: Jenn Nguyen <[email protected]> * copy included element Signed-off-by: Jenn Nguyen <[email protected]> * clear attributes before copying include element Signed-off-by: Jenn Nguyen <[email protected]>
- Loading branch information
Showing
4 changed files
with
310 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<?xml version="1.0" ?> | ||
<sdf version="1.8"> | ||
<world name="model_nested_include_world"> | ||
<physics name="1ms" type="ignored"> | ||
<max_step_size>0.001</max_step_size> | ||
<real_time_factor>1.0</real_time_factor> | ||
</physics> | ||
<plugin | ||
filename="libignition-gazebo-physics-system.so" | ||
name="ignition::gazebo::systems::Physics"> | ||
</plugin> | ||
<plugin | ||
filename="libignition-gazebo-scene-broadcaster-system.so" | ||
name="ignition::gazebo::systems::SceneBroadcaster"> | ||
</plugin> | ||
|
||
<scene> | ||
<ambient>1.0 1.0 1.0</ambient> | ||
<background>0.8 0.8 0.8</background> | ||
</scene> | ||
|
||
<model name="ground_plane"> | ||
<static>true</static> | ||
<link name="L0"> | ||
<collision name="C0"> | ||
<geometry> | ||
<box> | ||
<size>20 20 0.1</size> | ||
</box> | ||
</geometry> | ||
</collision> | ||
<visual name="V0"> | ||
<geometry> | ||
<plane> | ||
<normal>0 0 1</normal> | ||
<size>100 100</size> | ||
</plane> | ||
</geometry> | ||
<material> | ||
<ambient>0.8 0.8 0.8 1</ambient> | ||
<diffuse>0.8 0.8 0.8 1</diffuse> | ||
<specular>0.8 0.8 0.8 1</specular> | ||
</material> | ||
</visual> | ||
</link> | ||
</model> | ||
|
||
|
||
<model name="M1"> | ||
<include> | ||
<uri>include_nested</uri> | ||
<name>include_nested_new_name</name> | ||
<pose>1 2 3 0 0 0</pose> | ||
</include> | ||
|
||
<model name="M2"> | ||
<include> | ||
<uri>sphere</uri> | ||
<pose>0 2 2 0 0 0</pose> | ||
</include> | ||
|
||
<model name="M3"> | ||
<include> | ||
<name>coke</name> | ||
<uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Coke Can</uri> | ||
<pose>2 2 2 0 0 0</pose> | ||
</include> | ||
</model> | ||
</model> | ||
|
||
<pose>0 -2 0 0 0 0</pose> | ||
<link name="L1"> | ||
<pose>0 0 2 0 0 0</pose> | ||
<collision name="C1"> | ||
<geometry> | ||
<box> | ||
<size>1 1 1</size> | ||
</box> | ||
</geometry> | ||
</collision> | ||
|
||
<visual name="V1"> | ||
<geometry> | ||
<box> | ||
<size>1 1 1</size> | ||
</box> | ||
</geometry> | ||
<material> | ||
<ambient>1 0 0 1</ambient> | ||
<diffuse>1 0 0 1</diffuse> | ||
<specular>1 0 0 1</specular> | ||
</material> | ||
</visual> | ||
</link> | ||
</model> | ||
|
||
</world> | ||
</sdf> |