-
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
Do D415 camera have a mechanism to detect the disconnection and connection of camera from usb. #4212
Comments
The discussion linked to below may give you useful insights if you have not seen it already. |
def test(): rs.context().set_devices_changed_callback(test()) This is not working for camera connection and disconnection, test() function is only called when at the initialization of set_devices_changed_callback. |
There are a couple errors in your python code there. Furthermore, by using ctx = rs.context()
ctx.set_devices_changed_callback(test) # Note test isn't called |
I tried in that way but it is still not calling the test function at the time of disconnection or connection |
It might be a problem with the function signature?
|
This is the simple code i wrote to test this callback: rs_context = rs.context() def test(): rs_context.set_devices_changed_callback(test) But this connection disconnect callback is not working Note: I am using pyrealsense2 and For connection and disconnection i mean, when i am connecting camera and disconnecting the camera from USB |
Can anyone tell me what is the problem here, why callback is not working at the time of USB connection or disconnection. Is the problem in the code ? |
Please try this code.
|
@itachi134999 Did you get chance to try? Looking forward to your update. Thanks! |
@itachi134999 Could You please update? Thanks! |
I think your issue has been solved. |
For the real time, i am calling get all device query in every API calls which is taking around 500ms. Do librealsense have a mechanism to detect the connection and disconnection of the D series camera from USB ?
The text was updated successfully, but these errors were encountered: