PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.56k stars 13.54k forks source link

Enabling camera capture for VIO applications #21915

Open Jaeyoung-Lim opened 1 year ago

Jaeyoung-Lim commented 1 year ago

Describe problem solved by the proposed feature

Pixahakws already have all the necessary GPIOs to do camera synchronization with IMUs for VIO applications.

However, it seems that the current camera capture system is built for a specific use case of mapping with PPK, which is making the following assumptions

The following image shows a free-running camera connected to the FMU, where only the capture signal is connected. The camera_capture driver correctly captures the images when the camera is running.

image

However, the capture signals are never logged since there are no trigger signals.

Time synchronization of trigger signals is not limited to video, but also lidar/radar sensors. Having a general framework for enabling such sensors integrated to the fmu will help integrate these sensor applications with the fmu.

@Igor-Misic FYI

Additional things I found

Describe your preferred solution

A way of integrating a capture signal that is not necessarily triggered by a trigger signal, and still be able to later synchronize camera images with imu time stamps offboard

One of the use cases would be using a free running camera (e.g. UVC) and be able to synchronize imus with the images. This would enable visual-inertial sensor data that can be utilized for advanced applications such as VIO(Visual Inertial Odometry).

Describe possible alternatives

Additional context

dagar commented 1 year ago

I think the main problem here is that we start with fairly general simple implementations of things that are justifiably named broadly/generically (eg "camera_trigger", "camera_feedback", etc), but then over time things evolve to do a better job solving some specific problem for a product or use case.

From my perspective the right solution for us is to lean on the modularity of the system, and wherever possible get out of each others way. I would like to have more dedicated modules solving one specific problem, and when someone inevitably has a kinda/sorta similar problem to solve we create a new module.

So what I would propose is that we create a new dedicated capture module for your specific use case and rename the existing modules. We need to minimize all this coupling in the system, there are too many areas where it becomes very difficult to move forward because no one person is in a position to test or even understand all the different pieces and use cases.

tiralonghipol commented 1 week ago

@Jaeyoung-Lim @dagar hei guys, what is the status of this?

Jaeyoung-Lim commented 1 week ago

@tiralonghipol It is as far as written in the PR.