scpeters-test / sdformat

Simulation Description Format (SDF) parser and description files.
http://sdformat.org
Other
1 stars 0 forks source link

Joint axis always uses parent model frame when nested #219

Closed scpeters-test closed 4 years ago

scpeters-test commented 5 years ago

Original report (archived issue) by Addisu Z. Taddese (Bitbucket: azeey, GitHub: azeey).

The original report had attachments: joint_axis_test.zip


When a model is nested in another model, the joints inside the child model are parsed as though use_parent_model_frame is set to true even if it is not.

Relevant line of code: https://github.com/scpeters-test/sdformat/blob/master/src/parser.cc#L1104

Steps to Reproduce

  1. Extract attached zip file. Place the included_joint folder in your gazebo model database. This can be done by copying the folder to ~/.gazebo/models.
  2. Run gazebo
  3. Spawn the joint_axis_test model by running gz model -f joint_axis_test.sdf -m joint_axis_test

Expected behavior:

The model included_joint has one revolute joint with an axis set to 0 0 1. This model is nested in another model as

<include>
  <uri>model://included_joint</uri>
  <pose>0 0 0.5 0 -1.570796 0</pose>
</include>

Since use_parent_model_frame is not set, this vector is taken to be in the local frame of the child link wheel. The expected behavior is that the axis is aligned with the longitudinal direction of the cylinder.

default_gzclient_camera(1)-2019-09-04T11_02_18.648658.jpg

Actual behavior:

The axis is not aligned with the longitudinal direction of the cylinder because it is rotated by the parent model's pose.

default_gzclient_camera(1)-2019-09-04T11_01_54.664453.jpg

Reproduces how often:

100%

Versions

all

Additional Information

scpeters-test commented 4 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters).


see pr #657

scpeters-test commented 4 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters).


pr #657