Hello I am trying to depth align with the color image on my OAK-D Short range.
I was following the following forum which lead me to find the following page which is exactly what I need.
I usually run the sample code before I try and integrate it in my application.
When I first ran the code I got the following error
Traceback (most recent call last):
lensPosition = calibData.getLensPosition(rgbCamSocket)
RuntimeError: There is no Camera data available corresponding to the the requested cameraID
Which makes sense because OAK-D SR does not have a CAM_A rgbCamSocket = dai.CameraBoardSocket.CAM_A #line 53
, but it does have a CAM_B and CAM_C. When I tried switching this socket to either CAM_B
or CAM_C
I get the following error.
RuntimeError: Camera(0) - Specified camera board socket already used
I also tried playing around with using dai.node.ColorCamera
instead of dai.node.Camera
but I end up getting the same error message.
As far as I understand the error, somewhere in the code I am trying to use the camera socket more than once. But I am unsure where that is happening and why as I did a tiny modification.
If im able to find a solution before someone answers ill post it here. In the meantime any help is appreciated.
EDIT_ONE: I think I have an idea of what is going on wrong. When I set camRgb
to be either socket B or C is when the issue is happening because I believe at
left = pipeline.create(dai.node.MonoCamera)
right = pipeline.create(dai.node.MonoCamera)
We are setting socket B to be left and Socket C to be right. Which when we set socket B or C to camRgb
it does not like it. Ill have to do some more modifications to see if my theory is correct.
EDIT_TWO: I think I got it to work (not sure if it works 100% like I want it to) it runs the demo and does not crash. ill have to wait till next week before I can try and plug it into my application to see if everything is fine. Git gist