Robotics StackExchange | Archived questions

Can Gazebo import normal, roughness and other maps of a Wavefront OBJ object?

When I use an .obj as mesh in the SDF file, Ignition Gazebo only uses the albedo map from the .mtl file. Should i change something to make Gazebo load other maps (like normal, roughness, transparency) or is this the expected behavior? Setting these maps in the SDF file is possible, but not ideal. Especially when the object has multiple textures.

Asked by azazdeaz on 2023-01-08 12:48:16 UTC

Comments

Answers

Gazebo can import the maps you mentioned, but the format it expects them might be different than what is exported by the 3d tool you're using. Here's the code if it helps: https://github.com/gazebosim/gz-common/blob/gz-common5/graphics/src/tiny_obj_loader.h and https://github.com/gazebosim/gz-common/blob/f62bbb03a268b338c750123df6d5e0a1bcb4fb4a/graphics/src/OBJLoader.cc#L86

Asked by azeey on 2023-01-12 22:21:15 UTC

Comments