ROS2 Unable to retrieve stl file from raspberry pi for rviz on pc

asked 2023-01-08 13:14:19 -0500

swqtt gravatar image

Hello,

In my urdf file for the /robot_description i have a few meshes. If i run a simulation or program that enables /robot_description rviz2 can acces the stl files. But when i run it on the raspberry pi i can't acces those stl files for rviz on my computer. I get this error

ERROR] [1673204822.505815420] [rviz2]: Error retrieving file [file:///home/pi/robot_ws/install/my_bot/share/my_bot/meshes/Tussenstuk.stl]: Couldn't open file /home/pi/robot_ws/install/my_bot/share/my_bot/meshes/Tussenstuk.stl [ERROR] [1673204822.505840988] [rviz2]: FileNotFoundException: Cannot locate resource file:///home/pi/robot_ws/install/my_bot/share/my_bot/meshes/Tussenstuk.stl in resource group OgreAutodetect. in ResourceGroupManager::openResource at /tmp/binarydeb/ros-foxy-rviz-ogre-vendor-8.2.7/.obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/OgreMain/src/OgreResourceGroupManager.cpp (line 703)

Is there a way to fix this?

edit retag flag offensive close merge delete

Comments

To me, it looks like, you didn't install the .stl files in the install directory. In other words, your setup.py file is incomplete. Please post your setup.py file.

Andromeda gravatar image Andromeda  ( 2023-01-09 06:19:29 -0500 )edit

The STL files are both on my computer and on my raspberry pi. So I don't think that is the problem. And they are also both in the /install/my_bot/share/my_bot/meshes/ file

swqtt gravatar image swqtt  ( 2023-01-09 12:53:16 -0500 )edit

Error retrieving file [file:///home/pi/robot_ws/install/my_bot/share/my_bot/meshes/Tussenstuk.stl]:Couldn't open file /home/pi/robot_ws/install/my_bot/share/my_bot/meshes/Tussenstuk.stl

This is quite self explanatory. Again... if you need help, then you should post your code. Or, if you do not want, post a minimal version which reproduces the same error...

Andromeda gravatar image Andromeda  ( 2023-01-09 13:33:26 -0500 )edit

I think i fixed the 'issue' by running the /robot_description on my laptop instead of on the raspberry pi. It might be a bad way but it fixes it.

swqtt gravatar image swqtt  ( 2023-01-09 14:22:54 -0500 )edit

Then write an answer below and accept it. This will mark your question as answered and it does not show up in the unanswered questions. Thanks!

Andromeda gravatar image Andromeda  ( 2023-01-10 16:07:09 -0500 )edit