Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[meshcat] More robust parsing of .mtl texture map filenames (#17550)
In RobotLocomotion/models#18 (homecart_basecart.mtl) I ran into a texture map specification that specified a scale option in the map_Kd line. This defeated the simple regex expression that I had implemented in meschat.cc. meshcat.cc doesn't need to parse these options properly; it only needs to successfully extract the filename so that the file can be shipped over the websocket. I've updated the parsing line according to the mtl specification to ignore options. To reproduce the problem, run meshcat_manual_test with the change to box.obj.mtl but without the fix to meshcat.cc. You will see that the box appears in meshcat without a texture and a warning from meshcat.cc is printed to the console. The change to meshcat.cc resolves the problem.