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

Investigate on how to fix the colors in the urdf models #216

Closed
GiulioRomualdi opened this issue Jan 27, 2022 · 5 comments · Fixed by #217
Closed

Investigate on how to fix the colors in the urdf models #216

GiulioRomualdi opened this issue Jan 27, 2022 · 5 comments · Fixed by #217

Comments

@GiulioRomualdi
Copy link
Member

Thanks to robotology/idyntree#961 it will be possible to display the icub models with the colors defined in the urdf files.

I noticed that the robot colors are "randomly" chosen when the model is generated. As a consequence, the representation of the model is a bit bizarre

image

This is how TALOS is loaded by the very same visualizer

Do you think it's possible to fix the color of the links?

cc @traversaro

@traversaro
Copy link
Member

traversaro commented Jan 28, 2022

Yes, we can:

Both options are fine for me. We also need to identify which color we want to use.

Note that simmechanics-to-urdf already have a similar option (see https://github.com/robotology/simmechanics-to-urdf/blob/f6055ab8d627c45138ddde46532ea42a74b48caa/simmechanics_to_urdf/firstgen.py#L1116), but that would require to add a line in the yaml for each link to set a different color, so it may not be super-convenient.

@GiulioRomualdi
Copy link
Member Author

Note that simmechanics-to-urdf already have a similar option (see https://github.com/robotology/simmechanics-to-urdf/blob/f6055ab8d627c45138ddde46532ea42a74b48caa/simmechanics_to_urdf/firstgen.py#L1116), but that would require to add a line in the yaml for each link to set a different color, so it may not be super-convenient.

I actually noticed that this dictionary is filled by the xml file and not by the yaml file: From here -> here -> finally here

As far as I understood the xml file is generated by simmechanics and it cannot be modified.

Should I replicate the same logic for the yaml file?

@traversaro
Copy link
Member

Note that simmechanics-to-urdf already have a similar option (see https://github.com/robotology/simmechanics-to-urdf/blob/f6055ab8d627c45138ddde46532ea42a74b48caa/simmechanics_to_urdf/firstgen.py#L1116), but that would require to add a line in the yaml for each link to set a different color, so it may not be super-convenient.

I actually noticed that this dictionary is filled by the xml file and not by the yaml file: From here -> here -> finally here

As far as I understood the xml file is generated by simmechanics and it cannot be modified.

You are right, I misunderstood the code.

Should I replicate the same logic for the yaml file?

I guess not, until we have a need for it.

@GiulioRomualdi
Copy link
Member Author

#217 attempts to close this issue

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.

2 participants