Gazebo | Ignition | Community
Ask Your Question
0

Texture of object loading as black with dots and text

asked 2023-03-14 20:53:51 -0500

mmDrone gravatar image

For some reason the texture on my mesh file loads as black for Gazebo 11 with ROS Noetic (gazebo fortress). The texture setup I have will load and configure perfectly fine for Gazebo garden on a different system with ROS2 Humble.. For some reason, when I load the same exact object into the predecessor version, the object renders with a black layer that has text and dots in it sometimes around the object. When I zoom in close onto the object, I can see through the black shielding layer and observe the true colors of the object. Does anyone know why this could be happening?

edit retag flag offensive close merge delete

Comments

Can you clarify if you're using Gazebo-classic (Gazebo 11) or Gazebo Fortress? Also, can you provide a minimal example that shows the problem?

azeey gravatar imageazeey ( 2023-03-16 10:57:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-03-16 12:01:26 -0500

chutsu gravatar image

updated 2023-03-16 12:05:37 -0500

The way the new Gazebo Garden loads models with textures is totally different to how it used to be. See "Textures" towards the bottom of this page: https://gazebosim.org/api/gazebo/3.7/...

Took some creative google search to find this information. But the TLDR is instead of importanting a model texture the old OGRE way where you defined a .material file that ogre reads, you just import a MTL + OBJ or DAE file.

If you know how to use Blender it isn't too bad. You can create your 3D model with blender and then export it to MTL + OBJ (make sure you use PBR + Relative paths), or DAE (easier) file format. Then include the model as

<geometry>
  <mesh>uri://PATH_TO_MODEL</mesh>
<geometry>

^ where PATH_TO_MODEL is the folder name of your model with the appropriate model.sdf model.conf and other files.

edit flag offensive delete link more

Comments

The documentation shared worked great for me. I used:

<include> <uri> model://<model_name> </uri> </include>

The texture is now loaded in properly. Thank you!

mmDrone gravatar imagemmDrone ( 2023-03-27 16:09:11 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2023-03-14 20:53:51 -0500

Seen: 329 times

Last updated: Mar 16 '23