-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests showing problems with conversion
The Converter currently only acts on the first child element it finds; it doesn't act on all sibling elements. I've added example SDFormat files and tests to illustrate the issue. Signed-off-by: Steve Peters <[email protected]>
- Loading branch information
Showing
3 changed files
with
265 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?xml version="1.0"?> | ||
<sdf version="1.7"> | ||
<world name="default"> | ||
<model name="top_level_model"> | ||
<link name="parent"/> | ||
<link name="child"/> | ||
<model name="nested_model01"> | ||
<link name="nested_link01"/> | ||
<link name="nested_link02"/> | ||
<model name="nested_nested_model01"> | ||
<link name="nested_nested_link01"/> | ||
<link name="nested_nested_link02"/> | ||
</model> | ||
<model name="nested_nested_model02"> | ||
<link name="nested_nested_link01"/> | ||
<link name="nested_nested_link02"/> | ||
</model> | ||
</model> | ||
<model name="nested_model02"> | ||
<link name="nested_link01"/> | ||
<link name="nested_link02"/> | ||
</model> | ||
<joint name="top_level_joint" type="revolute"> | ||
<parent>parent</parent> | ||
<child>child</child> | ||
<axis> | ||
<xyz>1 0 0</xyz> | ||
</axis> | ||
</joint> | ||
</model> | ||
<gravity>0 0 -9.8</gravity> | ||
<state world_name="default"> | ||
<sim_time>0 689000000</sim_time> | ||
<real_time>0 732670244</real_time> | ||
<wall_time>1709252095 646182343</wall_time> | ||
<iterations>689</iterations> | ||
<model name="top_level_model"> | ||
<link name="child"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
<link name="parent"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
<model name="nested_model01"> | ||
<link name="nested_link01"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
<link name="nested_link02"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
<model name="nested_nested_model01"> | ||
<link name="nested_nested_link01"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
<link name="nested_nested_link02"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
</model> | ||
<model name="nested_nested_model02"> | ||
<link name="nested_nested_link01"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
<link name="nested_nested_link02"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
</model> | ||
</model> | ||
<model name="nested_model02"> | ||
<link name="nested_link01"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
<link name="nested_link02"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
</model> | ||
</model> | ||
</state> | ||
</world> | ||
</sdf> |
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,90 @@ | ||
<?xml version="1.0"?> | ||
<sdf version="1.7"> | ||
<world name="default"> | ||
<model name="top_level_model"> | ||
<link name="parent"/> | ||
<link name="child"/> | ||
<model name="nested_model01"> | ||
<link name="nested_link01"/> | ||
<link name="nested_link02"/> | ||
<model name="nested_nested_model01"> | ||
<link name="nested_nested_link01"/> | ||
<link name="nested_nested_link02"/> | ||
</model> | ||
<model name="nested_nested_model02"> | ||
<link name="nested_nested_link01"/> | ||
<link name="nested_nested_link02"/> | ||
</model> | ||
</model> | ||
<model name="nested_model02"> | ||
<link name="nested_link01"/> | ||
<link name="nested_link02"/> | ||
</model> | ||
<joint name="top_level_joint" type="revolute"> | ||
<parent>parent</parent> | ||
<child>child</child> | ||
<axis> | ||
<xyz>1 0 0</xyz> | ||
</axis> | ||
</joint> | ||
</model> | ||
<gravity>0 0 -9.8</gravity> | ||
<state world_name="default"> | ||
<sim_time>0 689000000</sim_time> | ||
<real_time>0 732670244</real_time> | ||
<wall_time>1709252095 646182343</wall_time> | ||
<iterations>689</iterations> | ||
<insertions> | ||
<model name='unit_box'> | ||
<pose>-0.541687 -2.44761 0.5 0 -0 0</pose> | ||
<link name='link'/> | ||
</model> | ||
</insertions> | ||
<model name="top_level_model"> | ||
<link name="child"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
<link name="parent"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
<model name="nested_model01"> | ||
<link name="nested_link01"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
<link name="nested_link02"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
<model name="nested_nested_model01"> | ||
<link name="nested_nested_link01"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
<link name="nested_nested_link02"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
</model> | ||
<model name="nested_nested_model02"> | ||
<link name="nested_nested_link01"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
<link name="nested_nested_link02"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
</model> | ||
</model> | ||
<model name="nested_model02"> | ||
<link name="nested_link01"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
<link name="nested_link02"> | ||
<pose>0 0 -2.329 0 -0 0 </pose> | ||
</link> | ||
</model> | ||
</model> | ||
<model name="unit_box"> | ||
<link name="link"> | ||
<pose>-0.5417 -2.448 0.5 0 -0 0 </pose> | ||
</link> | ||
</model> | ||
</state> | ||
</world> | ||
</sdf> |