-
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.
Fix URDF fixed joint reduction of SDF joints (#1089)
Fix ReduceSDFExtensionJointFrameReplace by repeating fix from #745 to account for the extra root element in documents created with tinyxml2. This includes a test case for a URDF with a chain of links with fixed joint reduction and an SDFormat joint embedded in a <gazebo> block whose parent and child are reduced links. This confirms that the parent and child link names are updated properly during fixed joint reduction. Signed-off-by: Steve Peters <[email protected]>
- Loading branch information
Showing
3 changed files
with
205 additions
and
11 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
165 changes: 165 additions & 0 deletions
165
test/integration/fixed_joint_reduction_joint_frame_extension.urdf
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,165 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<robot name="chained_fixed_joint_links"> | ||
<gazebo> | ||
<joint name="sdf_ball_joint" type="ball"> | ||
<parent>link1</parent> | ||
<child>link4</child> | ||
</joint> | ||
</gazebo> | ||
|
||
<!-- Base Link --> | ||
<link name="base_link"> | ||
<collision> | ||
<origin rpy="0 0 0" xyz="0 0 0.0"/> | ||
<geometry> | ||
<box size="1.0 1.0 1"/> | ||
</geometry> | ||
</collision> | ||
<visual> | ||
<origin rpy="0 0 0" xyz="0 0 1.0"/> | ||
<geometry> | ||
<box size="0.1 0.1 2"/> | ||
</geometry> | ||
</visual> | ||
<inertial> | ||
<origin xyz="0 0 1" rpy="0 0 0"/> | ||
<mass value="1"/> | ||
<inertia | ||
ixx="1.0" ixy="0.0" ixz="0.0" | ||
iyy="1.0" iyz="0.0" | ||
izz="1.0"/> | ||
</inertial> | ||
</link> | ||
|
||
<!-- Link 1 --> | ||
<link name="link1"> | ||
<collision> | ||
<origin rpy="0 0 0" xyz="0 0 0.0"/> | ||
<geometry> | ||
<box size="1.0 1.0 1"/> | ||
</geometry> | ||
</collision> | ||
<visual> | ||
<origin rpy="0 0 0" xyz="0 0 0.0"/> | ||
<geometry> | ||
<box size="0.1 0.1 1"/> | ||
</geometry> | ||
</visual> | ||
<inertial> | ||
<origin xyz="0 0 1" rpy="0 0 0"/> | ||
<mass value="1"/> | ||
<inertia | ||
ixx="1.0" ixy="0.0" ixz="0.0" | ||
iyy="1.0" iyz="0.0" | ||
izz="1.0"/> | ||
</inertial> | ||
</link> | ||
|
||
<!-- Link 2 --> | ||
<link name="link2"> | ||
<collision> | ||
<origin rpy="0 0 0" xyz="0 0 0.0"/> | ||
<geometry> | ||
<box size="1.0 1.0 1"/> | ||
</geometry> | ||
</collision> | ||
<visual> | ||
<origin rpy="0 0 0" xyz="0 0 0.0"/> | ||
<geometry> | ||
<box size="0.1 0.1 1"/> | ||
</geometry> | ||
</visual> | ||
<inertial> | ||
<origin xyz="0 0 1" rpy="0 0 0"/> | ||
<mass value="1"/> | ||
<inertia | ||
ixx="1.0" ixy="0.0" ixz="0.0" | ||
iyy="1.0" iyz="0.0" | ||
izz="1.0"/> | ||
</inertial> | ||
</link> | ||
|
||
<!-- Link 3 --> | ||
<link name="link3"> | ||
<collision> | ||
<origin rpy="0 0 0" xyz="0 0 0.0"/> | ||
<geometry> | ||
<box size="1.0 1.0 1"/> | ||
</geometry> | ||
</collision> | ||
<visual> | ||
<origin rpy="0 0 0" xyz="0 0 0.0"/> | ||
<geometry> | ||
<box size="0.1 0.1 1"/> | ||
</geometry> | ||
</visual> | ||
<inertial> | ||
<origin xyz="0 0 1" rpy="0 0 0"/> | ||
<mass value="1"/> | ||
<inertia | ||
ixx="1.0" ixy="0.0" ixz="0.0" | ||
iyy="1.0" iyz="0.0" | ||
izz="1.0"/> | ||
</inertial> | ||
</link> | ||
|
||
<!-- Link 4 --> | ||
<link name="link4"> | ||
<collision> | ||
<origin rpy="0 0 0" xyz="0 0 0.0"/> | ||
<geometry> | ||
<box size="1.0 1.0 1"/> | ||
</geometry> | ||
</collision> | ||
<visual> | ||
<origin rpy="0 0 0" xyz="0 0 0.0"/> | ||
<geometry> | ||
<box size="0.1 0.1 1"/> | ||
</geometry> | ||
</visual> | ||
<inertial> | ||
<origin xyz="0 0 1" rpy="0 0 0"/> | ||
<mass value="1"/> | ||
<inertia | ||
ixx="1.0" ixy="0.0" ixz="0.0" | ||
iyy="1.0" iyz="0.0" | ||
izz="1.0"/> | ||
</inertial> | ||
</link> | ||
|
||
<!-- Joint 1 --> | ||
<joint name="joint1" type="fixed"> | ||
<parent link="base_link"/> | ||
<child link="link1"/> | ||
<origin rpy="0 0 0.7854" xyz="0 1.0 0.0"/> | ||
<dynamics damping="0.7"/> | ||
</joint> | ||
|
||
<!-- Joint 2 --> | ||
<joint name="joint2" type="continuous"> | ||
<parent link="link1"/> | ||
<child link="link2"/> | ||
<origin rpy="0 0 0.7854" xyz="0 1.0 0.0"/> | ||
<axis xyz="0 1 0"/> | ||
<dynamics damping="0.7"/> | ||
</joint> | ||
|
||
<!-- Joint 3 --> | ||
<joint name="joint3" type="continuous"> | ||
<parent link="link2"/> | ||
<child link="link3"/> | ||
<origin rpy="0 0 0.7854" xyz="0 1.0 0.0"/> | ||
<axis xyz="0 1 0"/> | ||
<dynamics damping="0.7"/> | ||
</joint> | ||
|
||
<!-- Joint 4 --> | ||
<joint name="joint4" type="fixed"> | ||
<parent link="link3"/> | ||
<child link="link4"/> | ||
<origin rpy="0 0 0.7854" xyz="0 1.0 0.0"/> | ||
<dynamics damping="0.7"/> | ||
</joint> | ||
|
||
</robot> | ||
|