I've update a robot description that previously used STL files (created from Solidworks) to use COLLADA files. Everything worked fine before, just wanted to make it prettier - i.e. add colors to the model.
I imported the STLs into SketchUp 8 using some plugin, and that went well. Upon adding correct colors, I exported to COLLADA using Sketchups builtin exporter. This is a screenshot of SketchUp with the correct colors:
neobotix platform SketchUp http://farm8.staticflickr.com/7091/7402536638_8cf443cb26.jpg
Problem is that the COLLADA file comes up with wrong colors in Rviz:
neobotix platform Rviz http://farm8.staticflickr.com/7096/7402561412_b8a810b481.jpg
I have tested the following:
- Use in model (Rviz) - Colors look too dark (see screenshot)
- Open in Meshlab - No colors
- Open in Preview.app on OSX - Colors look good
Please advice, and thank you in advance!
Originally posted by mrath on ROS Answers with karma: 100 on 2012-06-19
Post score: 2
Original comments
Comment by Kei Okada on 2012-06-20:
can you attach the COLLADA file that produces wrong color?
Comment by mrath on 2012-06-25:
Updated with attachments, kinda.
Comment by dornhege on 2012-06-25:
I'm not sure, but does rviz use the colors or only works with textures?
Comment by mrath on 2012-06-25:
I actually don't know. I just tried putting textures instead of color on some of the faces in sketchup, then re-exporting. It looks different, but not better, and textures does not show up in Rviz.
Comment by dornhege on 2012-06-25:
I'm sure textures work, because I have used that.
Comment by mrath on 2012-06-25:
From SketchUp as well, I presume? I guess I can make some textures which are just one plain color. Seems like an unnecessary hack though.
Comment by Kei Okada on 2012-06-25:
texture is not supported in collada_parser. I'll try if we can fix. BTW how did you visualize your model? I'm using [http://www.ros.org/wiki/collada_urdf/Tutorials/Working%20Directly%20with%20COLLADA] but it shows URDF failed model parse
Comment by mrath on 2012-08-07:
I am pushing the robot URDF to the parameter server and visualizing in Rviz. The COLLADA files are just for visuals.
Comment by mcevoyandy on 2012-08-24:
you mentioned the parts were made in solidworks. Any reason you didn't use the solidworks collada export? Works perfectly for me... http://labs.solidworks.com/Products/product.aspx?name=colladaexport
Comment by mrath on 2012-09-10:
I have not tried that, no, it seemed like to much trouble at the time. In the meantime I've lived with the bad model colors (remember this is only for visuals), but I might check that out at some point. Thanks.