-
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
trouble using pipeline callback feature with pyrealsense2 #5417
Comments
I resolved this. I needed to call as_frameset() on the frame the callback was processing and then iterate over the frames therein. (eg to deal with a depth frame in the callback you can do something like |
In [6]: frameset NameError: name 'frameset' is not defined How to use it correctly? |
before the callback function, initialize the variable frameset=None |
I can't understand... |
frame = None Now here use the frame variable |
Hi,
I'm updating an application to support using Realsense cameras. I'd like to register a callback for handling rgb+depth framesets because this callback will help me integrate the Realsense camera with my already-existing application much more easily.
I'm new to the realsense API and what I'm trying to do doesn't seem to be documented officially, but I've looked through a bunch of the python wrapper's documentation as well as the example use of callbacks with the C++ API https://github.com/IntelRealSense/librealsense/tree/master/examples/callback. The example I just linked makes it seem like the callback you can register takes a whole frameset object (which contains rgb data as well as depth data), but when I try to use a callback in python to handle that frameset object, it seems like that frameset object actually only contains data associated with one stream. Furthermore trying to cast that frameset into a depth frame or a video frame does not work (which I would expect it to) -- it breaks somewhere inside the C++ API.
Here's an example of what I'm experiencing:
Does this seem like a buggy python wrapper or poor use on my part?
It would be great if I could use some way of handling incoming frames asynchronously; my application does a lot more stuff than just talk to a camera. So if the python wrapper is in fact buggy, and you have any other suggestions I'd love to hear them.
The text was updated successfully, but these errors were encountered: