openrr / urdf-viz

visualize URDF/XACRO file, URDF Viewer works on Windows/MacOS/Linux
Apache License 2.0
413 stars 56 forks source link

called `Result::unwrap()` on an `Err` value: #232

Closed wzjscut closed 9 months ago

wzjscut commented 9 months ago

called Result::unwrap() on an Err value: UrdfError(Other("failed to execute neither rospack nor ros2 pkg; consider installing ROS or replacing 'package://' with path: No such file or directory (os error 2)"))

what happen?

i don't set any ros command in this urdf. the urdf source file may be in https://github.com/raisimTech/raisimLib/blob/master/rsc/anymal_c/urdf/anymal_sensored.urdf

taiki-e commented 9 months ago

Your urdf has mesh paths starting with pachage://: https://github.com/raisimTech/raisimLib/blob/9f1be941f0eeaeda57fa305c477039ca812d8d6a/rsc/anymal_c/urdf/anymal_sensored.urdf#L12

To (automatically) resolve pachage://, ROS1 or ROS2 is needed as the error message says.

If ROS is not available, you can specify the path or URL corresponding to the package as mentioned in the readme.

https://github.com/openrr/urdf-viz?tab=readme-ov-file#how-to-use

If there are "package://" in mesh tag, but path or URL to package is known and don't use xacro you can also skip install of ROS by replacing package with path or URL.

wzjscut commented 9 months ago

i get it. thanks a lot!