0
$\begingroup$

I am new to ROS and was learning ROS1. When I wrote the urdf code and tried to open it in RViz, I couldn't see the model in the workspace. I keep getting the error:

[ERROR] [1695576379.027830126]: Could not load resource [/home/athkul/arduinobot_ws/src/arduinobot_description/urdf/mesh/basement.STL]: Unable to open file "/home/athkul/arduinobot_ws/src/arduinobot_description/urdf/mesh/basement.STL".

Can anyone explain the meaning of this error? I have tried reinstalling the mesh files required for the urdf model, yet I get the error. How should I rectify it?

$\endgroup$

1 Answer 1

0
$\begingroup$

The URDF is looking for a mesh called basement.stl in the folder mesh relative to the file itself.

If you've referring to this project, their mesh folder is at the same level as the urdf folder.

In other words the mesh gets loaded like this:

<mesh filename="package://arduinobot_description/meshes/basement.STL" scale="0.01 0.01 0.01"/>

instead of this:

<mesh filename="package://arduinobot_description/urdf/meshes/basement.STL" scale="0.01 0.01 0.01"/>
$\endgroup$
2
  • $\begingroup$ But I have added the mesh folder inside the urdf folder and copied the file location from its properties, still I get the error. I tried to place the mesh folder at the same level of the urdf folder, I couldn't see the model in the Rviz workspace $\endgroup$ Commented Oct 19, 2023 at 6:09
  • $\begingroup$ The error you're specifically asking about in your question is related to this. Also try not to use absolute paths, those will hunt you when you move the project. The notation package://package_name.. is referring to the install location of your package and if you look into the CMakeLists.txt file there's an install step that copies the meshes dir to the install location. So I would suggest sticking to the original structure of the project as it makes the most sense. If you dont see the model in RViz after loading, be sure to select the correct link coordinate system in GUI $\endgroup$ Commented Oct 19, 2023 at 7:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.