I am trying to import some mesh files just for the sake of visualization in our URDFs, but can't seem to get it to work no matter what I do. I have the models exported as .obj/.mtl, and these work perfectly fine when using online model viewers. When I try to reference them in my URDF and visualize them in Drake, small parts of the model don't get displayed. In this image, there is supposed to be a component that the screws are in, but it just doesn't load. This is how the model is supposed to look, as seen on 3dviewer.net.
I also tried converting the .obj/.mtl files into a .gtlf using a number of options, but they seem to lose all material properties when I do that. All parts of the model display appropriately, but they all have the same material.
This is the full extent of the code I am running:
from pydrake.all import ModelVisualizer, PackageMap, StartMeshcat
meshcat = StartMeshcat()
visualizer = ModelVisualizer(meshcat=meshcat)
visualizer.AddModels("URDFs/test.urdf")
visualizer.Run()
meshcat.DeleteAddedControls()
The issue was that the body not appearing was somehow assigned multiple materials. I fixed this by uploading the file to 3dviewer.net, sorting by materials, then looking through the meshes that had those materials applied. I was able to manually edit the .obj to remove the duplicated portions.