I am trying to run a program in ROS that uses an intel real sense camera, but let me go back first.
I initially ran script for the camera from the home directory on my raspberry pi 4. I got the issue "AttributeError: module 'pyrealsense2' has no attribute 'pipeline'. I then solved this by copying the three pyrealsense ".so" files to the home directory (The same as the python file I am trying to run.
Once I got it working by itself, I then tried moving everything into my larger ROS python script. I then moved everything (including the .so files) into my source folder (/catkin_workspace/src/ros_kortex/kortex_examples/src/full_arm). This directory is where my ROS python file is located, so I assumed it would have the same positive affect by moving everything here, but when I run my script I get the original error of ""AttributeError: module 'pyrealsense2' has no attribute 'pipeline'". In the header of my ROS file I have,
sys.path.append('/home/pi/catkin_workspace/src/ros_kortex/kortex_examples/src/full_arm') and this helps when importing external python scripts to my main file.
I then have
import realsense_depth #Class with camera functions
If adding the .so files helped when the files were in the home directory, then why is it not working when I move everything into this new directory? any ideas?
Please sign in to leave a comment.