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

The meshes of icub3 seems not compatible with rviz2 #229

Closed
Nicogene opened this issue Dec 7, 2022 · 9 comments · Fixed by #230
Closed

The meshes of icub3 seems not compatible with rviz2 #229

Nicogene opened this issue Dec 7, 2022 · 9 comments · Fixed by #230

Comments

@Nicogene
Copy link
Member

Nicogene commented Dec 7, 2022

When trying to visualize the icub3 meshes on rviz2 i got these errors:

[ERROR] [1670425894.974567837] [rviz2]: The STL file 'package://iCub/meshes/simmechanics/sim_icub3_torso_2_prt.stl' is malformed. It starts with the word 'solid' and also contains the word 'endsolid', indicating that it's an ASCII STL file, but rviz can only load binary STL files so it will not be loaded. Please convert it to a binary STL file.

ros2 pkg list | grep iCub works fine.

cc @pattacini @traversaro

@fiorisi
Copy link
Member

fiorisi commented Dec 7, 2022

I remember that for the iCub 2.5 we had to convert the meshes for a similar issue.
If you check the meshes of the robot you'll see that actually are binary .stl files: https://github.com/robotology/icub-models-generator/tree/master/simmechanics/data/icub2_5/meshes/simmechanics

In order to correctly set the paths in the URDF we use the option filenameformatchangeext.
As an example, see also the associated CMake line.

I've tried to generate the binary mesh for the part that gives you the error.

image

Let me know if the problem is solved.

@Nicogene
Copy link
Member Author

Nicogene commented Dec 7, 2022

Exporting as binary seems to work thanks!

immagine

@traversaro
Copy link
Member

Should we update the Creo 2 URDF guide with this indication? The guide should be at https://github.com/icub-tech-iit/cad-mechanics-public/wiki/Creo-mechanism-to-URDF (see http://wiki.icub.org/wiki/Creo_Mechanism_to_URDF), but I can't find it anymore.

@Nicogene
Copy link
Member Author

@traversaro the guide has been moved here

@traversaro
Copy link
Member

Related RViz issues:

@traversaro
Copy link
Member

@traversaro the guide has been moved here

Thanks, I updated the link in https://wiki.icub.eu/wiki/Creo_Mechanism_to_URDF to point there.

I guess to solve this issue we need to can convert the meshes in this repo from ascii to binary, it can be done with command line tools, back in time I have a vague memory of using https://github.com/cmpolis/convertSTL, but we could use other tools.

For the future we should make sure that at some point in the model generation pipeline (either before or after the files are committed in this repo) the stl files should be converted from ascii to binary.

@fiorisi
Copy link
Member

fiorisi commented Dec 14, 2022

For the future we should make sure that at some point in the model generation pipeline (either before or after the files are committed in this repo) the stl files should be converted from ascii to binary.

I will investigate if the Simscape Multibody Link allows to set the .stl generation with the binary option. For the time being, we have to convert the files in postprocessing.

@Nicogene
Copy link
Member Author

Here is a simple script for converting the stl: https://github.com/cmpolis/convertSTL

It seems to work fine, shall we include it in our pipeline of urdf generation?

@traversaro
Copy link
Member

Here is a simple script for converting the stl: https://github.com/cmpolis/convertSTL

It seems to work fine, shall we include it in our pipeline of urdf generation?

Ok for me.

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

Successfully merging a pull request may close this issue.

3 participants