-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check World joints in checkJointParentChildNames (#1189)
This refactors the checkModelJointParentChildNames lambda function into a template function that works for both sdf::Model and sdf::World objects, after adding the World::NameExistsInFrameAttachedToGraph API. An example world and test is included. Signed-off-by: Steve Peters <[email protected]>
- Loading branch information
Showing
11 changed files
with
172 additions
and
69 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
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
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
27 changes: 27 additions & 0 deletions
27
test/sdf/world_joint_invalid_resolved_parent_same_as_child.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,27 @@ | ||
<?xml version="1.0" ?> | ||
<sdf version="1.10"> | ||
<world name="joint_invalid_resolved_parent_same_as_child.sdf"> | ||
<!-- | ||
For ease of unittesting unique values, | ||
each model's pose is displaced along the z-axis, | ||
frames are displaced along the y-axis, | ||
and joints are displaced along the x-axis. | ||
--> | ||
<model name="parent_model"> | ||
<pose>0 0 1 0 0 0</pose> | ||
<link name="L"/> | ||
</model> | ||
<model name="child_model"> | ||
<pose>0 0 10 0 0 0</pose> | ||
<link name="L"/> | ||
</model> | ||
<frame name="child_frame" attached_to="child_model"> | ||
<pose>0 1 0 0 0 0</pose> | ||
</frame> | ||
<joint name="J" type="ball"> | ||
<pose>10 0 0 0 0 0</pose> | ||
<parent>child_model</parent> | ||
<child>child_frame</child> | ||
</joint> | ||
</world> | ||
</sdf> |