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

[cob_grasp_generation] Convert URDF into OpenRAVE model for cob_grasp_generation #76

Open
fmessmer opened this issue Apr 9, 2016 · 2 comments

Comments

@fmessmer
Copy link
Member

fmessmer commented Apr 9, 2016

Testing parts of what is proposed in #70

This is documenting my trials in order to use the cob_grasp_generation package with any gripper modelled as URDF (related branch is https://github.com/ipa-fxm/cob_manipulation/tree/wip/support_urdf_gripper)

Don't know whether it will work in the end 😉
@ipa-bfb @fmessmer FYI

@fmessmer fmessmer changed the title [cob_grasp_generation] Insight towards URDF-based cob_grasp_generation [cob_grasp_generation] Insights towards URDF-based cob_grasp_generation Apr 9, 2016
@fmessmer
Copy link
Member Author

fmessmer commented Apr 9, 2016

How to create an OpenRAVE model for a gripper with available URDF macro:

  1. Create a new "gripper robot" that just consists of the gripper macro like below and put it into cob_grasp_generation/files/gripper/:

    <?xml version="1.0"?>
    <robot xmlns:xacro="http://www.ros.org/wiki/xacro"
       name="sdh" >
    
    <xacro:include filename="$(find schunk_description)/urdf/sdh/sdh.urdf.xacro" />
    
    <link name="base_link"/>
    
    <xacro:schunk_sdh name="sdh" parent="base_link">
      <origin xyz="0 0 0" rpy="0 0 0" />
    </xacro:schunk_sdh>
    
    </robot>
    
  2. Convert to URDF via rosrun xacro xacro.py sdh.urdf.xacro > sdh.urdf

  3. Convert to Collada via rosrun collada_urdf urdf_to_collada sdh.urdf sdh.dae (http://wiki.ros.org/collada_urdf#urdf_to_collada_command-line_tool)

  4. Create manifest.xml for your Collada model like so:
    `

    <dae_root>./sdh.dae</dae_root>
    `

  5. Zip Collada and manifest with archive manager (use zip compression) then rename the .zip to .zae (http://openrave-users-list.185357.n3.nabble.com/COLLADA-format-editor-for-zae-td3257031.html)

  6. Create a new OpenRAVE env.xml like so:

    <Environment>
    
    <!-- Roboter -->
    <Robot file="gripper/sdh.zae" name="sdh">
      <translation>-1.52295 0.50617 0.01</translation>
      <RotationAxis>0 0 1 180</RotationAxis>
    </Robot>
    
    </Environment>
    
  7. Make sure you have cob_grasp_generation/files included in your OPENRAVE_DATA env variable

@fmessmer
Copy link
Member Author

fmessmer commented Apr 9, 2016

Hmm, while the model then can be loaded into OpenRAVE (see below), I was not able to generate/show/query any grasp (continuing branch https://github.com/ipa-fxm/cob_manipulation/tree/wip/or_env_vs_gripper_type)

Appearently, collada_urdf does not generate/convert essential things like manipulator definitions and such. I guess without intensive investigation, manually extending the dae so that it can be used together with cob_grasp_generation is not suitable...

or_sdh

@fmessmer fmessmer changed the title [cob_grasp_generation] Insights towards URDF-based cob_grasp_generation [cob_grasp_generation] Convert URDF into OpenRAVE model for cob_grasp_generation Apr 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant