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

<joint> <axis> not working correctly in combination with <include> inside <model> (nested model) in sdf >= 1.5 unless old behaviour (sdf <= 1.4) is restored via <use_parent_model_frame> #2401

Open
osrf-migration opened this issue Jan 16, 2018 · 9 comments
Labels
bug Something isn't working major

Comments

@osrf-migration
Copy link

Original report (archived issue) by Andreas Bihlmaier (Bitbucket: andreasBihlmaier).

The original report had attachments: broken_joint_axis_include_demo.tgz


Hi everyone,

I found an issue regarding the "new" (SDF >= 1.5) behavior of in combination with :
The axis of all models that are d with a are wrong. To be more precise, it appears that they do not take the into account and thus turn up wrong with respect to all other coordinate systems in the d model.
The issue is easily reproducible in Gazebo 7 and 8. A minimal example follows (and is attached) together with three screenshots that show the issue using the "Demo Joint Types" model from the online repository.
As there is simply a coordinate transform missing somewhere, I'd estimate someone more familiar with this part of the Gazebo code base, will be able to quickly fix it. I would highly appreciate it.

#!xml

<?xml version="1.0" ?>
<sdf version="1.6">
  <model name="broken_joint_axis_include_demo">

    <include>
      <uri>model://demo_joint_types</uri>
      <name>model1</name>
    </include>

    <include>
      <uri>model://demo_joint_types</uri>
      <name>model2</name>
      <pose>
        2 0 0
        0 0 1.57079 
      </pose>
    </include>

    <joint name="rd_drive_torque_to_beer_joint" type="fixed">
      <parent>model1::heavy_base</parent>
      <child>model2::heavy_base</child>
    </joint>
    
  </model>
</sdf>

The combined model:
gazebo_joint_axis_include_bug01.png

Correct :
gazebo_joint_axis_include_bug03.png

Wrong in d model:
gazebo_joint_axis_include_bug02.png

Note: Everything works if all joints in the d model use <use_parent_model_frame>1</use_parent_model_frame>, but then we are back at the non-intuitive way is defined (to model instead of child frame).

@osrf-migration
Copy link
Author

Original comment by Andreas Bihlmaier (Bitbucket: andreasBihlmaier).


  • Edited issue description

1 similar comment
@osrf-migration
Copy link
Author

Original comment by Andreas Bihlmaier (Bitbucket: andreasBihlmaier).


  • Edited issue description

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


It looks like your example is using nested models. I think the joint axis is being interpreted correctly if a model is <include>d into a world. If so, let's update the title to indicate that this bug refers specifically to nested models, since that will help us focus our search for a fix.

@osrf-migration
Copy link
Author

Original comment by Andreas Bihlmaier (Bitbucket: andreasBihlmaier).


  • changed title from " not working correctly in combination with in sdf >= 1.5 unless old behaviour (sdf <= 1.4) is restored via <use_parent_model_frame>" to " not working correctly in combination with inside (nested model) in sdf >= 1.5 unless old behaviour (sdf <= 1.4) is restored via <use_parent_model_frame>"

@osrf-migration
Copy link
Author

Original comment by Andreas Bihlmaier (Bitbucket: andreasBihlmaier).


@scpeters Yes, this issue only pertains to inside a tag. I updated the title accordingly.

@osrf-migration
Copy link
Author

Original comment by Guilherme Carvalho (Bitbucket: guilhermepscarvalho).


ping!

Was this solved in Gazebo 9?

@osrf-migration
Copy link
Author

Original comment by Andreas Bihlmaier (Bitbucket: andreasBihlmaier).


Running gazebo9 9.4.1-1~bionic I cannot use the "Demo Joint Types" model anymore:

gazebo9_issue_demo_joint_types.gif

@osrf-migration
Copy link
Author

Original comment by Andreas Bihlmaier (Bitbucket: andreasBihlmaier).


Issue still persists:

gazebo9_include_issue-2.gif

#!xml

<?xml version="1.0"?>

<model>
  <name>Broken Joint Axis Include Demo 2</name>
  <version>1.0</version>
  <sdf>model.sdf</sdf>

  <author>
    <name>Andreas Bihlmaier</name>
    <email>bihlmaier@robodev.eu</email>
  </author>

  <description>
    Demonstrates how joint axis is broken when using include unless use_parent_model_frame is used.
    Uses two instances of "Demo Joint Friction" from Gazebo model repository.
		Btw. "Demo Joint Types" is broken!
  </description>
</model>
#!xml

<?xml version="1.0" ?>
<sdf version="1.6">
  <model name="broken_joint_axis_include_demo2">

    <include>
      <uri>model://demo_joint_friction</uri>
      <name>model1</name>
    </include>

    <include>
      <uri>model://demo_joint_friction</uri>
      <name>model2</name>
      <pose>
        2 0 0
        0 0 1.57079 
      </pose>
    </include>

    <joint name="some_fixed_joint" type="fixed">
      <parent>model1::link_base</parent>
      <child>model2::link_base</child>
    </joint>
    
  </model>
</sdf>

@osrf-migration
Copy link
Author

Original comment by Shane Loretz (Bitbucket: Shane Loretz, GitHub: sloretz).


Running gazebo9 9.4.1-1~bionic I cannot use the "Demo Joint Types" model anymore:

Gazebo 9 is unable to load Demo joint types because at some point the code handling revolute2 joints got broken. See issue #2239.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

1 participant