Python can't open file when running with ros
Hi.
I have a simple pygame script that shows some images on screen. The script works when I run it with python, but once I run it with ROS (rosrun or roslaunch) pygame can't open some files. I'm thinking this has something to do with the permissions of the file, but I don't know how to fix this.
This is the error:
Traceback (most recent call last):
File "/home/kwint/catkin_ws/src/rolly/src/main.py", line 30, in <module>
pygame.mixer.music.load(src_dir + "/" + 'beep.ogg')
pygame.error: Couldn't open '~/catkin_ws/src/rolly/src/beep.ogg'
The same error occurs when loading images
Although I don't think the error is in my code, the script can be read here: https://github.com/kwint/TrashNodes/b...