ROS2 Unable to retrieve stl file from raspberry pi for rviz on pc
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?
To me, it looks like, you didn't install the
.stl
files in the install directory. In other words, yoursetup.py
file is incomplete. Please post yoursetup.py
file.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/
fileError 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...
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.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!