-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault when running python 3 with import pyrealsense2 #8341
Comments
Hello, I am also getting a similar error on the code line pipeline.start(config). Did you find any solution to this? |
I'm having the same problem on Ubuntu 20.04. |
I got the same error: [ros2run]: Segmentation fault To fix it, I looked at my video devices with The issue was that there were extra /dev/video* files, and that was confusing librealsense. Remove the files that show up when you have no cameras plugged in. Then, try again and see if your segmentation fault issue goes away. It worked for my raspberry pi, at least. Unfortunately, however, I'm not experiencing another error: raceback (most recent call last): I think it has something to do with a driver issue, but I'm not sure. If anyone has any fixes for this, please let me know. I'll keep this updated if I figure out the issue, too. |
Hi @henryburon When you run your fetch_camera.py script, is the camera already in use by another program. As described at #12377 (comment) the Multi-Streaming Model rules of the librealsense SDK dictate that once a program has claimed access to a stream, another program that is launched afterwards cannot access that stream until the first program has released its claim on the stream. |
Hi @MartyG-RealSense, no, when I ros2 run the fetch_camera node, the camera is not in use by another program--it's simply plugged into my Raspberry Pi. To fix the issue at the bottom of my previous reply, I have to unplug/re-plug the camera a few times, and then it works. Rebooting also helps. I am now able to launch the node without errors, and I see initial camera data being published. However, messages soon start being dropped, and I am not able to actually view the images from my laptop on the same network. I think this has something to do with the frequency that I am publishing at and the QoS settings. I'll have to investigate. |
Hi @henryburon Was the node that you created at IntelRealSense/realsense-ros#3011 (comment) a solution to the problem described above, please? |
Yes, it was. |
Okay, thanks very much for the confirmation @henryburon |
Issue Description
Good afternoon! I have installed librealsense on my Raspberry Pi, and I just ran the cmake and other commands described here: #3062 (comment)
to get pyrealsense2 for python.
I am using this simple pose code: https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/t265_example.py
and when I run it with python, it works perfectly fine, but when I run it with python3, I get
Segmentation Fault
after a few seconds. I have checked out other posts with similar issues but there does not seem to be a clear solution.
Thanks!
The text was updated successfully, but these errors were encountered: