Compare commits

...

8 Commits
v0.5 ... v0.6

Author SHA1 Message Date
Oleg Kalachev
a91f9e5a6b Change image size to from 8G to 7G 2018-05-10 16:40:05 +03:00
Oleg Kalachev
6b74f75616 Merge branch 'master' of github.com:CopterExpress/clever 2018-05-09 19:50:46 +03:00
Oleg Kalachev
9cd9babb83 simple_offboard: yaw_rate, pitch_rate, roll_rate in get_telemetry 2018-05-09 19:50:18 +03:00
Smirnov Artem
380c14da56 image_buider: enable hardware uart with raspi-config (#43)
Signed-off-by: Artem Smirnov <urpylka@gmail.com>
2018-05-05 20:36:22 +03:00
urpylka
32c1c18af2 image_builder: fix syntax
Signed-off-by: Artem Smirnov <urpylka@gmail.com>
2018-05-05 16:50:36 +03:00
urpylka
b7077339a1 image_builder: add sha256sum to release message
Signed-off-by: Artem Smirnov <urpylka@gmail.com>
2018-05-03 22:33:57 +03:00
urpylka
52fd505ffc image_builder: change spaces
Signed-off-by: Artem Smirnov <urpylka@gmail.com>
2018-05-03 22:33:57 +03:00
urpylka
b911b7a3dd image_builder: fix syntax
Signed-off-by: Artem Smirnov <urpylka@gmail.com>
2018-05-03 22:01:29 +03:00
4 changed files with 30 additions and 9 deletions

View File

@@ -383,7 +383,10 @@ def get_telemetry(req):
res['vx'] = linear.vector.x res['vx'] = linear.vector.x
res['vy'] = linear.vector.y res['vy'] = linear.vector.y
res['vz'] = linear.vector.z res['vz'] = linear.vector.z
# TODO pitch_rate, roll_rate, yaw_rate
res['yaw_rate'] = velocity.twist.angular.z
res['pitch_rate'] = velocity.twist.angular.y
res['roll_rate'] = velocity.twist.angular.x
if global_position and stamp - global_position.header.stamp < rospy.Duration(5): if global_position and stamp - global_position.header.stamp < rospy.Duration(5):
res['lat'] = global_position.latitude res['lat'] = global_position.latitude

View File

@@ -24,7 +24,7 @@ pipeline {
} }
stage('Resize FS') { stage('Resize FS') {
environment { environment {
SIZE = '8G' SIZE = '7G'
} }
steps { steps {
sh "$WORKSPACE/image_builder/image_config.sh resize_fs $SIZE ${params.BUILD_DIR} ${params.IMAGE_NAME}" sh "$WORKSPACE/image_builder/image_config.sh resize_fs $SIZE ${params.BUILD_DIR} ${params.IMAGE_NAME}"

View File

@@ -334,19 +334,26 @@ publish_image() {
local IMAGE_LINK=$($3 $4 $1/$2.zip) local IMAGE_LINK=$($3 $4 $1/$2.zip)
echo -e "\033[0;31m\033[1m$(date) | Upload copmlete!\033[0m\033[0m" echo -e "\033[0;31m\033[1m$(date) | Upload copmlete!\033[0m\033[0m"
echo -e "\033[0;31m\033[1m$(date) | Meashure size of zip-image\033[0m\033[0m" echo -e "\033[0;31m\033[1m$(date) | Meashure size of zip-image\033[0m\033[0m"
local IMAGE_SIZE=$(du -sh $1/$2.zip | awk '{ print $1 }') local IMAGE_SIZE=$(du -sh $1/$2.zip | awk '{ print $1 }')
echo -e "\033[0;31m\033[1m$(date) | Meashuring copmlete!\033[0m\033[0m" echo -e "\033[0;31m\033[1m$(date) | Meashuring copmlete!\033[0m\033[0m"
echo -e "\033[0;31m\033[1m$(date) | Meashure hash-sum of zip-image\033[0m\033[0m"
local IMAGE_HASH=$(sha256sum $1/$2.zip | awk '{ print $1 }')
echo -e "\033[0;31m\033[1m$(date) | Meashuring copmlete!\033[0m\033[0m"
echo "" echo ""
echo "\$6: $6" echo "\$6: $6"
echo "" echo ""
echo -e "\033[0;31m\033[1m$(date) | Post message to GH\033[0m\033[0m" echo -e "\033[0;31m\033[1m$(date) | Post message to GH\033[0m\033[0m"
local NEW_RELEASE_BODY="### Download\n* [$2.zip]($IMAGE_LINK) ($IMAGE_SIZE)\n\n$6" local NEW_RELEASE_BODY="### Download\n* [$2.zip]($IMAGE_LINK) ($IMAGE_SIZE)\nsha256: $IMAGE_HASH\n\n$6"
local DATA="{ \"body\":\"$NEW_RELEASE_BODY\" }" local DATA="{ \"body\":\"$NEW_RELEASE_BODY\" }"
echo "" echo ""
echo "\$DATA: $DATA" echo "\$DATA: $DATA"
echo "" echo ""
local GH_LOGIN=$(cat $4 | jq '.github.login' -r) local GH_LOGIN=$(cat $4 | jq '.github.login' -r)
local GH_PASS=$(cat $4 | jq '.github.password' -r) local GH_PASS=$(cat $4 | jq '.github.password' -r)
local GH_URL=$(cat $4 | jq '.github.url' -r) local GH_URL=$(cat $4 | jq '.github.url' -r)

View File

@@ -18,7 +18,7 @@ touch /boot/ssh
# /usr/bin/raspi-config nonint do_ssh 0 # /usr/bin/raspi-config nonint do_ssh 0
# 2. Enable GPIO # 2. Enable GPIO
echo -e "\033[0;31m\033[1m$(date) | #2 SSHd enabled by default\033[0m\033[0m" echo -e "\033[0;31m\033[1m$(date) | #2 GPIO enabled by default\033[0m\033[0m"
# 3. Enable I2C # 3. Enable I2C
echo -e "\033[0;31m\033[1m$(date) | #3 Turn on I2C\033[0m\033[0m" echo -e "\033[0;31m\033[1m$(date) | #3 Turn on I2C\033[0m\033[0m"
@@ -32,11 +32,22 @@ echo -e "\033[0;31m\033[1m$(date) | #4 Turn on SPI\033[0m\033[0m"
echo -e "\033[0;31m\033[1m$(date) | #5 Turn on raspicam\033[0m\033[0m" echo -e "\033[0;31m\033[1m$(date) | #5 Turn on raspicam\033[0m\033[0m"
/usr/bin/raspi-config nonint do_camera 0 /usr/bin/raspi-config nonint do_camera 0
# 6. Enable V4L driver http://robocraft.ru/blog/electronics/3158.html # 6. Enable hardware UART
echo -e "\033[0;31m\033[1m$(date) | #6 Turn on UART\033[0m\033[0m"
# Temporary solution
# https://github.com/RPi-Distro/raspi-config/pull/75
/usr/bin/raspi-config nonint do_serial 1
/usr/bin/raspi-config nonint set_config_var enable_uart 1 /boot/config.txt
# After adding to Raspbian OS
# https://github.com/RPi-Distro/raspi-config/commit/d6d9ecc0d9cbe4aaa9744ae733b9cb239e79c116
#/usr/bin/raspi-config nonint do_serial 2
# 7. Enable V4L driver http://robocraft.ru/blog/electronics/3158.html
#echo "bcm2835-v4l2" >> /etc/modules #echo "bcm2835-v4l2" >> /etc/modules
echo -e "\033[0;31m\033[1m$(date) | #6 Turn on v4l2 driver\033[0m\033[0m" echo -e "\033[0;31m\033[1m$(date) | #7 Turn on v4l2 driver\033[0m\033[0m"
if ! grep -q "^bcm2835-v4l2" /etc/modules; then if ! grep -q "^bcm2835-v4l2" /etc/modules;
printf "bcm2835-v4l2\n" >> /etc/modules then printf "bcm2835-v4l2\n" >> /etc/modules
fi fi
echo -e "\033[0;31m\033[1m$(date) | End of configure hardware interfaces\033[0m\033[0m" echo -e "\033[0;31m\033[1m$(date) | End of configure hardware interfaces\033[0m\033[0m"