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

dae file for meshes #3

Open
PedroDesRobots opened this issue Dec 9, 2019 · 9 comments
Open

dae file for meshes #3

PedroDesRobots opened this issue Dec 9, 2019 · 9 comments

Comments

@PedroDesRobots
Copy link

Hi,

We're using Talos inside our DART simulation, however, STL format is not handled properly concerning body color.
Is it possible to update your repo with the dae file as well ?

@v-lopez
Copy link
Contributor

v-lopez commented Dec 10, 2019

Hello Pedro,

We're moving this internally and will get back to you soon.

@lucamarchionni
Copy link
Member

Hi Pedro,
we would like to follow-up this issue.
DAE with colors can be obtained from the provided STL files using MeshLab and the following command:

meshlabserver -i femur.STL -s black_coloring.mlx -o femur.dae -om vc

black_coloring.mlx is a simple script to define the color of the vertices.
To color the mesh in black (in RGB coordinates is (0,0,0)), it will be:

<!DOCTYPE FilterScript>
<FilterScript>
 <filter name="Vertex Color Filling">
  <Param type="RichDynamicFloat" value="0" min="0" name="r" max="255"/>
  <Param type="RichDynamicFloat" value="0" min="0" name="g" max="255"/>
  <Param type="RichDynamicFloat" value="0" min="0" name="b" max="255"/>
 </filter>
</FilterScript>

The DAE files should be used in the URDF for visual and collision geometries.
@PedroDesRobots Could you please test if this will work in DART?

@PedroDesRobots
Copy link
Author

Hi @lucamarchionni,
I have converted the provided STL files using MeshLab and your simple script to define the color.
It creates the dae file properly. Then, when I open it with MeshLab the mesh is in black. At this point, it works.

At the begin with STL files, we obtain this Talos :
talos_stl

But I don't know why we got a "grey" Talos (no white or black parts) into DART with dae file.
talos_dae
Now, it's better. Talos is not transparent anymore but we don't obtain exactly the desired color.
I know that for iCub, the dae files were generated directly from Blender.

@PedroDesRobots
Copy link
Author

In gazebo we got this Talos with dae files, thanks to material tag inside the urdf :
talos_gazebo_dae

@lucamarchionni
Copy link
Member

Hi,
visualization meshes in DAE format need a texture file for being properly rendered in Rviz.
I generated the new DAE meshes with texture and modified the URDF files in the branch "dae_meshes_with_color". @PedroDesRobots could you test it in DART?

@PedroDesRobots
Copy link
Author

Hi,
it works clearly better with a texture file inside the DAE. Thanks a lot for generating those files 👍 .
talos_dart_dae

It still to have transparent parts but at this point, it should be specific at DART I guess.

@FilippoSmald1
Copy link

Good moring,
I'm having troubles in parsing Talos in DART. I am trying to generate the urdf file from the urdf.xacro, by using something like

rosrun xacro xacro --inorder model.urdf.xacro > model.urdf

without success. @PedroDesRobots, @lucamarchionni, do you have any suggestion?
Thank you very much,
Filippo

@PedroDesRobots
Copy link
Author

Hi @FilippoSmald1,

I don't know exactly your error but maybe you need to add some parameters like enable_crane (True or False) and foot_collision (default, thinbox, tallbox).

For example :
rosrun xacro xacro --inorder talos_full_common.urdf.xacro > test_talos.urdf enable_crane:=False foot_collision:=thinbox

@FilippoSmald1
Copy link

Thank you

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

4 participants