Thanks for the tips, I'll try this with my TV in that case. If it says "done" does that mean the calibration data has been applied and saved to the board or is there another command I need to run to do that?

I've found the line that prevents calibration data being written and nullified it by adding error_text = "" before the check and calibration data is now written to the device. It won't let me add a screenshot for some reason but it needs to be added in calibration.py around line 936, just before the if statement checking the length of it basically.

I created a new calibration target suited for my screen, I went through and captured the images again and it still threw the epilolar errors for both rgb to right and left to right again. The calibration data was written to the board at least.

I've tried running code that previously worked to preview the cameras and it throws an error now, the IMU script also still can't recognise that the board has an IMU.

I know that with these modules there's more work needed to get them working but I honestly didn't expect this level of pain and lack of documentation. I've had this a few weeks now and I'm still not able to get even the basic functions working. There's no mention of the various branches I've been told to use anywhere in the docs that I can see and I've no idea what each of these actually relate to or what impact that'll have on using the release versions of DepthAI in the future.

I need actual help, can I get contact details for someone so I can get in touch directly please?

I switched to the original lenses to test with, calibration worked first time, however once calibrated and I try to run the demo I get the error below.

The lenses that came with the cameras have a known HFOV of 90, I'm wondering if I messed up the calculation for the 160deg lenses I have. Could be the issue or is a 160deg pair of stereo cameras just too far from the FOV of a 90deg RGB camera? I'm really keen on having wide angle stereo for SLAM along with a narrower camera in the middle for more detail over a longer distance.

Error mentioned above on loading the depthai_demo.py file, this is from the ar234_x3 branch however and I'm not sure if that branch was purely for calibration or not:
RuntimeError: Fatal error. Please report to developers. Log: 'Fatal error on MSS CPU: trap: 07, address: 80089554' '0'

I'll try running calibration with all 160deg lenses on there but I'll also see if I can find some 120deg lenses to try alongside the 90deg centre.

I still can't access IMU data though and s I understand it there should be one on board, is there some known-good code for the 3P board please? Model number on the underside is DM1090, R3MOE3.

I've had another go at calculating the hfov for my 160deg lenses and it's come out at 122.91deg which seems a bit more sensible. Still no luck with calibration.

Something else I've tried is running calibration with -drgb and removing it from the board definition to see if ignoring the RGB camera would at least calibrate the stereo cameras. Sadly it ran through the calibration script and simply exited, no error or calibration file uploaded, just exited.

I'll try tomorrow with all the cameras having 160deg lenses in them.

Hi @kneave sorry for the trouble

Thanks for the tips, I'll try this with my TV in that case. If it says "done" does that mean the calibration data has been applied and saved to the board or is there another command I need to run to do that?

Yes, unless you only executed capture.py with -m 'capture', it should write the data on the EEPROM, you can see what was written with calibration_dump.py example

I've found the line that prevents calibration data being written and nullified it by adding error_text = "" before the check and calibration data is now written to the device. It won't let me add a screenshot for some reason but it needs to be added in calibration.py around line 936, just before the if statement checking the length of it basically.

if error_text is not empty here you should see something red on the calbiration GUI (like epipolar error or something), didn't noticed any errors when the writing failed here?

I still can't access IMU data though and s I understand it there should be one on board, is there some known-good code for the 3P board please? Model number on the underside is DM1090, R3MOE3.

For IMU, you can find some examples in the depthai-python repo, and some info here. If imu_gyroscope_accelerometer.py and imu_rotation_vector.py doesn't work, try to update the firmware with imu_firmware_update.py. Be very carefull NOT to disconnect the device while the IMU update is going, after the IMU update is at 100% and you start to see the gyroscope values on screen, you can stop the script.

Sadly it ran through the calibration script and simply exited, no error or calibration file uploaded, just exited.

Did you see any errors in the terminal where you ran the calibration script?

Error mentioned above on loading the depthai_demo.py file, this is from the ar234_x3 branch however and I'm not sure if that branch was purely for calibration or not:

RuntimeError: Fatal error. Please report to developers. Log: 'Fatal error on MSS CPU: trap: 07, address: 80089554' '0'

I'm not sure what this error means, cc @Luxonis-Martin @Luxonis-Alex .

@kneave can you try to run spatial_calculator_multi_roi.py or spatial_location_calculator.py to test the depth?

    Hey erik, I'll have a look and see if I can reproduce it consistently and put together all the config files and whatnot that I have so far.

    Thanks DanielCalaver, each time with the 160/90/160 lens combo I got the epipolar errors, ignoring the error_text to see what should happen next seemed like a good idea and I think you said that the errors meant that the performance wouldn't be great but that it should still work with errors like that? With it ignored I got the message saying that upload had completed followed by "done" so I think it may be worth changing that to "done with errors" in cases where it doesn't work? It may help customers with troubleshooting for sure.

    Could I ask what the maximum FOV of lenses you've tested with for stereo cameras please? I had a look at the Pro W and it seems that they have a HFOV of 120 so my lenses shouldn't be that far out from this setup. The calculated HFOV I got was 122.91 and with the centre camera having a HFOV of 90 I think that's really close to what you have on the W too?

    Another thing I'd like to confirm is that I haven't messed up my board config. I'm more confident now of the HFOV values but the specTranslation bit I'm not certain of. I based the positive and negative values off the other board definitions in the depthai repo, I assume that the translation values are relative to the to_cam reference? So in my config the left camera is 8cm to the left of the right, and the right camera is 4cm to the right of the RGB cam.

    {
    "board_config":
    {
    "name": "FFC-3P",
    "revision": "R1M0E1",
    "cameras":{
    "CAM_A": {
    "name": "rgb",
    "hfov": 90,
    "type": "color"
    },
    "CAM_B": {
    "name": "left",
    "hfov": 122.91,
    "type": "color",
    "extrinsics": {
    "to_cam": "CAM_C",
    "specTranslation": {
    "x": -8,
    "y": 0,
    "z": 0
    },
    "rotation":{
    "r": 0,
    "p": 0,
    "y": 0
    }
    }
    },
    "CAM_C": {
    "name": "right",
    "hfov": 122.91,
    "type": "color",
    "extrinsics": {
    "to_cam": "CAM_A",
    "specTranslation": {
    "x": 4,
    "y": 0,
    "z": 0
    },
    "rotation":{
    "r": 0,
    "p": 0,
    "y": 0
    }
    }
    }
    },
    "stereo_config":{
    "left_cam": "CAM_B",
    "right_cam": "CAM_C"
    }
    }
    }

    I was playing around with a few things last night so I'll get it back in to the same state and see what results I get from the depth checking scripts. I do have three colour cameras though so I'll go through and update the scripts for that first. I'll get the firmware updated too for the IMU, thanks for links for those.

      kneave

      Could I ask what the maximum FOV of lenses you've tested with for stereo cameras please? I had a look at the Pro W and it seems that they have a HFOV of 120 so my lenses shouldn't be that far out from this setup. The calculated HFOV I got was 122.91 and with the centre camera having a HFOV of 90 I think that's really close to what you have on the W too?

      The maximum HFOV we've calibrated is 127, here you can find the captured used to calibrate an OAK-D-PRO-W-POE(127 HFOV for Left and Right, 108HFOV for RGB, 7.5 cm between Left and Right), maybe it will give you some hints on how to make the captures . The Charuco Board used is 16x22 squares with 4cm square size (it's about 930mm x 700mm)

      So in my config the left camera is 8cm to the left of the right, and the right camera is 4cm to the right of the RGB cam.

      Config looks good, left camera is -8cm from the right, and right camera is +4cm from the center one.

      ignoring the error_text to see what should happen next seemed like a good idea and I think you said that the errors meant that the performance wouldn't be great but that it should still work with errors like that? With it ignored I got the message saying that upload had completed followed by "done" so I think it may be worth changing that to "done with errors" in cases where it doesn't work? It may help customers with troubleshooting for sure.

      Thank you for your suggestion, note that if epipolar error is too high Depth perception might not work at all in some cases.

      Thanks for the clarification Daniel, I'll take a look at the examples you've link to.
      Regarding my comments on "done", I just meant that a return value for the end of the script could be useful. So if there was an error it could say "exited with error code X" and only say "done" if successful.

      Ignoring the error_text was 100% a hack on my part!

      I just tried to get the files you linked to have a look at and it's throwing an error, it then prompted me to download something else which was a little worrying and could catch folks out if they aren't careful.

      Coul you try uploading to We Transfer please? I use that myself and know it's a trustworthy site 🙂

        Brilliant, I've got them. Thanks!

        23 days later

        Finally got my new modern art delivered, I can finally test this again!

          That's quite large kneave ! When you are calibrating it, just make sure the board is actually flat (eg on table, or on the ground), as currently, it looks like it's bending a bit, which would cause worse calibration.
          Thanks, Erik

          Thanks Erik, I had it made to the same specifications @DanielCalaver mentioned that you use for your wide-angle products. I used it on the ground and managed to avoid the cats "helping" but sadly I'm still getting the epipolar errors.

          I'll try again tomorrow with natural light rather than the indoor lights we have and more images too.

            kneave thanks, yeah, if the board reflects too much light from ahead it can be disruptive, hope it'll work this time!

            Sadly it hasn't, though I'm down to only one epipolar error so that's progress I guess:

            Reprojection error threshold -> 100
            rgb Reprojection Error: 0.688267
            1200
            Reprojection error threshold -> 166.66666666666666
            left Reprojection Error: 0.614719
            1200
            Reprojection error threshold -> 166.66666666666666
            right Reprojection Error: 0.577443
            ['high epipolar error between right and rgb']
            py: DONE.

            I've uploaded the calibration images and board definition here: https://we.tl/t-5uGyFtsNkM
            The command I ran was python calibrate.py -s 4 -ms 3.1 -brd FFC-3Pw -nx 22 -ny 16 -c 3 and this is from the ar0234x3 branch of DepthAI.

            One thing I'm still unsure of which I suspect could have an impact is the HFOV value I'm using for the stereo cameras. They are the same as the centre with a 160deg lens instead of the 90 that the 0234 come with. I couldn't find a definition for the HFOV for these lenses but calculated it at 122deg, I'm not sure of my maths however as optics isn't my forte to say the least.

            I'm out of ideas and kinda annoyed I can't get this working to be honest. If you've any advice, even suggestions for other lenses to try, I'd appreciate it. Heck, if I can just calibrate with the stereo cameras and ignore the centre could that be an option? I'm planning on using the colour stereo for SLAM and point cloud generation and the centre with narrower field for object detection. If I don't actually need the centre can we get rid of that as it's the RGB to right cam that's throwing the error?

            I just ran the following to disable RGB and got the same error 🙁

            python calibrate.py -s 4 -ms 3.1 -brd FFC-3Pw -nx 22 -ny 16 -c 3 -drgb -m process

            Displaying Stereo Pair for visual inspection. Press the [ESC] key to exit.
            1200
            Reprojection error threshold -> 100
            rgb Reprojection Error: 0.688267
            1200
            Reprojection error threshold -> 166.66666666666666
            left Reprojection Error: 0.614719
            1200
            Reprojection error threshold -> 166.66666666666666
            right Reprojection Error: 0.577443
            ['high epipolar error between right and rgb']
            py: DONE.