-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parser_urdf: add //frame for reduced links/joints (#1148)
Currently the location of some links and joints is lost when fixed joints are reduced and links lumped together. This adds //model/frame tags with the same name and pose of the reduced links and joints. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
- Loading branch information
Showing
4 changed files
with
244 additions
and
4 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,63 @@ | ||
<?xml version="1.0" ?> | ||
<robot name="fixed_joint_example"> | ||
|
||
<link name="base"> | ||
<!-- base has inertial and visual geometry of a half-cube --> | ||
<inertial> | ||
<mass value="6"/> | ||
<origin rpy="0 0 0" xyz="0 0 0.25"/> | ||
<inertia ixx="0.625" ixy="0" ixz="0" iyy="0.625" iyz="0" izz="1.0"/> | ||
</inertial> | ||
<visual> | ||
<geometry> | ||
<box size="1.0 1.0 0.5"/> | ||
</geometry> | ||
<origin rpy="0 0 0" xyz="0 0 0.25"/> | ||
</visual> | ||
</link> | ||
|
||
<!-- Intermediate link with fixed joint that will be reduced. --> | ||
<joint name="intermediate_joint" type="fixed"> | ||
<origin rpy="1.57079632679 0 0" xyz="0 0 0.75"/> | ||
<parent link="base"/> | ||
<child link="intermediate_link"/> | ||
</joint> | ||
<link name="intermediate_link"> | ||
<!-- intermediate_link has inertial and visual geometry of a half-cube --> | ||
<inertial> | ||
<mass value="6"/> | ||
<origin rpy="0 0 0" xyz="0 0 0"/> | ||
<inertia ixx="0.625" ixy="0" ixz="0" iyy="1.0" iyz="0" izz="0.625"/> | ||
</inertial> | ||
<visual> | ||
<geometry> | ||
<box size="1.0 0.5 1.0"/> | ||
</geometry> | ||
<origin rpy="0 0 0" xyz="0 0 0"/> | ||
</visual> | ||
</link> | ||
|
||
<!-- Continuous joint connected to intermediate_link --> | ||
<joint name="rotary_joint" type="continuous"> | ||
<origin rpy="0 0 1.57079632679" xyz="0 0.75 0"/> | ||
<axis xyz="1 0 0"/> | ||
<parent link="intermediate_link"/> | ||
<child link="rotary_link"/> | ||
</joint> | ||
<link name="rotary_link"> | ||
<!-- rotary_link has inertial and visual geometry of a cube equivalent to the | ||
merged properties of base and intermediate_link. --> | ||
<inertial> | ||
<mass value="12"/> | ||
<origin rpy="0 0 0" xyz="0 0 0"/> | ||
<inertia ixx="2" ixy="0" ixz="0" iyy="2" iyz="0" izz="2"/> | ||
</inertial> | ||
<visual> | ||
<geometry> | ||
<box size="1.0 1.0 1.0"/> | ||
</geometry> | ||
<origin rpy="0 0 0" xyz="0 0 0"/> | ||
</visual> | ||
</link> | ||
|
||
</robot> |
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,34 @@ | ||
<?xml version="1.0" ?> | ||
<robot name="fixed_joint_simple"> | ||
|
||
<link name="base"> | ||
<inertial> | ||
<mass value="1"/> | ||
<origin rpy="0 0 0" xyz="0 0 0"/> | ||
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> | ||
</inertial> | ||
</link> | ||
|
||
<!-- Intermediate fixed joint that will be reduced. --> | ||
<joint name="fixed_joint" type="fixed"> | ||
<origin rpy="0 0 0" xyz="0 0 0"/> | ||
<parent link="base"/> | ||
<child link="child_link"/> | ||
</joint> | ||
|
||
<!-- Child link with visual that will be merged to base link --> | ||
<link name="child_link"> | ||
<inertial> | ||
<mass value="1"/> | ||
<origin rpy="0 0 0" xyz="0 0 0"/> | ||
<inertia ixx="1" ixy="0" ixz="0" iyy="1.0" iyz="0" izz="1"/> | ||
</inertial> | ||
<visual> | ||
<geometry> | ||
<box size="1.0 1.0 1.0"/> | ||
</geometry> | ||
<origin rpy="0 0 0" xyz="0 0 0"/> | ||
</visual> | ||
</link> | ||
|
||
</robot> |
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