Open osrf-migration opened 7 years ago
Original comment by Peter Horak (Bitbucket: pchorak).
Example:
<?xml version="1.0" ?>
<sdf version="1.5">
<world name="default">
<include>
<uri>model://sun</uri>
</include>
<include>
<uri>model://ground_plane</uri>
</include>
<model name="model1">
<pose>-2 -2 1.5 0 0 0</pose>
<link name="link">
<collision name="collision">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
</visual>
</link>
<joint name="joint" type="revolute">
<pose>0 -0.5 -0.5 0 0 0</pose>
<parent>world</parent>
<child>link</child>
</joint>
</model>
<model name="model2">
<pose>0 0 1.5 0 0 0</pose>
<link name="link">
<collision name="collision">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
</visual>
</link>
<joint name="joint" type="universal">
<pose>0 -0.5 -0.5 0 0 0</pose>
<parent>world</parent>
<child>link</child>
<axis>
<xyz>1 1 0</xyz>
</axis>
</joint>
</model>
<model name="model3">
<pose>2 2 1.5 0 0 0</pose>
<link name="link">
<collision name="collision">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
</visual>
</link>
<joint name="joint" type="prismatic">
<pose>0 -0.5 -0.5 0 0 0</pose>
<parent>world</parent>
<child>link</child>
</joint>
</model>
</world>
</sdf>
Original report (archived issue) by Peter Horak (Bitbucket: pchorak).
The default joint axis is incorrect for ODE. The sdformat specifies the z-axis (0, 0, 1) as the default here . The other physics engines are consistent with this and use the z-axis. However, ODE appears to use the x-axis as the default. This also creates an inconsistency with the visual, which shows the z-axis even though the simulation behaves as if the x-axis is the joint axis.
A few related observations:
The online sdf specification does not show the default values for many elements including the joint axis.
The universal joint requires the two axes to be perpendicular. Specifying non-perpendicular axes causes different behavior depending on the physics engine used.