Skip to content
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

[WIP] Camera capture driver #10295

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2341627
Add camera_capture driver
mhkabir Apr 15, 2018
d0b7cbe
Camera Capture - enable capture at startup
bresch Jul 5, 2018
95c1352
Camera Capture - add "status" to camera_capture usage help message
bresch Jul 18, 2018
80fa7df
Camera Capture - Use falling edge only
bresch Jul 31, 2018
ccb3a9f
add camera trigger feedback (input capture when camera actually takes…
Aug 19, 2018
1e7263d
rename camera capture feedback param and move it from camera_feedback…
Aug 21, 2018
d72f6b1
add camera capture mode and edge params
Aug 21, 2018
83daaa9
clean up camera capture driver
Aug 21, 2018
88124f6
camera_capture: add cycle for cycle_trampoline
Aug 25, 2018
003155e
camera_trigger.msg: add feedback field to understand if message camer…
Aug 25, 2018
4d8b075
fix camera_trigger publish and reduce time in capture interrupt routine
Sep 4, 2018
62cfb3c
camera feedback: remove CAM_FBACK_MODE param. CAM_CAP_FBACK from came…
Sep 18, 2018
0629541
camera trigger and camera capture publish on two different topics and…
Sep 18, 2018
0742942
camera feedback: fix camera_trigger subscription
Sep 21, 2018
3b62034
fmu:Add MODE_4PWM1CAP, MODE_5PWM, MODE_5PWM1CAP
Sep 25, 2018
98349ef
camera_capture:Use IOCTL to set capture mode.
Sep 25, 2018
e077b93
rcS: start camera_capture later in script
Oct 23, 2018
7309b43
fmu: add mode_4pwm2cap
Nov 10, 2018
6df09c3
camera_capture: clean trigger modes and change fmu to 4pwm2cap
Nov 10, 2018
842d57f
camera_capture: remove trig_buffer and replace it with public structure
Nov 13, 2018
44e76e1
camera_capture: change topic namings to make logging, mavlink streami…
Nov 15, 2018
61fb798
fixes after rebase
Jan 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ROMFS/px4fmu_common/init.d-posix/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ fi
if param greater TRIG_MODE 0
then
camera_trigger start
param set CAM_FBACK_MODE 1
camera_feedback start
fi

Expand Down
10 changes: 9 additions & 1 deletion ROMFS/px4fmu_common/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ else
fi

camera_trigger start
param set CAM_FBACK_MODE 1
camera_feedback start
fi

Expand Down Expand Up @@ -418,6 +417,15 @@ else
#
sh /etc/init.d/rc.vehicle_setup

# Camera capture driver
if param greater CAM_CAP_FBACK 0
then
if camera_capture start
then
camera_capture on
fi
fi

#
# Start the navigator.
#
Expand Down
1 change: 1 addition & 0 deletions boards/px4/fmu-v3/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ px4_add_board(
barometer # all available barometer drivers
batt_smbus
camera_trigger
camera_capture
differential_pressure # all available differential pressure drivers
distance_sensor # all available distance sensor drivers
gps
Expand Down
1 change: 1 addition & 0 deletions boards/px4/fmu-v5/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ px4_add_board(
barometer # all available barometer drivers
batt_smbus
camera_trigger
camera_capture
differential_pressure # all available differential pressure drivers
distance_sensor # all available distance sensor drivers
gps
Expand Down
3 changes: 3 additions & 0 deletions msg/camera_trigger.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ uint64 timestamp # time since system start (microseconds)
uint64 timestamp_utc # UTC timestamp

uint32 seq # Image sequence number
bool feedback # Trigger feedback from camera

# TOPICS camera_trigger camera_trigger_secondary
40 changes: 40 additions & 0 deletions src/drivers/camera_capture/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
############################################################################
#
# Copyright (c) 2018 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
px4_add_module(
MODULE drivers__camera_capture
MAIN camera_capture
COMPILE_FLAGS
SRCS
camera_capture.cpp
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete

Loading