-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Pr camera capture driver #11395
Pr camera capture driver #11395
Conversation
… module to camera capture driver
…a from trigger or capture driver
…ra capture driver will be used instead.
… camera feedback module uses CAM_CAP_FBACK param to choose between the two.
This extends the Capture support for FMU CHAN 5 and 6.
…ng and geotagging easier
From previous pr: This PR adds the camera capture driver. This can be used to receive a feedback from a camera after it is triggered (eg. sony hot shoe feedback). In this case we don't publish the camera_trigger message in the camera_trigger driver when we trigger the camera, but we publish when we receive the feedback from the camera. When geotagging images this will increase the presision in the geotag. This can be also used to sync CV cameras with the IMU data for VIO or similar applications. Currently only channel 5 on the FMU PWM outputs can be used for this driver. I still need to check on which outputs we can actually run this. Some more tests will be done in the next days. Params for testing: CAM_CAP_MODE = CAM_CAP_EDGE = CAM_CAP_DELAY --> delay between image integration start and strobe firing (default to 0) |
@dagar this was tested yesterday on the av-x board and on a pixhawk 4. |
@@ -269,12 +272,14 @@ CameraTrigger::CameraTrigger() : | |||
_p_activation_time = param_find("TRIG_ACT_TIME"); | |||
_p_mode = param_find("TRIG_MODE"); | |||
_p_interface = param_find("TRIG_INTERFACE"); | |||
_p_cam_cap_fback = param_find("CAM_CAP_FBACK"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to better understand the overall design, but reaching into other modules params is something I'd like to avoid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dagar I agree. The reason for this is because when the camera_capture driver is active I rename the topic name of the camera_trigger driver so that the camera_capture can publish the camera_trigger message (which is the one that goes to the geotagging and to mavlink). Do you have any idea how this could be cleaned up? In any case, even if we want to keep this structure I think the parameter should be defined in the camera_trigger driver because otherwise this will cause issues on the targets that won't have the camera_capture driver in their cmake.
There are some minor things, but this looks safe to merge and we've been sitting on it for way too long. I'll merge now and we can continue from master. |
@DanielePettenuzzo I'm looking at this again--so for I've built what's on master and completed a basic test it seems to work. It looks like the autopilot should publish a camera_capture message in response to the pulse. How do you access that message? If I run mavros the only related message I see published is the cam_imu_stamp message. I will also try to help out with the docs so this can get pushed into a release. |
I guess just to be clear, it looks like the
|
I have a quick question and it seems like the most likely place to get the answer. |
@AlexandreBorowczyk - It is a mistake. There needs to be a
added. |
Alright Thanks for clearing things up! |
Will this have a document? @hamishwillee |
@bys1123 One can only hope that @DanielePettenuzzo will find time. I've got a placeholder for it: PX4/PX4-user_guide#604 |
This pr replaces #10295 because support was added also for the av-x board that currently doesn't have timer input capture available, therefore we are using gpio captures. This is not ideal but the goal is to get this merged and then do a second iteration where we add timer capture support for the av-x board.