• DepthAI-v2
  • How to use script nodes? How do I configure GPIO on FFC-4P?

I want to use FFC-4P to do hard synchronization including the four cameras and the onboard IMU so that the latency between them is consistent and within 1ms as much as possible. According to the posts in the forum, I connected the FSIN of four camera wiring with the camera circuit board, and used GPIO6 for relay, and realized the synchronization of four cameras within 0.5ms. Now I want to set the frequency of the IMU to about 30hz, and use some flag bit of the IMU (I don't know what the flag is) to trigger the sampling of the camera, hoping to achieve perfect synchronization between the IMU and the camera. However, I am a novice and have never used script node in programming. Even after reading the description of "depthai-experiment", I still don't know how to insert script node into my python program and how to write the script node correctly. I was hoping to get some help.


And by the way, that's how I connect FSIN with camera board.

@erik Maybe you can give me some Pointers. Thank you very much.

  • erik replied to this.

    Hi wyf0217 ,
    I am not actually sure whether you can (easily) hardware trigger the IMU so IMU results are perfectly in sync with all frames. I believe you can currently only timestamp syncing, and my naive approach would be to just have a high IMU frequency so the max delay is eg. below 2ms (if 250Hz). Thoughts?
    Thanks, Erik

      erik The way you're talking about is the last thing I have to do. I can indeed increase the IMU to a higher frequency to select a data closest to the timestamp of the camera, but for now, I prefer the IMU to maintain perfect synchronization with the camera, or a constant small time difference. Since I saw that the board provides a way to use GPIO synchronization, I wanted to find out more about this implementation. Thank you very much!

      • erik replied to this.

        Hi wyf0217 ,

        Since I saw that the board provides a way to use GPIO synchronization, I wanted to find out more about this implementation

        Could you link where that is mentioned? As I don't think I have heard about it..
        Thanks, Erik

          erik Of course, this only mentions that the GPIO interface can be set up and invoked. In fact, I may be the only one who thinks it can be used to synchronize the IMU with the camera. In other examples, I've only seen hardware syncing the camera and flash.

            erik Well, I don't know much about circuits, but since I can't, I'd better increase the sampling rate to achieve a smaller error. Thank you for your patient answer.