0
$\begingroup$

Rosanswers logo

I've been trying to create a better visualization for our robot using Rviz. I'm working with HERB, which has structure very similar to the pr2, and my goal is to create a new robot model with textures similar to the visualization for pr2.

It looks like the relevant files for the pr2 are in pr2_description, and the main models are collada files. I've been attempting to create similar models using Blender, MeshLab, and ProEngineer, but nothing shows up with color in Rviz.

Many of my problems are very similar to this post, though I'm using Rviz instead of Gazebo. Correct shading isn't necessary - but we need the ability to color an object without having to break it into separate models for Rviz to color independently.

The pr2 model loads just fine. What software was used to create this model? Maybe I can use the same procedure to avoid the picky characteristics of Blender, Collada, and Rviz.

Thank you!


Originally posted by luckyeights on ROS Answers with karma: 31 on 2012-03-23

Post score: 2


Original comments

Comment by hsu on 2012-04-05:
PR2 meshes were shrink-wrapped from CAD files in Pro-E, then manually vertex-reduced, hole patched, cleaned up and textured using commercial meshing tools, and finally exported as collada meshes by link. In the open source world, the few mesh editors I know and use are blender, wings3d and meshlab.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

If you just want to color parts differently, you can either use materials or textures. A working example using materials can be found in the hector_quadrotor_urdf package. In this package, you can find urdf, meshes and the blender model of a quadrotor with differently colored parts. This should give you a pretty good idea of how material based coloring works. Material based coloring is pretty easy as you can just assign materials on a per face basis and you don't have to care about uv unwrapping etc. in Blender. If you use materials it should be noted that gazebo (in electric at least) apparently calculates bounding boxes based on materials. I'm not sure if other collision checking mechanisms (e.g. collision checking for arm_navigation etc.) also do this. I'd recommend using a plain .stl for the collision model for this reason.

Texture based coloring also works with Blender 2.62, but I had some troubles with using alpha for textures. A example of a urdf model using both textures (logo on main body) and materials (hokuyo LIDAR, Kinect) can be seen here:

image description

As can be seen, there are still some quirks in the electric versions of gazebo and rviz. The color of the LIDAR for example looks like intended in gazebo, but bright yellow in rviz. Haven't tried fuerte yet, but I think there a fixes in the work for some of the ambient color and rendering problems both in rviz and gazebo.

/edit: If you don't care about proper shading, you can try manually setting emissive and ambient terms for the materials you use as described here in the overview section.


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2012-03-24

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Airuno2L on 2014-03-14:
Thanks for the explaination. I've had a long week trying to figure out the best way to make colored gazebo/rviz models. Solidworks doesn't export .dae, but can do color .ply. Meshlab can open the color ply but ignores colors when exporting .dae. Painting the part in blender (using materials like this http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Multiple_Materials_Per_Object) is the only way I've found.

$\endgroup$
0
$\begingroup$

Rosanswers logo

I have no idea about the PR2, but I have created colored models for rviz in blender.

AFAIK it needs to be a collada file and you need to use textures to provide the colorization. Maybe that already solves the problem.


Originally posted by dornhege with karma: 31395 on 2012-03-24

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.