RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.25k stars 1.25k forks source link

MeshcatVisualizer assert-fails when there is geometry in the world / default model instance #12127

Closed gizatt closed 4 years ago

gizatt commented 4 years ago

In MeshcatVisualizer::load, for each link, the full link name (frame_name in the code) is assume to be of the form robot_name::link_name, which is true except for links in belonging to the world or default model instance, in which case their name is just link_name. (See GetScopedName in multibody_plant.cc.) This causes an assertion failure when _parse_name gets called on the frame_name.

@pangtao22 That code path is new from #12090 -- sorry I didn't catch it in review. I don't think this can happen unless geometry is added procedurally (via e.g. AddRigidBody), since I think parsing a URDF or SDF always adds a model instance. So this could be caught with one more visualizer test that adds procedural geometry.

I'm happy to take this over the next few days? I want to PR another small meshcat viz change anyway.

gizatt commented 4 years ago

Resolved by #12129