Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec 1.12: link_state, joint_state changes #1461

Merged
merged 21 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b979877
Spec 1.12: add _state suffix to state subelements
scpeters Feb 27, 2024
f5d2571
Define //joint_state in joint_state.sdf
scpeters Jul 7, 2024
f84706e
Update Migration guide
scpeters Jul 8, 2024
e577e15
Merge branch 'main' into scpeters/state_1_12_suffix
scpeters Jul 8, 2024
a6fccc3
Merge branch 'main' into scpeters/state_1_12_suffix
scpeters Jul 9, 2024
53a5378
Merge branch 'main' into scpeters/state_1_12_suffix
scpeters Jul 10, 2024
9af6119
update migration guide
scpeters Jul 20, 2024
13229e0
joint_state: add axis[2]?_state, deprecate angle
scpeters Jul 7, 2024
a0e86e6
link_state: add vector3 linear/angular components
scpeters Jul 8, 2024
f0e5536
Merge branch 'main' into scpeters/state_1_12
scpeters Aug 19, 2024
d7a887f
Add //link_state/angular_*/@degrees
scpeters Aug 20, 2024
4e07a21
Add //link_state/*_wrench, //joint_state/*/effort
scpeters Aug 20, 2024
a266d6b
Specify model_state within a model
scpeters Aug 20, 2024
56e59f8
nested_model test: Update state syntax
scpeters Aug 22, 2024
de15ea6
Add //world/include/model_state
scpeters Aug 26, 2024
17c8efd
Merge branch 'sdf15' into scpeters/state_1_12
scpeters Aug 26, 2024
3ecd891
Merge branch 'sdf15' into scpeters/state_1_12
scpeters Aug 27, 2024
3fa2308
Clarify element path in migration guide
scpeters Aug 28, 2024
8521907
Use force, torque instead of angular/linear_wrench
scpeters Aug 28, 2024
107146b
Merge remote-tracking branch 'origin/sdf15' into scpeters/state_1_12
scpeters Aug 28, 2024
1b77045
Clarify that degrees is only for rotational axes
scpeters Aug 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,33 @@ ABI was broken for `sdf::Element`, and restored on version 11.2.1.

## SDFormat specification 1.11 to 1.12

### Additions

1. **joint_state.sdf**:
+ `//joint_state/axis_state/position`
+ `//joint_state/axis_state/velocity`
+ `//joint_state/axis_state/acceleration`
+ `//joint_state/axis_state/effort`
+ `//joint_state/axis2_state/position`
+ `//joint_state/axis2_state/velocity`
+ `//joint_state/axis2_state/acceleration`
+ `//joint_state/axis2_state/effort`

1. **link_state.sdf**:
+ `//link_state/linear_velocity`
+ `//link_state/angular_velocity`
+ `//link_state/linear_acceleration`
+ `//link_state/angular_acceleration`
+ `//link_state/force`
+ `//link_state/torque`

1. **model.sdf**:
+ `//model/model_state`
+ `//model/include/model_state`

1. **world.sdf**:
+ `//world/include/model_state`

### Modifications

1. **state.sdf**, **model_state.sdf**, **joint_state.sdf**, **link_state.sdf**,
Expand All @@ -645,6 +672,20 @@ ABI was broken for `sdf::Element`, and restored on version 11.2.1.
`//world/joint` and `//state/insertions/joint` can represent inserted
`//world/joint` elements.

### Deprecations

1. **joint_state.sdf**:
+ `//joint_state/angle` is deprecated in favor of `//joint_state/axis_state/position`
and `//joint_state/axis2_state/position`.

1. **link_state.sdf**:
+ `//link_state/velocity` is deprecated in favor of `//link_state/angular_velocity`
and `//link_state/linear_velocity`.
+ `//link_state/acceleration` is deprecated in favor of `//link_state/angular_acceleration`
and `//link_state/linear_acceleration`.
+ `//link_state/wrench` is deprecated in favor of `//link_state/torque`
and `//link_state/force`.

## SDFormat specification 1.10 to 1.11

### Additions
Expand Down
116 changes: 115 additions & 1 deletion sdf/1.12/joint_state.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,125 @@
<description>Name of the joint</description>
</attribute>

<element name="angle" type="double" default="0" required="+">
<element name="angle" type="double" default="0" required="-1">
<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 name="axis_state" required="0">
<description>
Contains the state of the first joint axis.
</description>

<element name="position" type="double" default="0" required="0">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't position be a vector?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this position element is under //joint_state/axis_state and represents the position of the first axis / degree of freedom. there is another position element under //joint_state/axis2_state for the second axis. this mirrors the specification of the //joint/axis and //joint/axis2 elements

<description>The position of the first joint axis.</description>

<attribute name="degrees" type="bool" default="false" required="0">
<description>
If this is a rotational axis and this attribute is true,
the joint position is expressed in units of degrees [deg],
otherwise it is expressed in radians [rad].
If this axis is translational (such as a prismatic joint), the
units will be interpreted in meters [m] regardless of the value of
this attribute.
</description>
</attribute>
</element>

<element name="velocity" type="double" default="0" required="0">
<description>The velocity of the first joint axis.</description>

<attribute name="degrees" type="bool" default="false" required="0">
<description>
If this is a rotational axis and this attribute is true,
the joint velocity is expressed in units of degrees per
second [deg/s], otherwise it is expressed in radians per second
[rad/s].
If this axis is translational (such as a prismatic joint), the
units will be interpreted in meters per second [m/s] regardless of
the value of this attribute.
</description>
</attribute>
</element>

<element name="acceleration" type="double" default="0" required="0">
<description>The acceleration of the first joint axis.</description>

<attribute name="degrees" type="bool" default="false" required="0">
<description>
If this is a rotational axis and this attribute is true,
the joint acceleration is expressed in units of degrees per
second per second [deg/s^2], otherwise it is expressed in radians per
second per second [rad/s^2].
If this axis is translational (such as a prismatic joint), the
units will be interpreted in meters per second per second [m/s^2]
regardless of the value of this attribute.
</description>
</attribute>
</element>

<element name="effort" type="double" default="0" required="0">
<description>The effort applied at the first joint axis.</description>
</element>
</element>

<element name="axis2_state" required="0">
<description>
Contains the state of the second joint axis.
</description>

<element name="position" type="double" default="0" required="0">
<description>The position of the second joint axis.</description>

<attribute name="degrees" type="bool" default="false" required="0">
<description>
If this is a rotational axis and this attribute is true,
the joint position is expressed in units of degrees [deg],
otherwise it is expressed in radians [rad].
If this axis is translational (such as a prismatic joint), the
units will be interpreted in meters [m] regardless of the value of
this attribute.
</description>
</attribute>
</element>

<element name="velocity" type="double" default="0" required="0">
<description>The velocity of the second joint axis.</description>

<attribute name="degrees" type="bool" default="false" required="0">
<description>
If this is a rotational axis and this attribute is true,
the joint velocity is expressed in units of degrees per
second [deg/s], otherwise it is expressed in radians per second
[rad/s].
If this axis is translational (such as a prismatic joint), the
units will be interpreted in meters per second [m/s] regardless of
the value of this attribute.
</description>
</attribute>
</element>

<element name="acceleration" type="double" default="0" required="0">
<description>The acceleration of the second joint axis.</description>

<attribute name="degrees" type="bool" default="false" required="0">
<description>
If this is a rotational axis and this attribute is true,
the joint acceleration is expressed in units of degrees per
second per second [deg/s^2], otherwise it is expressed in radians per
second per second [rad/s^2].
If this axis is translational (such as a prismatic joint), the
units will be interpreted in meters per second per second [m/s^2]
regardless of the value of this attribute.
</description>
</attribute>
</element>

<element name="effort" type="double" default="0" required="0">
<description>The effort applied at the second joint axis.</description>
</element>
</element>
</element> <!-- End Joint -->
54 changes: 51 additions & 3 deletions sdf/1.12/link_state.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,69 @@
<description>Name of the link</description>
</attribute>

<element name="velocity" type="pose" default="0 0 0 0 0 0" required="0">
<element name="angular_velocity" type="vector3" default="0 0 0" required="0">
<description>Angular velocity of the link frame relative to the world frame.
</description>

<attribute name="degrees" type="bool" default="false" required="0">
<description>
If true, the angular velocity is expressed in units of degrees per
second [deg/s], otherwise it is expressed in radians per second [rad/s].
</description>
</attribute>
</element>

<element name="linear_velocity" type="vector3" default="0 0 0" required="0">
<description>Linear velocity of the link frame relative to the world frame.
</description>
</element>

<element name="velocity" type="pose" default="0 0 0 0 0 0" required="-1">
<description>Velocity of the link. The x, y, z components of the pose
correspond to the linear velocity of the link, and the roll, pitch, yaw
components correspond to the angular velocity of the link
</description>
</element>

<element name="acceleration" type="pose" default="0 0 0 0 0 0" required="0">
<element name="angular_acceleration" type="vector3" default="0 0 0" required="0">
<description>
Angular acceleration of the link frame relative to the world frame.
</description>

<attribute name="degrees" type="bool" default="false" required="0">
<description>
If true, the angular acceleration is expressed in units of degrees per
second per second [deg/s^2], otherwise it is expressed in radians per
second per second [rad/s^2].
</description>
</attribute>
</element>

<element name="linear_acceleration" type="vector3" default="0 0 0" required="0">
<description>
Linear acceleration of the link frame relative to the world frame.
</description>
</element>

<element name="acceleration" type="pose" default="0 0 0 0 0 0" required="-1">
<description>Acceleration of the link. The x, y, z components of the pose
correspond to the linear acceleration of the link, and the roll,
pitch, yaw components correspond to the angular acceleration of the link
</description>
</element>

<element name="wrench" type="pose" default="0 0 0 0 0 0" required="0">
<element name="torque" type="vector3" default="0 0 0" required="0">
<description>Torque acting on the link relative to the world frame.
</description>
</element>

<element name="force" type="vector3" default="0 0 0" required="0">
<description>
Force acting on the link at the link frame relative to the world frame.
</description>
</element>

<element name="wrench" type="pose" default="0 0 0 0 0 0" required="-1">
<description>Force and torque applied to the link. The x, y, z components
of the pose correspond to the force applied to the link, and the roll,
pitch, yaw components correspond to the torque applied to the link
Expand Down
3 changes: 3 additions & 0 deletions sdf/1.12/model.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<description>URI to a resource, such as a model</description>
</element>

<include filename="model_state.sdf" required="0"/>
<include filename="pose.sdf" required="0"/>
<include filename="plugin.sdf" required="*"/>

Expand All @@ -85,6 +86,8 @@
</attribute>
</element>

<include filename="model_state.sdf" required="0"/>

<element name="enable_wind" type="bool" default="false" required="0">
<description>If set to true, all links in the model will be affected by the wind. Can be overriden by the link wind property.</description>
</element>
Expand Down
1 change: 1 addition & 0 deletions sdf/1.12/world.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<description>Override the static value of the included entity.</description>
</element>

<include filename="model_state.sdf" required="0"/>
<include filename="pose.sdf" required="0"/>
<include filename="plugin.sdf" required="*"/>

Expand Down
Loading
Loading