RobotLocomotion / drake

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

SDFormat parser crash with nested URDF model with world weld #21413

Open rpoyner-tri opened 2 months ago

rpoyner-tri commented 2 months ago

What happened?

The original report is here: https://stackoverflow.com/questions/78444910/pydrake-urdf-to-sdf-parsing-failure-name-nesting

This ticket only covers the "even bad inputs should not crash the parser" aspects of the situation.

Model data was adjusted slightly to reproduce the reported symptom (more details to follow).

Version

master, circa 1.28

What operating system are you using?

Ubuntu 22.04

What installation option are you using?

compiled from source code using Bazel

Relevant log output

rico@PUGET-255560:~/checkout/drake3$ ROS_PACKAGE_PATH=/home/rico/third/drake_models  ./bazel-bin/multibody/parsing/parser_manual_test package://drake_model_storage/description/complete_robot.sdf
parsing package://drake_model_storage/description/complete_robot.sdf
abort: Failure at multibody/parsing/detail_sdf_parser.cc:180 in GetRelativeBodyName(): condition 'nested_model_absolute_name.starts_with(required_prefix)' failed.
Aborted (core dumped)
rpoyner-tri commented 2 months ago

Model tree spelling fixes were noted in the stackoverflow answer.