ros-visualization / rviz

ROS 3D Robot Visualizer
BSD 3-Clause "New" or "Revised" License
791 stars 459 forks source link

Could not load resource [%s]: Unable to open file "%s" #1819

Open PhilVince96 opened 3 months ago

PhilVince96 commented 3 months ago

I really did search every forum possible for this problem and I am confident, that there is every library installed that is needed and that the path is correct (I have already tried every possible path).

When I load the robot model into rviz it throws this error in the output:

Could not load resource [package://wam_description/urdf/meshes/wam_stand.stl]: Unable to open file "package://wam_description/urdf/meshes/wam_stand.stl".

for multiple files. I did try absolute paths, the file:/// option, $(find ...), etc. always the same output.

rat_console output:

Node: /wam/rviz
Time: 17:45:16.118340000 (2024-04-04)
Severity: Error
Published Topics: /clicked_point, /initialpose, /move_base_simple/goal, /rosout

Could not load resource [package://wam_description/urdf/meshes/wam_stand.stl]: Unable to open file "package://wam_description/urdf/meshes/wam_stand.stl".

Location:
/Users/fischert/mambaforge/envs/devenv/conda-bld/ros-noetic-rviz-0_1706257461249/work/ros-noetic-rviz/src/work/src/rviz/mesh_loader.cpp:loadMeshFromResource:658

The ROS_ERROR is thrown in row 658 of mesh_loader.cpp in the loadMeshFromResource function. I do not get why the "resource_path" fails the assertions for the .stl extension and my only guess is that the os is the problem, because I know that this setup works on ubuntu. The .stl is also correct, I checked that with rosin xacro.

Your environment

rhaschke commented 3 months ago

My best guess is to check the version of assimp used. Ensure that you build against the same version as used in Ubuntu.

PhilVince96 commented 3 months ago

Which build do you mean exactly? Because I use robostack on the macOS as well as on the Ubuntu system. But on the latter assimp is version 5.2.5 and on the macOS system it is version 5.3.1. But with assimp version 5.2.5 on the macOS system I still get the exact same error.

rhaschke commented 3 months ago

If switching the version of assimp yields the same result, I don't have any further ideas. Sorry.