urdf-viz
urdf-viz copied to clipboard
The system cannot find the file specified
Just downloaded the pre-built binaries, placed both the urdf-viz.exe and freetype.dll on the same folder as the URDF, ran with the following line: urdf-viz.exe kuka_kr16_assembly.urdf
Got the following error:
root [⚓] => /base_link/ RotaryHeadJoint [⚙+Z] => /RotaryHead/ LowerArmJoint [⚙+Z] => /LowerArm/ UpperArmJoint [⚙+Z] => /UpperArm/ p2Joint [⚙+Z] => /p2/ WristJoint [⚙+Z] => /Wrist/ a3servoJoint [⚓] => /a3servo/ a4a5a6ServoJoint [⚓] => /a4a5a6Servo/ a1ServoJoint [⚓] => /a1Servo/ a1Servo2Joint [⚓] => /a1Servo2/
thread 'main' panicked at 'rospack find failed: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }', src\libcore\result.rs:997:5
note: Run with RUST_BACKTRACE=1
environment variable to display a backtrace.
Do your urdf contains mesh files? I guess that "package://xxxx/" causes this. urdf-viz calls "rospack" command to solve the path.
Removing all "package://xxxx/" and placing all mesh files in the same folder might solve this problem.
You can also use the --package-path
argument instead of manually replacing.
For instance, if your XML file has paths like this in it:
package://meshes/nao/RThumb2.obj
And you have the meshes folder adjacent to your file like this:
working_dir/
nao.urdf
meshes/
nao/
RThumb2.obj
You can open it like this:
urdf-viz --package-path=meshes=./meshes nao.urdf
Yeah, for environments where ROS is not available, specifying the path or URL to the package with --package-path
is the currently recommended way.
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.