Skip to content

Commit

Permalink
Define //joint_state in joint_state.sdf
Browse files Browse the repository at this point in the history
Include joint_state.sdf from model_state.sdf
and state.sdf for //world/joint states.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Jul 8, 2024
1 parent b979877 commit f5d2571
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
1 change: 1 addition & 0 deletions sdf/1.12/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ set (sdfs
imu.sdf
inertial.sdf
joint.sdf
joint_state.sdf
lidar.sdf
light.sdf
light_state.sdf
Expand Down
16 changes: 16 additions & 0 deletions sdf/1.12/joint_state.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- State information for a joint -->
<element name="joint_state" required="*">
<description>Joint angle</description>

<attribute name="name" type="string" default="__default__" required="1">
<description>Name of the joint</description>
</attribute>

<element name="angle" type="double" default="0" required="+">
<attribute name="axis" type="unsigned int" default="0" required="1">
<description>Index of the axis.</description>
</attribute>

<description>Angle of an axis</description>
</element>
</element> <!-- End Joint -->
16 changes: 1 addition & 15 deletions sdf/1.12/model_state.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,7 @@
<description>Name of the model</description>
</attribute>

<element name="joint_state" required="*">
<description>Joint angle</description>

<attribute name="name" type="string" default="__default__" required="1">
<description>Name of the joint</description>
</attribute>

<element name="angle" type="double" default="0" required="+">
<attribute name="axis" type="unsigned int" default="0" required="1">
<description>Index of the axis.</description>
</attribute>

<description>Angle of an axis</description>
</element>
</element>
<include filename="joint_state.sdf" required="*"/>

<element name="model_state" ref="model_state" required="*">
<description>A nested model state element</description>
Expand Down
2 changes: 2 additions & 0 deletions sdf/1.12/state.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@

<include filename="light_state.sdf" required="*"/>

<include filename="joint_state.sdf" required="*"/>

</element> <!-- End State -->

0 comments on commit f5d2571

Please sign in to comment.