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

Add Panda robot model #2

Merged
merged 7 commits into from
Feb 4, 2020
Merged

Add Panda robot model #2

merged 7 commits into from
Feb 4, 2020

Conversation

paolo-viceconte
Copy link
Contributor

@paolo-viceconte paolo-viceconte commented Feb 3, 2020

The Panda.urdf model was obtained from the models provided in https://github.com/mkrizmancic/franka_gazebo/robots by executing

rosrun xacro xacro --inorder panda_arm_hand.urdf.xacro > Panda.urdf

Before the conversion, the original panda_arm_hand.urdf.xacro file was modified as follows:

  • the paths to the panda_arm.xacro and hand.xacro files included in the file were adjusted as needed
  • the default gazebo parameter was set to false in order to avoid unsupported features in the final Panda.urdf file

The included files (panda_arm.xacro and hand.xacro) were in turn modified as follows:

  • the path prefix package:// was replaced by file:// in the paths to the collision and visual meshes in order to be consistent with the format required in this folder

The mesh files were instead taken from https://github.com/cpezzato/panda_simulation because they have the phong ambient parameter set to 1 1 1 1 which results in a Panda robot visualized in its original colors. The phong ambient parameter set to 0 0 0 1 in the mesh files provided in https://github.com/mkrizmancic/franka_gazebo/robots resulted instead in a Panda robot visualized in dark gray.

panda

@paolo-viceconte paolo-viceconte changed the title Robot/panda Add Panda robot model Feb 3, 2020
@diegoferigo
Copy link
Member

I want to test this locally but the PR looks good to me. Though, I would wait before merging because I'm not actually sure whether the file:// prefix is required or not. I suspect that it will work with Ignition Gazebo but it won't work with PyBullet, so I would rather remove the URI and just leave the relative path. I just checked and using the IGN_FILE_PATH everything seems to work. I let you know how to proceed.

Actually, I found a bug in sdformat that prevents using relative paths if the model is urdf. Instead, if it gets converted to an sdf, relative meshes are loaded correctly. At this point we still have to rely on IGN_FILE_PATH waiting an upstream fix.

The same comment applies to #1.

@diegoferigo
Copy link
Member

Without the file:// URI, urdf models do not find mesh files even if IGN_FILE_PATH is configured. For the time being we can merge the models as they are. They are not yet compatible with PyBullet, but they will be as soon as resolving relative mesh folders will be fixed for urdfs (and the URI get removed).

@diegoferigo
Copy link
Member

I copy here for future reference a comment by @paolo-viceconte from a private repo:

I discovered that both in https://github.com/mkrizmancic/franka_gazebo and in https://github.com/cpezzato/panda_simulation the visual meshes (i.e. all the *.dae files) have the transparent tag set to A_ONE, which seems to be ok only in old versions of gazebo. One possible solution is to set it to RGB_ZERO, as detailed here.

Related to gazebosim/gz-rendering#89. Tested with OGRE 1.

@paolo-viceconte
Copy link
Contributor Author

I discovered that both in https://github.com/mkrizmancic/franka_gazebo and in https://github.com/cpezzato/panda_simulation the visual meshes (i.e. all the *.dae files) have the transparent tag set to A_ONE, which seems to be ok only in old versions of gazebo. One possible solution is to set it to RGB_ZERO, as detailed here.

Given the most recent updates from gazebosim/gz-rendering#89, the RGB_ZERO transparent tags inserted in the Panda visual meshes need to be reverted to the original A_ONE value. Done via #24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants