Skip to content

Commit 552ff95

Browse files
committed
Merge branch 'master' into stable
2 parents 0a6e32b + f84bed5 commit 552ff95

File tree

4 files changed

+61
-26
lines changed

4 files changed

+61
-26
lines changed

manifests/maverick-modules/base/files/preprelease.sh

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ if [ -e /var/swap ]; then
3333
rm /var/swap
3434
fi
3535

36+
# Ensure maverick set to stable branch
37+
echo "MAVERICK_BRANCH=stable" >/srv/maverick/data/config/maverick/maverick-branch.conf
38+
chown mav:mav /srv/maverick/data/config/maverick/maverick-branch.conf
39+
3640
# Remove initial bootstrap maverick from common locations
3741
rm -rf /root/maverick
3842
rm -rf /home/pi/maverick
@@ -65,13 +69,6 @@ rm -rf /srv/maverick/.gitconfig /srv/maverick/.git-credential-cache /srv/maveric
6569
rm -rf /srv/maverick/.[Xx]*
6670
rm -rf /srv/maverick/.ros/log/*
6771

68-
# Clean up maverick data
69-
find /srv/maverick/data/logs -type f -delete
70-
rm -f /srv/maverick/data/vision_landing/*
71-
find /srv/maverick/var/log -path /srv/maverick/var/log/build -prune -o -type f -exec rm -f {} \;
72-
rm -rf /srv/maverick/var/log/ros/fc/* /srv/maverick/var/log/ros/sitl/*
73-
rm -f /srv/maverick/var/run/*
74-
7572
# Remove maverick config
7673
find /srv/maverick/data/config -type f -delete
7774
rm /srv/maverick/software/maverick/conf/localconf.json
@@ -83,4 +80,17 @@ cd /srv/maverick/software/maverick; git checkout conf/localconf.json
8380
if [ -e /boot/efi ]; then
8481
mkdir /boot/efi/EFI/BOOT
8582
cp /boot/efi/EFI/ubuntu/grubx64.efi /boot/efi/EFI/BOOT/bootx64.efi
86-
fi
83+
fi
84+
85+
echo "Running maverick to regenerate any removed files"
86+
maverick configure
87+
systemctl stop maverick-*
88+
89+
# Clean up maverick data
90+
find /srv/maverick/data/logs -type f -delete
91+
find /srv/maverick/data/mavlink -type f -delete
92+
rm -f /srv/maverick/data/vision_landing/*
93+
find /srv/maverick/var/log -path /srv/maverick/var/log/build -prune -o -type f -exec rm -f {} \;
94+
rm -f /srv/maverick/var/log/vision_landing/last.log
95+
rm -rf /srv/maverick/var/log/ros/fc/* /srv/maverick/var/log/ros/sitl/*
96+
rm -f /srv/maverick/var/run/*

manifests/maverick-modules/maverick_hardware/manifests/peripheral/seekthermal.pp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
class maverick_hardware::peripheral::seekthermal (
22
$libseek_thermal = true,
3-
$libseek_thermal_source = "https://github.com/maartenvds/libseek-thermal.git",
3+
$libseek_thermal_source = "https://github.com/fnoop/libseek-thermal.git",
44
$libseek_thermal_revision = "master",
55
$libseek = false,
6+
$seek_id = "0010", # 0010 for Compact, 0011 for Compact Pro
67
) {
78

9+
# If Seek Thermal camera isn't detected (ie. plugged in), then use $seek_id
10+
if $seekthermal_modelid != "None" {
11+
$_seekid = $seekthermal_modelid
12+
} else {
13+
$_seekid = $seek_id
14+
}
15+
816
# Install udev rule so seek thermal can be used by mav user
917
file { "/etc/udev/rules.d/95-seekthermal.rules":
1018
owner => "root",
1119
group => "root",
1220
mode => "644",
13-
content => "SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"289d\", ATTRS{idProduct}==\"${$seekthermal_modelid}\", MODE=\"0664\", OWNER=\"mav\", GROUP=\"mav\"\n",
21+
content => "SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"289d\", ATTRS{idProduct}==\"${$_seekid}\", MODE=\"0664\", OWNER=\"mav\", GROUP=\"mav\"\n",
1422
}
1523

1624
# Install libseek-thermal
@@ -36,6 +44,7 @@
3644
command => "/usr/bin/make install PREFIX=/srv/maverick/software/libseek-thermal",
3745
cwd => "/srv/maverick/var/build/libseek-thermal",
3846
creates => "/srv/maverick/software/libseek-thermal/lib/libseek.so",
47+
before => Service["maverick-vision_seek"],
3948
} ->
4049
file { "/srv/maverick/var/build/.install_flag_libseek-thermal":
4150
ensure => present,

manifests/maverick-modules/maverick_vision/files/vision_seek.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# Set defaults, can be overriden in /srv/maverick/data/config/vision/vision_seek.conf
44
FPS=
55
FFC=
6-
SCALE=
7-
COLORMAP=
8-
ROTATE=
6+
SCALE=1.0
7+
COLORMAP=-1
8+
ROTATE=90
99
CAMTYPE=seek
1010
OUTPUT=window
1111

@@ -19,7 +19,9 @@ else
1919
_FPS=""
2020
fi
2121
if [ ! -z $FFC ]; then
22-
_FFC="-FFC $FFC"
22+
_FFC="--FFC=$FFC"
23+
else
24+
_FFC=""
2325
fi
2426
if [ ! -z $SCALE ]; then
2527
_SCALE="--scale=$SCALE"
@@ -42,10 +44,11 @@ else
4244
_CAMTYPE=""
4345
fi
4446
if [ ! -z "$OUTPUT" ]; then
45-
_OUTPUT="-o \"$OUTPUT\""
47+
_OUTPUT="--output=\"$OUTPUT\""
4648
else
4749
_OUTPUT=""
4850
fi
4951

5052
# Call vision_seek with configured arguments
51-
/srv/maverick/software/libseek-thermal/bin/seek_viewer $_FPS $_SCALE $_COLORMAP $_ROTATE $_CAMTYPE $FFC -o "$OUTPUT"
53+
echo /srv/maverick/software/libseek-thermal/bin/seek_viewer $_FPS $_SCALE $_COLORMAP $_ROTATE $_CAMTYPE $_FFC -o "$OUTPUT"
54+
/srv/maverick/software/libseek-thermal/bin/seek_viewer $_FPS $_SCALE $_COLORMAP $_ROTATE $_CAMTYPE $_FFC -o "$OUTPUT"
Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,39 @@
11
# Config file for vision_seek
22

3-
# FPS - Kludge factor for gstreamer filesink interpolation
3+
# FPS - Kludge factor for gstreamer filesink interpolation. 7 is about right for Pi Zero
44
FPS=
55

66
# FFC - Flat Field Correction - .png file created by FFC calibration
77
FFC=
88

99
# Scale output image size by multiple
10-
SCALE=
10+
SCALE=1.0
1111

1212
# Apply opencv colormap: http://docs.opencv.org/3.2.0/d3/d50/group__imgproc__colormap.html
13-
# Note this has to be integer value relating to enum, not the enum itself
14-
COLORMAP=
13+
# Note this has to be integer value relating to enum, not the enum itself.
14+
# -1 means no map applied
15+
COLORMAP=2
1516

1617
# Rotate output image in degrees, only possible values are 90,180,270
17-
ROTATE=
18+
ROTATE=90
1819

1920
# Camtype is seek or seekpro
20-
CAMTYPE=
21+
CAMTYPE=seek
2122

22-
# Opencv/Gstreamer output pipeline, eg:
23+
### Video Output
24+
#
25+
# window output opens a local window. Must be started using vision_seek.sh not by system service, and
26+
# either from desktop or x-forwarded ssh session.
27+
# OUTPUT=window
28+
#
29+
# filename output saves a raw video to file. Easiest and best quality.
30+
OUTPUT=/srv/maverick/data/vision/vision_seek/seek.avi
31+
#
32+
# gstreamer output uses a gstreamer pipeline. Note, it *must* start with appsrc
2333
# OUTPUT="appsrc ! videoconvert ! video/x-raw,format=NV12 ! vaapih264enc ! mpegtsmux ! filesink location=/srv/maverick/data/vision/vision_seek/vision_seek.avi"
24-
# OUTPUT="appsrc ! autovideoconvert ! omxh264enc ! h264parse ! rtph264pay config-interval=1 pt=96 ! udpsink host=192.168.1.x port=5000 sync=false"
25-
# OUTPUT="window"
26-
OUTPUT=
34+
#
35+
# raspberry h264 streaming, client end would be: gst-launch-1.0 -v udpsrc port=5000 buffer-size=0 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! decodebin ! autovideosink sync=false
36+
# OUTPUT="appsrc ! decodebin ! queue ! videoconvert ! omxh264enc ! h264parse ! rtph264pay config-interval=1 pt=96 ! udpsink host=192.168.1.243 port=5000 sync=false"
37+
#
38+
# raspberry mjpeg streaming, client end would be: st-launch-1.0 -v udpsrc port=5000 buffer-size=0 ! application/x-rtp,encoding-name=JPEG,payload=26 ! rtpjpegdepay ! decodebin ! autovideosink sync=false
39+
# OUTPUT="appsrc ! queue ! videoconvert ! video/x-raw,format=I420 ! jpegenc ! rtpjpegpay ! udpsink host=192.168.1.244 port=5000 sync=false"

0 commit comments

Comments
 (0)