Compare commits

..

96 Commits

Author SHA1 Message Date
Oleg Kalachev
c899d74f95 Fix documentation building in image 2021-04-10 07:49:26 +03:00
Oleg Kalachev
a722397a72 Fix building documentation 2021-04-10 07:38:03 +03:00
Oleg Kalachev
606c52f782 Restore .git directory in clover repo 2021-04-10 03:09:57 +03:00
Oleg Kalachev
0d702b0c01 Merge branch 'master' into 22-armhf 2021-04-09 17:50:34 +03:00
Oleg Kalachev
42f6da25b7 More cleanup 2021-04-09 17:45:48 +03:00
Oleg Kalachev
5c56b6a5ed Sources lists cleanup 2021-04-09 17:30:55 +03:00
Oleg Kalachev
ff2e8b0709 Cleanup 2021-04-09 17:28:08 +03:00
Oleg Kalachev
bd38ad56c7 Continue... 2021-04-09 15:57:15 +03:00
Oleg Kalachev
9f2acc49c5 And yet another 2021-04-09 13:27:53 +03:00
Oleg Kalachev
f5c11bc528 And another 2021-04-09 13:27:35 +03:00
Oleg Kalachev
3e713c6c8a Another try to fix 2021-04-09 13:21:33 +03:00
Oleg Kalachev
6ce2822b78 Revert "Another try to fix"
This reverts commit 5a4c3a0da7.
2021-04-09 12:23:39 +03:00
Oleg Kalachev
5a4c3a0da7 Another try to fix 2021-04-09 12:05:51 +03:00
Oleg Kalachev
6b2f1445e8 Try to fix 2021-04-09 12:05:01 +03:00
Oleg Kalachev
55d6e47c60 Display all CMake variables 2021-04-09 10:56:50 +03:00
Oleg Kalachev
558baae1fc More debugging 2021-04-09 10:53:20 +03:00
Oleg Kalachev
f81247ccf3 Debugging 2021-04-09 10:50:55 +03:00
Oleg Kalachev
7ac4f8bec0 Verbosity 2021-04-09 09:00:57 +03:00
Oleg Kalachev
2111b366db Revert "Revert "image: use older CMake (3.13.4-1)""
This reverts commit a28c774e8f.
2021-04-09 08:46:47 +03:00
Oleg Kalachev
a28c774e8f Revert "image: use older CMake (3.13.4-1)"
This reverts commit df28da0060.
2021-04-09 08:04:20 +03:00
Oleg Kalachev
a8b321ce22 Try to fix 2021-04-09 07:49:37 +03:00
Oleg Kalachev
109542dc91 Try to fix 2021-04-09 06:40:26 +03:00
Oleg Kalachev
72252eb06e Revert "Temporarily disable rc and camera_markers building"
This reverts commit e119220e91.
2021-04-09 06:37:36 +03:00
Oleg Kalachev
876092e33e Fix standalone-install 2021-04-09 06:20:17 +03:00
Oleg Kalachev
e119220e91 Temporarily disable rc and camera_markers building 2021-04-09 05:19:57 +03:00
Oleg Kalachev
4a403b2399 Be verbose 2021-04-09 05:19:40 +03:00
Oleg Kalachev
ed64507bef Try to fix 2021-04-09 05:03:59 +03:00
Oleg Kalachev
98ff1d2b50 Yet another attempt to fix pthreads ld error 2021-04-09 03:20:19 +03:00
Oleg Kalachev
a8a42fe33d Another attempt to fix pthreads ld error 2021-04-08 14:18:02 +03:00
Oleg Kalachev
bd0037f3c9 Try to fix pthreads ld error 2021-04-08 13:34:21 +03:00
Oleg Kalachev
67b7e903fd Fix pthreads ld error 2021-04-08 12:42:52 +03:00
Oleg Kalachev
a184eb00af image: bring back moving ld.so.preload out of the way while building 2021-04-08 11:44:15 +03:00
Oleg Kalachev
2bd49201be image: update Raspberry Pi OS to 2021-03-04 2021-04-08 11:32:43 +03:00
Oleg Kalachev
df28da0060 image: use older CMake (3.13.4-1)
Fixing https://travis-ci.org/github/CopterExpress/clover/jobs/764367665#L6984
2021-03-25 23:23:10 +03:00
Oleg Kalachev
73d39e9ca6 Fix Node.js installation 2021-03-24 22:19:46 +03:00
Oleg Kalachev
23eac48fa4 Add CRYPTOGRAPHY_DONT_BUILD_RUST=1 2021-03-24 21:39:09 +03:00
Oleg Kalachev
9cdcbbc901 Merge branch 'master' into 22-armhf 2021-03-24 20:59:33 +03:00
Oleg Kalachev
edc740c8c0 Change Raspberry Pi OS to latest armhf, use packages.coex.tech as a source 2021-01-30 17:45:31 +03:00
Oleg Kalachev
9cddc81d1d Merge branch 'master' into 22 2020-11-13 12:36:56 +03:00
Alexey Rogachevskiy
ced9b56452 clover: Attempt to respawn dying nodelets 2020-11-07 16:52:57 +03:00
Alexey Rogachevskiy
8bd4d3a8f8 builder: Build with debug symbols 2020-11-07 16:43:27 +03:00
Alexey Rogachevskiy
4730dabaaf aruco_pose: Simplify dynamic parameter callback setting 2020-11-05 23:48:34 +03:00
Alexey Rogachevskiy
0991427878 aruco_pose: Don't expose vendored library symbols 2020-11-05 23:47:49 +03:00
Alexey Rogachevskiy
3d4c02bc03 aruco_pose, clover: Move subscriptions to the end of init 2020-11-05 23:22:30 +03:00
Alexey Rogachevskiy
8a6bdccc9c aruco_pose, clover: Reduce the amount of OpenCV libs requested 2020-11-05 23:20:59 +03:00
Alexey Rogachevskiy
f36401274d aruco_pose: Make vendored library compatible with older OpenCVs 2020-10-28 14:46:31 +03:00
Alexey Rogachevskiy
2cfd21269c aruco_pose: Make sure there are no undefined symbols
Also, compile in apriltag_quad_thresh.cpp - it contains some of the functions referenced
in aruco.cpp, which would otherwise be undefined.
2020-10-28 13:52:05 +03:00
Oleg Kalachev
81bcfef85b led: change default number of leds to 72 2020-10-27 19:52:54 +03:00
Alexey Rogachevskiy
00412125f9 clover: Use proper variable in aruco.launch 2020-10-27 11:27:52 +03:00
Alexey Rogachevskiy
55366a1fac aruco_gen: Open file in binary mode for Python3 compatibility 2020-10-27 11:26:49 +03:00
Oleg Kalachev
cc2ebb368d blocks: fix set_leds with color-typed argument 2020-10-25 19:21:05 +03:00
Oleg Kalachev
33500a13d0 docs: update and fix 0.22 migration articles 2020-10-25 00:16:17 +03:00
Oleg Kalachev
d7d95132ab blocks: force led_leds index to int 2020-10-24 22:18:56 +03:00
Oleg Kalachev
4c049ac349 simple_offboard: correctly check manual control timeout, separate it from kill switch check 2020-10-22 19:11:57 +03:00
Oleg Kalachev
fca3f52424 docs: use -o argument of genmap.py 2020-10-20 15:56:40 +03:00
Oleg Kalachev
27c0f23ffa genmap.py: add -o argument for output file name 2020-10-20 15:52:29 +03:00
Oleg Kalachev
d6590e9a8d aruco.launch: add placement, length and map arguments 2020-10-20 13:22:55 +03:00
Oleg Kalachev
c93beec30d docs: add ROS Noetic transition note 2020-10-20 11:57:02 +03:00
Oleg Kalachev
47628ba4af docs: python 3 update in auto_setup article 2020-10-20 11:34:47 +03:00
Oleg Kalachev
98e43aba49 docs: python 3 updates 2020-10-20 11:31:16 +03:00
Oleg Kalachev
404b42c9f9 docs: remove unneeded comment 2020-10-20 11:30:33 +03:00
Oleg Kalachev
6b831359dc docs: add 0.22 migration article 2020-10-20 11:19:23 +03:00
Oleg Kalachev
10076e35f4 Melodic => Noetic in some docs 2020-10-20 10:42:54 +03:00
Oleg Kalachev
76a6a58a42 Merge branch 'master' into raspios_64bit 2020-10-20 10:36:36 +03:00
Alexey Rogachevskiy
62069ab80a aruco_pose: Remove unused code 2020-10-18 18:48:58 +03:00
Alexey Rogachevskiy
e1643a681a clover_blocks: Use Python3 syntax for exec 2020-10-18 15:07:14 +03:00
Alexey Rogachevskiy
6f30613ce0 roswww_static: Add python script installation 2020-10-17 15:25:43 +03:00
Alexey Rogachevskiy
d539753e72 clover/selfcheck: Be more python3-compatible
This is basically commit a01d199890 from buster-python3, not sure if it aged well.
2020-10-15 23:39:54 +03:00
Alexey Rogachevskiy
cc80f2b4c1 aruco_pose, clover: Expose Python scripts through CMake 2020-10-15 23:32:08 +03:00
Alexey Rogachevskiy
1893f0528b clover: Fix importing urllib for Python3 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
ce1f1d9db5 builder: Don't try to install compressed_transport twice 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
8b42fcfda3 aruco_pose/draw: Replace OpenCV projection code with a rewrite 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
60b9d1d61d builder: Force versions for ROS packages that use OpenCV
Also, hold their versions so that they don't get updated for no reason.
2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
61ae5d0537 builder: Enable OpenCV 4.2 repository 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
7ffcbde82e builder: Use Python3 for Clever compat layer 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
ccc53f1cfb builder: Run Clever/Clover test with Python3 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
be2b447b46 builder: Install rosdep, etc. for python3 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
b333dd8708 builder: Use proper path for roscore 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
4b5524e467 builder: Install espeak for python3 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
5b970d5197 standalone_install: Use proper Python for pytest 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
617ae0dcdd builder: Install rpi_ws281x for Python3 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
a1d2ae9a23 builder: Use Python 3 syntax for Python 3 tests 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
9372386f6b builder/test: Use Python3 interpreter for ROS tests
TODO (?): add tests for Python2?
2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
4b97f9d4af builder: Install packages for Python 3 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
6af1fd2837 builder: Don't force Tornado version
Assume rosbridge_suite depends on the right one.
2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
b7545830ba builder: Add proper Noetic repository 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
4796c4acb7 aruco_pose, clover: Allow compiling against OpenCV 3 and 4 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
de3fb77db2 builder: Use variable substitution for validation 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
036d3dccd6 builder: Add Noetic package definitions 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
24cfc54c06 builder: Use variable substitution for ROS_DISTRO 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
173c8cbe3a standalone_install: Auto-select Python, ROS distro 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
2d8cd0e0ab travis: Enable Noetic build 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
ee667257ef clover: Use package version 3, update dependencies 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
3c4f57cbe7 builder: Don't try to install Melodic packages on Noetic 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
3ee598004a travis: Use 64-bit builder 2020-10-13 11:21:27 +03:00
Alexey Rogachevskiy
673cabe7ab builder: Use 64-bit Raspberry Pi OS 2020-10-13 11:21:27 +03:00
116 changed files with 295 additions and 929 deletions

View File

@@ -1,29 +0,0 @@
name: Build RPi image
on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]
release:
types: [ created ]
jobs:
build-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build image
run: |
docker run --privileged --rm -v /dev:/dev -v $(pwd):/builder/repo -e TRAVIS_TAG="${{ github.event.release.tag_name }}" sfalexrog/img-tool:qemu-update
- name: Compress image
run: |
sudo chmod -R 777 images && zip -9 $(echo images/clover_*).zip images/clover_* && ls -l images
- name: Upload image
uses: softprops/action-gh-release@v1
if: ${{ github.event_name == 'release' }}
with:
files: images/clover_*.zip
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,23 +0,0 @@
name: Build
on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]
jobs:
build-melodic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Native Melodic build
run: |
docker run --rm -v $(pwd):/root/catkin_ws/src/clover ros:melodic-ros-base /root/catkin_ws/src/clover/builder/standalone-install.sh
build-noetic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Native Noetic build
run: |
docker run --rm -v $(pwd):/root/catkin_ws/src/clover ros:noetic-ros-base /root/catkin_ws/src/clover/builder/standalone-install.sh

View File

@@ -1,54 +0,0 @@
name: Documentation
on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]
jobs:
documentation:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with: { node-version: '10' }
- name: Setup tools
run: |
sudo sh -c "echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections"
sudo apt-get update && sudo apt-get install -y calibre msttcorefonts
npm install gitbook-cli -g
gitbook fetch 3.2.3 && npm i npm@3.10.10 --prefix=~/.gitbook/versions/3.2.3/ # fixing https://travis-ci.org/github/CopterExpress/clover/jobs/766541125#L932
npm install markdownlint-cli -g
npm install svgexport -g
gitbook -V
markdownlint -V
- name: Run markdownlint
run: markdownlint docs
- name: Check Assets
run: |
./check_assets_size.py
./check_unused_assets.py
- name: Build GitBook
run: |
gitbook install
gitbook build
- name: Generate PDF
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: |
for i in 1 2 3 4; do gitbook pdf ./ _book/clover.pdf && break || sleep 1; done
sudo apt-get -q install ghostscript
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile=_book/clover_ru_compressed.pdf _book/clover_ru.pdf
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile=_book/clover_en_compressed.pdf _book/clover_en.pdf
rm _book/clover_ru.pdf && mv _book/clover_ru_compressed.pdf _book/clover_ru.pdf
rm _book/clover_en.pdf && mv _book/clover_en_compressed.pdf _book/clover_en.pdf
ls -lah _book/clover*.pdf
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
with:
branch: gh-pages
folder: _book
clean: true
single-commit: true # to avoid multiple copies of large pdf files

View File

@@ -1,18 +0,0 @@
name: Editorconfig lint
on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]
jobs:
editorconfig:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: .editorconfig Linter
run: |
wget --no-verbose https://github.com/okalachev/editorconfig-checker/releases/download/1.2.1-disable-spaces-amount/ec-linux-amd64
chmod +x ec-linux-amd64
./ec-linux-amd64 -spaces-after-tabs -e "roslib.js|ros3d.js|eventemitter2.js|draw.cpp|BinUtils.swift|\.idea|apps/android/app|blockly/|clover_blocks/programs/|highlight/|python.js|Assets.xcassets|test_parser_pass.txt|test_node_failure.txt|aruco_pose/vendor|\.stl|\.dxf|\.dae"

View File

@@ -110,8 +110,7 @@
"Li-ion",
"Nvidia",
"VirtualBox",
"VMware",
"DuoCam"
"VMware"
],
"code_blocks": false
},

132
.travis.yml Normal file
View File

@@ -0,0 +1,132 @@
os: linux
dist: xenial
language: generic
services:
- docker
env:
global:
- DOCKER="sfalexrog/img-tool:qemu-update"
- TARGET_REPO="https://github.com/${TRAVIS_REPO_SLUG}.git"
- IMAGE_VERSION=${TRAVIS_TAG:-${TRAVIS_COMMIT:0:7}}
- IMAGE_NAME="$(basename -s '.git' ${TARGET_REPO})_${IMAGE_VERSION}.img"
git:
depth: 1
jobs:
fast_finish: true
include:
- stage: Build
name: "Raspberry Pi Image Build"
cache:
directories:
- imgcache
before_script:
- docker pull ${DOCKER}
# Check if there are any cached images, copy them to our "images" directory
- if [ -n "$(ls -A imgcache/*.zip)" ]; then mkdir -p images && cp imgcache/*.zip images; fi
script:
- if [[ -z ${TRAVIS_TAG} && "${TRAVIS_PULL_REQUEST}" != "false" ]]; then
echo "Commit range is ${TRAVIS_COMMIT_RANGE}" &&
if [ $(git diff --name-only ${TRAVIS_COMMIT_RANGE} | grep -v ^"docs/" | wc -l) -eq 0 ]; then
echo " === Docs-only change; skipping build ===" &&
export SKIP_BUILD=true;
fi;
fi
- if [ -z ${SKIP_BUILD} ]; then
docker run --privileged --rm -v /dev:/dev -v $(pwd):/builder/repo -e TRAVIS_TAG="${TRAVIS_TAG}" ${DOCKER};
fi
before_cache:
- cp images/*.zip imgcache
after_success:
- sudo chmod -R 777 *
- cd images && zip -9 ${IMAGE_NAME}.zip ${IMAGE_NAME} && stat --printf="Compressed image size:%s\n" ${IMAGE_NAME}.zip
before_deploy:
# Set up git user name and tag this commit
- git config --local user.name "goldarte"
- git config --local user.email "goldartt@gmail.com"
deploy:
provider: releases
token: ${GITHUB_OAUTH_TOKEN}
file: ${IMAGE_NAME}.zip
skip_cleanup: true
on:
tags: true
draft: true
name: ${TRAVIS_TAG}
- stage: Build
name: "Native Kinetic build"
env:
- NATIVE_DOCKER=ros:kinetic-ros-base
before_script:
- docker pull ${NATIVE_DOCKER}
script:
- docker run --rm -v $(pwd):/root/catkin_ws/src/clover ${NATIVE_DOCKER} /root/catkin_ws/src/clover/builder/standalone-install.sh
- stage: Build
name: "Native Melodic build"
env:
- NATIVE_DOCKER=ros:melodic-ros-base
before_script:
- docker pull ${NATIVE_DOCKER}
script:
- docker run --rm -v $(pwd):/root/catkin_ws/src/clover ${NATIVE_DOCKER} /root/catkin_ws/src/clover/builder/standalone-install.sh
- stage: Build
name: "Native Noetic build"
env:
- NATIVE_DOCKER=ros:noetic-ros-base
before_script:
- docker pull ${NATIVE_DOCKER}
script:
- docker run --rm -v $(pwd):/root/catkin_ws/src/clover ${NATIVE_DOCKER} /root/catkin_ws/src/clover/builder/standalone-install.sh
- stage: Build
name: "Documentation"
language: node_js
node_js:
- "10"
before_script:
- sudo sh -c "echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections"
- sudo apt update && sudo apt install -y calibre msttcorefonts
- npm install gitbook-cli -g
- gitbook fetch 3.2.3 && npm i npm@3.10.10 --prefix=~/.gitbook/versions/3.2.3/ # fixing https://travis-ci.org/github/CopterExpress/clover/jobs/766541125#L932
- npm install markdownlint-cli -g
- npm install svgexport -g
- gitbook -V
- markdownlint -V
script:
- markdownlint docs
- ./check_assets_size.py
- ./check_unused_assets.py
- gitbook install
- gitbook build
- for i in 1 2 3 4; do gitbook pdf ./ _book/clover.pdf && break || sleep 1; done
- sudo apt-get install ghostscript
- gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile=_book/clover_ru_compressed.pdf _book/clover_ru.pdf
- gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile=_book/clover_en_compressed.pdf _book/clover_en.pdf
- rm _book/clover_ru.pdf && mv _book/clover_ru_compressed.pdf _book/clover_ru.pdf
- rm _book/clover_en.pdf && mv _book/clover_en_compressed.pdf _book/clover_en.pdf
- ls -lah _book/clover*.pdf
deploy:
provider: pages
local_dir: _book
skip_cleanup: true
token: ${GITHUB_OAUTH_TOKEN}
keep_history: true
target_branch: master
repo: CopterExpress/clover.coex.tech
fqdn: clover.coex.tech
verbose: true
on:
branch: master
- stage: Build
name: Editorconfig-lint
language: generic
before_script:
- wget https://github.com/okalachev/editorconfig-checker/releases/download/1.2.1-disable-spaces-amount/ec-linux-amd64
- chmod +x ec-linux-amd64
script:
- ./ec-linux-amd64 -spaces-after-tabs -e "roslib.js|ros3d.js|eventemitter2.js|draw.cpp|BinUtils.swift|\.idea|apps/android/app|blockly/|clover_blocks/programs/|highlight/|python.js|Assets.xcassets|test_parser_pass.txt|test_node_failure.txt|aruco_pose/vendor|\.stl|\.dxf|\.dae"
stages:
- Build
# More info there
# https://github.com/travis-ci/travis-ci/issues/6893
# https://docs.travis-ci.com/user/customizing-the-build/
# https://docs.travis-ci.com/user/deployment/releases
# https://docs.travis-ci.com/user/environment-variables/

View File

@@ -20,7 +20,7 @@ Clover drone is used on a wide range of educational events, including [Copter Ha
Preconfigured image for Raspberry Pi with installed and configured software, ready to fly, is available [in the Releases section](https://github.com/CopterExpress/clover/releases).
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/CopterExpress/clover/CI)
[![Build Status](https://travis-ci.org/CopterExpress/clover.svg?branch=master)](https://travis-ci.org/CopterExpress/clover)
![GitHub all releases](https://img.shields.io/github/downloads/CopterExpress/clover/total)
Image features:
@@ -38,10 +38,6 @@ API description for autonomous flights is available [on GitBook](https://clover.
For manual package installation and running see [`clover` package documentation](clover/README.md).
## Support
[![Telegram Support Chat](https://img.shields.io/endpoint?label=Support%20Chat&url=https%3A%2F%2Ftelegram-badge-4mbpu8e0fit4.runkit.sh%2F%3Furl%3Dhttps%3A%2F%2Ft.me%2FCOEXHelpDesk)](https://t.me/COEXHelpdesk)
## License
While the Clover platform source code is available under the MIT License, note, that the [documentation](docs/) is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

View File

@@ -119,7 +119,7 @@ generate_messages(
## Generate dynamic reconfigure parameters in the 'cfg' folder
generate_dynamic_reconfigure_options(
cfg/Detector.cfg
cfg/DetectorParams.cfg
)
###################################
@@ -159,6 +159,9 @@ add_library(aruco_pose
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_generate_messages_cpp ${PROJECT_NAME}_gencfg)
# FIXME: hack to fix https://travis-ci.org/github/CopterExpress/clover/jobs/766318908#L6532
string(REPLACE "-lpthreads;" "" catkin_LIBRARIES "${catkin_LIBRARIES}")
## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
@@ -202,11 +205,11 @@ set_property(TARGET aruco_pose
# )
## Mark executables and/or libraries for installation
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
@@ -226,10 +229,6 @@ catkin_install_python(PROGRAMS src/genmap.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY map DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
#############
## Testing ##
#############

View File

@@ -16,7 +16,7 @@
set -e # Exit immidiately on non-zero result
# https://www.raspberrypi.org/software/operating-systems/#raspberry-pi-os-32-bit
SOURCE_IMAGE="https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-05-28/2021-05-07-raspios-buster-armhf-lite.zip"
SOURCE_IMAGE="https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-03-25/2021-03-04-raspios-buster-armhf-lite.zip"
export DEBIAN_FRONTEND=${DEBIAN_FRONTEND:='noninteractive'}
export LANG=${LANG:='C.UTF-8'}
@@ -105,6 +105,8 @@ ${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/butterf
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/monkey.service' '/lib/systemd/system/'
# software install
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-software.sh'
# examples
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/examples' '/home/pi/' # TODO: symlink?
# network setup
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-network.sh'
# avahi setup

View File

@@ -113,7 +113,6 @@ my_travis_retry pip3 install -r /home/pi/catkin_ws/src/clover/clover/requirement
source /opt/ros/${ROS_DISTRO}/setup.bash
# Don't build simulation plugins for actual drone
catkin_make -j2 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCATKIN_BLACKLIST_PACKAGES=clover_gazebo_plugins
source devel/setup.bash
echo_stamp "Install clever package (for backwards compatibility)"
cd /home/pi/catkin_ws/src/clover/builder/assets/clever
@@ -136,9 +135,7 @@ my_travis_retry apt-get install -y --no-install-recommends \
ros-${ROS_DISTRO}-usb-cam \
ros-${ROS_DISTRO}-vl53l1x \
ros-${ROS_DISTRO}-ws281x \
ros-${ROS_DISTRO}-rosshow \
ros-${ROS_DISTRO}-cmake-modules \
ros-${ROS_DISTRO}-image-view
ros-${ROS_DISTRO}-rosshow
# TODO move GeographicLib datasets to Mavros debian package
echo_stamp "Install GeographicLib datasets (needed for mavros)" \
@@ -152,8 +149,7 @@ catkin_make run_tests #&& catkin_test_results
echo_stamp "Change permissions for catkin_ws"
chown -Rf pi:pi /home/pi/catkin_ws
echo_stamp "Make \$HOME/examples symlink"
ln -s "$(catkin_find clover examples --first-only)" /home/pi
echo_stamp "Change permissions for examples"
chown -Rf pi:pi /home/pi/examples
echo_stamp "Setup ROS environment"

View File

@@ -148,12 +148,11 @@ my_travis_retry pip3 install --prefer-binary rpi_ws281x
echo_stamp "Setup Monkey"
mv /etc/monkey/sites/default /etc/monkey/sites/default.orig
mv /root/monkey /etc/monkey/sites/default
sed -i 's/SymLink Off/SymLink On/' /etc/monkey/monkey.conf
systemctl enable monkey.service
echo_stamp "Install Node.js"
cd /home/pi
wget --no-verbose https://nodejs.org/dist/v10.15.0/node-v10.15.0-linux-armv6l.tar.gz
wget https://nodejs.org/dist/v10.15.0/node-v10.15.0-linux-armv6l.tar.gz
tar -xzf node-v10.15.0-linux-armv6l.tar.gz
cp -R node-v10.15.0-linux-armv6l/* /usr/local/
rm -rf node-v10.15.0-linux-armv6l/

View File

@@ -20,16 +20,12 @@ export ROS_DISTRO='noetic'
export ROS_IP='127.0.0.1'
source /opt/ros/${ROS_DISTRO}/setup.bash
source /home/pi/catkin_ws/devel/setup.bash
systemctl start roscore
cd /home/pi/catkin_ws/src/clover/builder/test/
./tests.sh
./tests.py
./tests_py3.py
[[ $(./test_qr.py) == "Found QRCODE with data Проверка Unicode with center at x=66.0, y=66.0" ]]
[[ $(./tests_clever.py) == "Warning: clever package is renamed to clover" ]] # test backwards compatibility
systemctl stop roscore
echo "Move /etc/ld.so.preload back to its original position"
mv /etc/ld.so.preload.disabled-for-build /etc/ld.so.preload

View File

@@ -3,17 +3,10 @@
# Perform a "standalone install" in a Docker container
set -e
# Step 1: Install pip
apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 # https://github.com/osrf/docker_images/issues/535
apt-get update
apt-get install -y curl
if [ "x${ROS_PYTHON_VERSION}" = "x3" ]; then
PYTHON=python3
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
else
PYTHON=python
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
fi
${PYTHON} ./get-pip.py
apt update
apt install -y curl
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 ./get-pip.py
# Step 1.5: Add deb.coex.tech to apt
curl http://deb.coex.tech/aptly_repo_signing.key 2> /dev/null | apt-key add -
@@ -41,7 +34,7 @@ ws281x:
ubuntu:
${CODENAME}: [ros-${ROS_DISTRO}-ws281x]
EOF
apt-get update
apt update
rosdep update
# Step 2: Run rosdep to install all dependencies
@@ -57,10 +50,7 @@ cd /root/catkin_ws
catkin_make
# Step 4: Run tests
${PYTHON} -m pip install --upgrade pytest
python3 -m pip install --upgrade pytest # TODO: https://github.com/CopterExpress/clover/commit/5b970d51970cfa6f46e5c0b34acb7889d36b89c8
cd /root/catkin_ws
source devel/setup.bash
catkin_make run_tests && catkin_test_results
# Step 5: Install packages
catkin_make install

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -1,42 +0,0 @@
#!/usr/bin/env python3
# Test QG recognition example
# Should be synced with the documentation: /docs/en/camera.md, /docs/ru/camera.md
# TODO: use real ROS topics
import rospy
from pyzbar import pyzbar
from cv_bridge import CvBridge
from sensor_msgs.msg import Image
bridge = CvBridge()
# rospy.init_node('barcode_test')
# Image subscriber callback function
def image_callback(data):
cv_image = bridge.imgmsg_to_cv2(data, 'bgr8') # OpenCV image
barcodes = pyzbar.decode(cv_image)
for barcode in barcodes:
b_data = barcode.data.decode("utf-8")
b_type = barcode.type
(x, y, w, h) = barcode.rect
xc = x + w/2
yc = y + h/2
print("Found {} with data {} with center at x={}, y={}".format(b_type, b_data, xc, yc))
# rospy.signal_shutdown('done')
# image_sub = rospy.Subscriber('main_camera/image_raw', Image, image_callback, queue_size=1)
# ==============================================================================
# Publish test image
# rospy.sleep(2)
import cv2
img = cv2.imread('qr.png')
image_callback(bridge.cv2_to_imgmsg(img, 'bgr8'))
# image_pub = rospy.Publisher('/main_camera/image_raw', Image, queue_size=1, latch=True)
# image_pub.publish(bridge.cv2_to_imgmsg(img, 'bgr8'))
# rospy.spin()

View File

@@ -4,26 +4,18 @@
import rospy
from geometry_msgs.msg import PoseStamped
from sensor_msgs.msg import Range, BatteryState
import cv2
import cv2.aruco
from sensor_msgs.msg import Image
from cv_bridge import CvBridge
import numpy
import mavros
from mavros_msgs.msg import State, StatusText, ExtendedState, RCIn, Mavlink
from mavros_msgs.msg import State, StatusText, ExtendedState
from mavros_msgs.srv import CommandBool, CommandLong, SetMode
from std_srvs.srv import Trigger
from clover.srv import GetTelemetry, Navigate, NavigateGlobal, SetPosition, SetVelocity, \
SetAttitude, SetRates, SetLEDEffect
from led_msgs.srv import SetLEDs
from led_msgs.msg import LEDStateArray, LEDState
from aruco_pose.msg import Marker, MarkerArray, Point2D
import dynamic_reconfigure.client
import tf2_ros
import tf2_geometry_msgs

View File

@@ -54,8 +54,6 @@ rosversion usb_cam
rosversion cv_camera
rosversion web_video_server
rosversion rosshow
rosversion nodelet
rosversion image_view
# validate examples are present
[[ $(ls /home/pi/examples/*) ]]

View File

@@ -185,6 +185,9 @@ add_executable(clover_led src/led.cpp)
add_executable(shell src/shell.cpp)
# FIXME: hack to fix https://travis-ci.org/github/CopterExpress/clover/jobs/766318908#L6532
string(REPLACE "-lpthreads;" "" catkin_LIBRARIES "${catkin_LIBRARIES}")
target_link_libraries(simple_offboard
${catkin_LIBRARIES}
${GeographicLib_LIBRARIES}
@@ -241,12 +244,12 @@ target_link_libraries(${PROJECT_NAME}
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
# Mark executables and/or libraries for installation
install(TARGETS simple_offboard clover_rc camera_markers vpe_publisher clover_led shell clover
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
## Mark executables and/or libraries for installation
# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
@@ -266,12 +269,6 @@ catkin_install_python(PROGRAMS src/selfcheck.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY examples DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
# TODO: install www
# Only install udev rules when building a Debian package
# FIXME: Other operating systems may have other prefixes
string(FIND ${CMAKE_INSTALL_PREFIX} "/opt/ros" _PREFIX_INDEX)

View File

@@ -1,11 +0,0 @@
# Information: https://clover.coex.tech/en/simple_offboard.html#gettelemetry
import rospy
from clover import srv
rospy.init_node('flight')
get_telemetry = rospy.ServiceProxy('get_telemetry', srv.GetTelemetry)
# Print drone's state
print(get_telemetry())

View File

@@ -9,7 +9,7 @@
<!-- For additional help go to https://clover.coex.tech/aruco -->
<!-- aruco_detect: detect aruco markers, estimate poses -->
<node name="aruco_detect" pkg="nodelet" if="$(arg aruco_detect)" type="nodelet" args="load aruco_pose/aruco_detect main_camera_nodelet_manager" output="screen" clear_params="true" respawn="true">
<node name="aruco_detect" pkg="nodelet" if="$(arg aruco_detect)" type="nodelet" args="load aruco_pose/aruco_detect nodelet_manager" output="screen" clear_params="true" respawn="true">
<remap from="image_raw" to="main_camera/image_raw"/>
<remap from="camera_info" to="main_camera/camera_info"/>
<remap from="map_markers" to="aruco_map/markers" if="$(arg aruco_map)"/>
@@ -26,7 +26,7 @@
</node>
<!-- aruco_map: estimate aruco map pose -->
<node name="aruco_map" pkg="nodelet" type="nodelet" if="$(arg aruco_map)" args="load aruco_pose/aruco_map main_camera_nodelet_manager" output="screen" clear_params="true" respawn="true">
<node name="aruco_map" pkg="nodelet" type="nodelet" if="$(arg aruco_map)" args="load aruco_pose/aruco_map nodelet_manager" output="screen" clear_params="true" respawn="true">
<remap from="image_raw" to="main_camera/image_raw"/>
<remap from="camera_info" to="main_camera/camera_info"/>
<remap from="markers" to="aruco_detect/markers"/>

View File

@@ -11,7 +11,8 @@
<arg name="rangefinder_vl53l1x" default="true"/>
<arg name="led" default="true"/>
<arg name="blocks" default="false"/>
<arg name="rc" default="false"/>
<arg name="rc" default="true"/>
<arg name="shell" default="true"/>
<arg name="simulator" default="false"/> <!-- flag that we are operating on a simulated drone -->
@@ -36,13 +37,18 @@
<include file="$(find clover)/launch/aruco.launch" if="$(arg aruco)"/>
<!-- optical flow -->
<node pkg="nodelet" type="nodelet" name="optical_flow" args="load clover/optical_flow main_camera_nodelet_manager" if="$(arg optical_flow)" clear_params="true" output="screen" respawn="true">
<node pkg="nodelet" type="nodelet" name="optical_flow" args="load clover/optical_flow nodelet_manager" if="$(arg optical_flow)" clear_params="true" output="screen" respawn="true">
<remap from="image_raw" to="main_camera/image_raw"/>
<remap from="camera_info" to="main_camera/camera_info"/>
<param name="calc_flow_gyro" value="true"/>
<param name="roi_rad" value="0.8"/>
</node>
<!-- main nodelet manager -->
<node pkg="nodelet" type="nodelet" name="nodelet_manager" args="manager" output="screen" clear_params="true" respawn="true">
<param name="num_worker_threads" value="2"/>
</node>
<node pkg="tf2_ros" type="static_transform_publisher" name="map_flipped_frame" args="0 0 0 3.1415926 3.1415926 0 map map_flipped"/>
<!-- simplified offboard control -->
@@ -85,6 +91,9 @@
<param name="use_fake_gcs" value="false"/>
</node>
<!-- Shell access through ROS service -->
<node name="shell" pkg="clover" type="shell" output="screen" if="$(arg shell)"/>
<!-- Update static directory -->
<node pkg="roswww_static" name="roswww_static" type="main.py" clear_params="true">
<param name="default_package" value="clover"/>

View File

@@ -36,7 +36,7 @@
posctl: { r: 50, g: 100, b: 220 }
offboard: { r: 220, g: 20, b: 250 }
low_battery: { threshold: 3.6, effect: blink_fast, r: 255, g: 0, b: 0 }
error: { effect: flash, r: 255, g: 0, b: 0, ignore: [ "[lpe] vision position timeout" ]}
error: { effect: flash, r: 255, g: 0, b: 0 }
</rosparam>
</node>
</launch>

View File

@@ -3,7 +3,6 @@
<arg name="direction_z" default="down"/> <!-- direction the camera points: down, up -->
<arg name="direction_y" default="backward"/> <!-- direction the camera cable points: backward, forward -->
<arg name="device" default="/dev/video0"/> <!-- v4l2 device -->
<arg name="simulator" default="false"/>
<node if="$(eval direction_z == 'down' and direction_y == 'backward')" pkg="tf2_ros" type="static_transform_publisher" name="main_camera_frame" args="0.05 0 -0.07 -1.5707963 0 3.1415926 base_link main_camera_optical"/>
@@ -18,14 +17,9 @@
<!-- static_transform_publisher arguments: x y z yaw pitch roll frame_id child_frame_id -->
<!-- <node pkg="tf2_ros" type="static_transform_publisher" name="main_camera_frame" args="0.05 0 -0.07 -1.5707963 0 3.1415926 base_link main_camera_optical"/> -->
<!-- camera nodelet manager -->
<node pkg="nodelet" type="nodelet" name="main_camera_nodelet_manager" args="manager" output="screen" clear_params="true" respawn="true">
<param name="num_worker_threads" value="2"/>
</node>
<!-- camera node -->
<node pkg="nodelet" type="nodelet" name="main_camera" args="load cv_camera/CvCameraNodelet main_camera_nodelet_manager" launch-prefix="rosrun clover waitfile $(arg device)" clear_params="true" unless="$(arg simulator)" respawn="true">
<param name="device_path" value="$(arg device)"/>
<node pkg="nodelet" type="nodelet" name="main_camera" args="load cv_camera/CvCameraNodelet nodelet_manager" clear_params="true" unless="$(arg simulator)" respawn="true">
<param name="device_path" value="/dev/video0"/> <!-- v4l2 device -->
<param name="frame_id" value="main_camera_optical"/>
<param name="camera_info_url" value="file://$(find clover)/camera_info/fisheye_cam.yaml"/>

View File

@@ -6,16 +6,13 @@
<arg name="viz" default="true"/>
<arg name="respawn" default="true"/>
<arg name="distance_sensor_remap" default="rangefinder/range"/>
<arg name="usb_device" default="/dev/px4fmu"/>
<arg name="prefix" default="" unless="$(eval fcu_conn == 'usb')"/>
<arg name="prefix" default="rosrun clover waitfile $(arg usb_device)" if="$(eval fcu_conn == 'usb')"/>
<node pkg="mavros" type="mavros_node" name="mavros" launch-prefix="$(arg prefix)" required="false" clear_params="true" respawn="$(arg respawn)" unless="$(eval fcu_conn == 'none')" respawn_delay="1" output="screen">
<node pkg="mavros" type="mavros_node" name="mavros" required="false" clear_params="true" respawn="$(arg respawn)" unless="$(eval fcu_conn == 'none')" respawn_delay="1" output="screen">
<!-- UART connection -->
<param name="fcu_url" value="/dev/ttyAMA0:921600" if="$(eval fcu_conn is None or fcu_conn == 'uart')"/>
<!-- USB connection -->
<param name="fcu_url" value="$(arg usb_device)" if="$(eval fcu_conn == 'usb')"/>
<param name="fcu_url" value="/dev/px4fmu" if="$(eval fcu_conn == 'usb')"/>
<!-- sitl before PX4 1.9.0 -->
<param name="fcu_url" value="udp://@$(arg fcu_ip):14557" if="$(eval fcu_conn == 'udp')"/>

View File

@@ -12,7 +12,6 @@
#include <ros/ros.h>
#include <string>
#include <vector>
#include <boost/algorithm/string.hpp>
#include <clover/SetLEDEffect.h>
@@ -30,7 +29,6 @@ ros::Timer timer;
ros::Time start_time;
double blink_rate, blink_fast_rate, flash_delay, fade_period, wipe_period, rainbow_period;
double low_battery_threshold;
std::vector<std::string> error_ignore;
bool blink_state;
led_msgs::SetLEDs set_leds;
led_msgs::LEDStateArray state, start_state;
@@ -276,10 +274,6 @@ void handleMavrosState(const mavros_msgs::State& msg)
void handleLog(const rosgraph_msgs::Log& log)
{
if (log.level >= rosgraph_msgs::Log::ERROR) {
// check if ignored
for (auto const& str : error_ignore) {
if (log.msg.find(str) != std::string::npos) return;
}
notify("error");
}
}
@@ -308,7 +302,6 @@ int main(int argc, char **argv)
nh_priv.param("rainbow_period", rainbow_period, 5.0);
nh_priv.param("notify/low_battery/threshold", low_battery_threshold, 3.7);
nh_priv.param("notify/error/ignore", error_ignore, {});
ros::service::waitForService("set_leds"); // cannot work without set_leds service
set_leds_srv = nh.serviceClient<led_msgs::SetLEDs>("set_leds", true);

View File

@@ -153,7 +153,7 @@ private:
cv::Point2d shift = cv::phaseCorrelate(prev_, curr_, hann_, &response);
// Publish raw shift in pixels
geometry_msgs::Vector3Stamped shift_vec;
static geometry_msgs::Vector3Stamped shift_vec;
shift_vec.header.stamp = msg->header.stamp;
shift_vec.header.frame_id = msg->header.frame_id;
shift_vec.vector.x = shift.x;
@@ -180,7 +180,7 @@ private:
double flow_y = atan2(points_undist[0].y, focal_length_y);
// // Convert to FCU frame
geometry_msgs::Vector3Stamped flow_camera, flow_fcu;
static geometry_msgs::Vector3Stamped flow_camera, flow_fcu;
flow_camera.header.frame_id = msg->header.frame_id;
flow_camera.header.stamp = msg->header.stamp;
flow_camera.vector.x = flow_y; // +y means counter-clockwise rotation around Y axis
@@ -199,7 +199,7 @@ private:
if (calc_flow_gyro_) {
try {
auto flow_gyro_camera = calcFlowGyro(msg->header.frame_id, prev_stamp_, msg->header.stamp);
geometry_msgs::Vector3Stamped flow_gyro_fcu;
static geometry_msgs::Vector3Stamped flow_gyro_fcu;
tf_buffer_->transform(flow_gyro_camera, flow_gyro_fcu, fcu_frame_id_);
flow_.integrated_xgyro = flow_gyro_fcu.vector.x;
flow_.integrated_ygyro = flow_gyro_fcu.vector.y;
@@ -207,7 +207,7 @@ private:
} catch (const tf2::TransformException& e) {
// Invalidate previous frame
prev_.release();
goto publish_debug;
return;
}
}
@@ -219,10 +219,6 @@ private:
flow_.quality = (uint8_t)(response * 255);
flow_pub_.publish(flow_);
prev_ = curr_.clone();
prev_stamp_ = msg->header.stamp;
publish_debug:
// Publish debug image
if (img_pub_.getNumSubscribers() > 0) {
// publish debug image
@@ -236,12 +232,15 @@ publish_debug:
}
// Publish estimated angular velocity
geometry_msgs::TwistStamped velo;
static geometry_msgs::TwistStamped velo;
velo.header.stamp = msg->header.stamp;
velo.header.frame_id = fcu_frame_id_;
velo.twist.angular.x = flow_fcu.vector.x / integration_time.toSec();
velo.twist.angular.y = flow_fcu.vector.y / integration_time.toSec();
velo.twist.angular.x = flow_.integrated_x / integration_time.toSec();
velo.twist.angular.y = flow_.integrated_y / integration_time.toSec();
velo_pub_.publish(velo);
prev_ = curr_.clone();
prev_stamp_ = msg->header.stamp;
}
}

View File

@@ -712,7 +712,7 @@ bool serve(enum setpoint_type_t sp_type, float x, float y, float z, float vx, fl
}
if (sp_type == VELOCITY) {
Vector3Stamped vel;
static Vector3Stamped vel;
vel.header.frame_id = frame_id;
vel.header.stamp = stamp;
vel.vector.x = vx;

View File

@@ -53,7 +53,7 @@ void publishZero(const ros::TimerEvent& e)
}
ROS_INFO_THROTTLE(10, "publish zero");
geometry_msgs::PoseStamped zero;
static geometry_msgs::PoseStamped zero;
zero.header.frame_id = local_frame_id;
zero.header.stamp = e.current_real;
zero.pose.orientation.w = 1;

View File

@@ -1,9 +0,0 @@
#!/usr/bin/env bash
# $ ./waitfile <file> <command> <args...>
# wait until <file> appears and then invoke <command> with <args>
echo "wait for file $1"
while [ ! -e "$1" ]; do sleep 1; done;
echo "file $1 appeared"
exec "${@:2}"

View File

@@ -33,3 +33,19 @@ def test_web_video_server(node):
# Python 3
import urllib.request as urllib
urllib.urlopen("http://localhost:8080").read()
def test_shell(node):
execute = rospy.ServiceProxy('exec', srv.Execute)
execute.wait_for_service(5)
res = execute(cmd='echo foo')
assert res.code == 0
assert res.output == 'foo\n'
res = execute(cmd='foo')
assert res.code == 32512
assert res.output == ''
res = execute(cmd='ls foo')
assert res.code == 512
assert res.output == ''

View File

@@ -1 +0,0 @@
/tmp/clover.err

View File

@@ -1 +0,0 @@
/etc/clover_version

View File

@@ -9,20 +9,19 @@
<li><a href="viz.html">View 3D visualization</a> (<code>ros3djs</code>)</li>
<li><a href="aruco_map.html">3D visualization for markers map</a> (<code>ros3djs</code>)</li>
<li><a href="../clover_blocks/">Blocks programming</a> (<code>Blockly</code>)</li>
<li><a href="clover.err">Clover console</a> (<code>/tmp/clover.err</code>)</li>
</ul>
<div class="version"></div>
<script src="js/roslib.js"></script>
<script type="text/javascript">
document.querySelector("#wvs").href = location.protocol + '//' + location.hostname + ':8080';
document.querySelector("#butterfly").href = location.protocol + '//' + location.hostname + ':57575';
// Determine image version
fetch('clover_version').then(function(response) {
if (response.status !== 200) return;
response.text().then(function(text) {
document.querySelector('.version').innerHTML = 'Version: ' + text;
});
var ros = new ROSLIB.Ros({ url: 'ws://' + location.hostname + ':9090' });
var exec = new ROSLIB.Service({ ros: ros, name : '/exec', serviceType : 'clover/Execute' });
exec.callService(new ROSLIB.ServiceRequest({ cmd: 'cat /etc/clover_version' }), function(result) {
document.querySelector('.version').innerHTML = 'Version: ' + result.output;
});
</script>

View File

@@ -73,11 +73,6 @@ catkin_install_python(PROGRAMS src/clover_blocks
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
# TODO: store programs in home directory?
install(DIRECTORY programs
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
#############
## Testing ##
#############

View File

@@ -11,8 +11,7 @@
from __future__ import print_function
import rospy
import os, sys
import traceback
import os
import threading
import re
import uuid
@@ -117,12 +116,7 @@ def run(req):
rospy.loginfo('Program forced to stop')
except Exception as e:
rospy.logerr(str(e))
traceback.print_exc()
etype, value, tb = sys.exc_info()
fmt = traceback.format_exception(etype, value, tb)
fmt.pop(1) # remove 'clover_blocks' file frame
exc_info = ''.join(fmt)
error_pub.publish(str(e) + '\n\n' + exc_info)
error_pub.publish(str(e))
rospy.loginfo('Program terminated')
running_lock.release()
@@ -146,7 +140,6 @@ def stop(req):
return {'success': True}
# TODO: find dir in installed package
programs_path = rospy.get_param('~programs_dir', os.path.dirname(os.path.abspath(__file__)) + '/../programs')

View File

@@ -52,7 +52,7 @@ target_compile_options(throttling_camera PRIVATE -std=c++11)
add_dependencies(throttling_camera ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY models DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY meshes DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY resources DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
catkin_install_python(PROGRAMS scripts/aruco_gen

View File

@@ -1,43 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Слой_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 566.93 226.77" style="enable-background:new 0 0 566.93 226.77;" xml:space="preserve">
<style type="text/css">
.st0{fill:#3679BC;}
.st1{fill:#27B4AA;}
</style>
<g>
<polygon class="st0" points="356.5,37.35 287.97,37.35 287.97,56.03 312.9,56.03 312.9,105.92 331.58,105.92 331.58,56.03
356.5,56.03 "/>
<polygon class="st0" points="434.54,56.03 434.54,37.35 366,37.35 366,37.39 365.97,37.39 365.97,105.92 366,105.92 384.65,105.92
434.54,105.92 434.54,87.24 384.65,87.24 384.65,80.99 415.89,80.99 415.89,62.31 384.65,62.31 384.65,56.03 "/>
<polygon class="st0" points="356.55,134.06 356.52,120.82 343.35,120.86 318.39,145.81 306.6,145.81 306.6,120.86 287.92,120.86
287.92,189.39 306.6,189.39 306.6,164.49 318.45,164.49 343.35,189.39 356.52,189.42 356.55,176.18 335.5,155.12 "/>
<path class="st0" d="M88.62,56.3h34.3V37.35h-34.3c-18.94,0-34.3,15.36-34.3,34.3s15.36,34.3,34.3,34.3h34.3V87h-34.3
c-8.48,0-15.35-6.87-15.35-15.35C73.28,63.17,80.15,56.3,88.62,56.3z"/>
<path class="st0" d="M181.76,155.12v34.3h18.95v-34.3c0-18.94-15.36-34.3-34.3-34.3s-34.3,15.36-34.3,34.3v34.3h18.95v-34.3
c0-8.48,6.87-15.35,15.35-15.35C174.89,139.78,181.76,146.65,181.76,155.12z"/>
<path class="st0" d="M244.21,139.78h34.3v-18.95h-34.3c-18.94,0-34.3,15.36-34.3,34.3s15.36,34.3,34.3,34.3h34.3v-18.95h-34.3
c-8.48,0-15.35-6.87-15.35-15.35C228.86,146.65,235.73,139.78,244.21,139.78z"/>
<polygon class="st0" points="104.15,120.82 104.15,145.55 73.46,145.55 73.46,120.82 54.32,120.82 54.32,189.42 73.46,189.42
73.46,164.69 104.15,164.69 104.15,189.42 122.92,189.42 122.92,120.82 "/>
<path class="st1" d="M453.24,145.34c-0.23-13.68-11.67-24.52-25.35-24.52h-24.53v18.68h24.77c3.37,0,6.27,2.59,6.43,5.96
c0.17,3.6-2.7,6.56-6.25,6.56h-6.26c-10.32,0-18.68,8.36-18.68,18.68v0v18.65h49.88v-18.65H428.3
C442.22,170.71,453.47,159.31,453.24,145.34z"/>
<path class="st1" d="M512.59,145.34c-0.23-13.68-11.67-24.52-25.35-24.52h-24.53v18.68h24.77c3.37,0,6.27,2.59,6.43,5.96
c0.17,3.6-2.7,6.56-6.25,6.56h-6.26c-10.32,0-18.68,8.36-18.68,18.68v0v18.65h49.88v-18.65h-24.94
C501.57,170.71,512.82,159.31,512.59,145.34z"/>
<path class="st0" d="M200.29,66.27c-2.97-18.71-20.55-31.47-39.25-28.49c-18.71,2.97-31.47,20.55-28.49,39.25
c2.97,18.71,20.55,31.47,39.25,28.49C190.5,102.56,203.26,84.98,200.29,66.27z M166.42,87c-8.48,0-15.35-6.87-15.35-15.35
c0-8.48,6.87-15.35,15.35-15.35c8.48,0,15.35,6.87,15.35,15.35C181.76,80.13,174.89,87,166.42,87z"/>
<rect x="375.22" y="120.82" transform="matrix(-1 -1.224647e-16 1.224647e-16 -1 769.1138 266.6382)" class="st1" width="18.68" height="24.99"/>
<path class="st0" d="M253.7,37.39v-0.04h-33.19v0.04h-10.61v68.53h18.68V87h25.11c13.7,0,24.81-11.11,24.81-24.81
C278.51,48.49,267.4,37.39,253.7,37.39z M250.69,71.46h-22.1V53.17h22.1v0.01c5.05,0,9.14,4.09,9.14,9.14
C259.83,67.37,255.74,71.46,250.69,71.46z"/>
<path class="st0" d="M512.61,62.19c0-13.7-11.11-24.81-24.81-24.81v-0.04h-33.19v0.01h-10.61v68.6h18.68V87h17.79l18.92,18.92
l13.17,0.03l0.04-13.24l-10.36-10.36C508.52,77.85,512.61,70.5,512.61,62.19z M484.79,71.46
C484.79,71.46,484.79,71.46,484.79,71.46h-22.1V53.17h22.1v0.01c0,0,0,0,0,0c5.05,0,9.14,4.09,9.14,9.14
C493.92,67.37,489.83,71.46,484.79,71.46z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

BIN
docs/assets/ssid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -91,11 +91,9 @@
* [Soldering safety](tb.md)
* [LED strip (legacy)](leds_old.md)
* [Contribution Guidelines](contributing.md)
* [COEX packages repository](packages.md)
* [Migration to v0.20](migrate20.md)
* [Migration to v0.22](migrate22.md)
* [Events](events.md)
* [CopterHack-2022](copterhack2022.md)
* [CopterHack-2021](copterhack2021.md)
* [CopterHack-2019](copterhack2019.md)
* [CopterHack-2018](copterhack2018.md)

View File

@@ -66,7 +66,7 @@ The set of services and topics is similar to the regular set in [simple_offboard
An example of a program that controls the copter by position using the `navigate` and `set_mode` services:
```cpp
// Connecting libraries for working with rosserial
// Connecting libraries for working with rosseral
#include <ros.h>
// Connecting Clover and MAVROS package message header files

View File

@@ -139,7 +139,7 @@ navigate(x=2, y=2, z=2, speed=1, frame_id='aruco_map')
Starting with the [image](image.md) version 0.18, the drone also can fly relative to a marker in the map, even if it is not currently visible. Like with [single-marker navigation](aruco_marker.md#working-with-detected-markers), this works by setting the frame_id parameter to aruco_ID, where ID is the desired marker number.
The following code will move the drone to the point 1 meter above the center of marker 5:
The folloding code will move the drone to the point 1 meter above the center of marker 5:
```python
navigate(frame_id='aruco_5', x=0, y=0, z=1)

View File

@@ -133,7 +133,7 @@ def image_callback(data):
cv_image = bridge.imgmsg_to_cv2(data, 'bgr8') # OpenCV image
barcodes = pyzbar.decode(cv_image)
for barcode in barcodes:
b_data = barcode.data.decode("utf-8")
b_data = barcode.data.encode("utf-8")
b_type = barcode.type
(x, y, w, h) = barcode.rect
xc = x + w/2
@@ -153,13 +153,3 @@ The script will take up to 100% CPU capacity. To slow down the script artificial
```
The topic for the subscriber in this case should be changed for `main_camera/image_raw_throttled`.
## Video recording
To record a video you can use [`video_recorder`](http://wiki.ros.org/image_view#image_view.2Fdiamondback.video_recorder) node from `image_view` package:
```bash
rosrun image_view video_recorder image:=/main_camera/image_raw
```
The video file will be saved to a file `output.avi`. The `image` argument contains the name of the topic to record.

View File

@@ -2,8 +2,6 @@
The GNSS receiver **COEX GPS** is compatible with the [COEX Pix](coex_pix.md) flight controller. This receiver comes with a COEX Clover Drone Kit.
> **Hint** The source files of the COEX GPS board are [published](https://github.com/CopterExpress/hardware/tree/master/COEX%20GPS) under the CC BY-NC-SA license.
## Port pinouts
### Top view

View File

@@ -4,8 +4,6 @@
Board size: 35x35 mm.
> **Hint** The source files of the COEX PDB board are [published](https://github.com/CopterExpress/hardware/tree/master/COEX%20PDB) under the CC BY-NC-SA license.
## Port pinouts
### Top view

View File

@@ -2,8 +2,6 @@
The **COEX Pix** flight controller is a modified [Pixracer](https://docs.px4.io/v1.9.0/en/flight_controller/pixracer.html) FCU. It is a part of the **Clover 4** quadrotor kit.
> **Hint** The source files of the COEX Pix flight controller are [published](https://github.com/CopterExpress/hardware/tree/master/COEX%20Pix) under the CC BY-NC-SA license.
## Revision 1.1
### Physical specs

View File

@@ -96,7 +96,3 @@ Prepare your article and send it as a pull request to the [Clover repository](ht
## Easy way
If the above instructions are too difficult for you, send your fixes and new articles by e-mail (<a href="mailto:okalachev@gmail.com">okalachev@gmail.com</a>) or in Telegram messenger (user <a href="tg://resolve?domain=okalachev">@okalachev</a>).
## Publishing packages
You also can publish a package, that extends Clover functionality, into the official [COEX Debian repository](packages.md).

View File

@@ -1,6 +1,6 @@
# CopterHack 2021
CopterHack 2021 is a team competition for the development of open source projects for the Clover quadcopter platform. Fifty-four teams from 12 countries took part in the competition.
CopterHack 2021 is a team competition for the development of open source projects for the Clover quadcopter platform.
All information about the event can be found on the official website: https://coex.tech/copterhack.

View File

@@ -1,136 +0,0 @@
# CopterHack 2022
<img src="../assets/copterhack2022.svg" width=300 align=right>
CopterHack 2022 is an international open-source projects competition on aerial robotics. The mainstream of the CopterHack 2022 is team competition with a free choice of the project topic. In addition, this year we organized a second category, company cases. The competitions main language is English.
You can see the articles of the CopterHack 2021 finalist teams by the link [CopterHack 2021](copterhack2021.md).
The proposed projects have to be open-source and be compatible with the Clover quadcopter platform. Teams will work on their projects throughout the competition, bringing them closer to the state of the finished product. Industry experts will assist the participants through lectures and regular feedback.
## Company case competition
Teams are welcome to dive into the development of the following company cases:
1. To make a modification of the PX4 firmware version v1.12.0 for Clover.
2. To develop the PX4v4 flight controller board with the dimensions 55x40 mm and the compatibility of a Raspberry Pi CM 4 installation.
The list of cases will be further expand.
## CopterHack 2022 stages
The qualifying and project development stages are to be held in an online format. The final round is to be made in a hybrid mode (offline + online). The competition involves monthly updates from the teams with regular feedback from the Jury. All teams have to prepare a final video and presentation about the project's results to participate in the final stage.
1. Qualifying stage. Applications are wilcome due October 31, 2021.
2. Projects development stage. This stage includes monthly updates and mentorship of participants, starts at June 10, 2021, and continuous until February 28, 2022.
3. All participating teams should shoot the final video to proceed to the final round. Final videos have to be submitted from March 1 up to March 31, 2022.
4. The final round. Projects presentation at April 910, 2022.
## Conditions and criteria for evaluating the final result
General project requirements:
1. Open-source.
2. Compatibility with the Clover platform.
Criteria for judging the jury at the final:
1. Readiness and the article (max. 10 points): the degree of readiness of the project; an accessible and understandable description of the project in the article; a link to the code with comments, diagrams, drawings. According to the article, it should be possible to reproduce the project and get the result.
2. Amount of work has been done (max. 6 points): the amount of work has been done by the team in the framework of CopterHack 2022, its complexity, and the technical level.
3. Usefulness for Clover (max. 6 points): the relevance of the Clover and PX4 platform application in practice, the potential level of demand from other Clover users.
4. Presentation at the final (max. 3 points): quality and entertainment of the final presentation; completeness of the project coverage; demonstration; answers to the jury's questions.
## Prize fund
The mainstream of the CopterHack 2022 involves the following prizes from COEX based on the results of the jury's evaluation of projects at the final round:
* 1st place: $3000 (USD).
* 2nd place: $2000 (USD).
* 3rd place: $1000 (USD).
* 4th place: $500 (USD).
* 5th place: $500 (USD).
The competition partners can reward the teams according to additional criteria identified due to the evaluation of projects during the final round.
The company case competition provides a prize of $2500 (USD) from COEX for further project development for the best teams in each cases.
## How to apply?
> **Note** To apply, you should have an account on [GitHub](https://github.com).
Prepare your application and send it as a Draft Pull Request to [Clover repository](https://github.com/CopterExpress/clover)
1. Fork the Clover repository:
<img src="../assets/github_application/github-fork.png" alt="GitHub Fork">
2. On the web page of your fork, go to the `docs/en ' section and create a new file in the [Markdown] format(http://ru.wikipedia.org/wiki/Markdown):
<img src="../assets/github_application/create_new_file.png" alt="GitHub Create New File">
3. Enter the title of your article. For example, `new-article.md`
<img src="../assets/github_application/new_article.png" alt="GitHub New Article">
4. Fill out your application by the recommended template:
```markdown
# Project name
[CopterHack-2022](copterhack2022.md), team **Team name**.
## Team information
The list of team members:
(Describe the team: full name, contacts (e-mail/Telegram username), role in the team).
* Alexander Sokolov, @aleksandrsokolov111, teamlead;
* Elena Smirnova, @elenasmirnova111, Full-stack developer.
## Project description
### Project idea
Briefly describe the idea and stage of the project.
### The potential outcomes
Describe how you see the project result.
### Using Clover platform
Describe how the Clover platform will be used in your project.
#### Additional information at the request of participants
For example, information about the team's experience working on projects, attach a link to articles, videos.
```
5. Go to the bottom of the page and create a new branch with the title of your article:
<img src="../assets/github_application/propose_new_file.png" alt="GitHub Propose New File">
6. If necessary, place additional visual assets in the `docs/assets` folder and add them to your article.
7. Send a Draft Pull Request from your branch to Clover:
<img src="../assets/github_application/github-pull-request-create.png" alt="GitHub Create Pull">
8. In the Pull Request comments, you will be given feedback on the application. On the contest page, in the section "Projects of the contest participants", a link to your application in your fork will be published.
9. During the contest, you will work on this document, bringing it closer to the state of the finished article. By the end of the contest, you will publish your article, which will be the result of your work in CopterHack 2022.
As soon as the link to the application is added to this page in the section "Projects of the contest's participants", your team has become an official participant of the CopterHack 2022!
Contest participants will be added to the special Telegram group, where one can send the project's updates and get feedback from the Jury. For the all participating teams, COEX will provide a 50% discount on the Clover drone kit.
> **Info** There are no restrictions on the age, education, and number of people in the team.
## Projects of the contest's participants
Applications will be published as they will become available.
---
For all questions: [CopterHack 2022](https://t.me/CopterHack).

View File

@@ -1,5 +1,5 @@
# Events
Clover is being used in a lot of educational events and competitions, such as WorldSkills, NTI Olympics, Copter Hack, Innopolis Open Robotics, etc.
Clover is being used in a lot of educational events and competitions, such as WorldSkills, NTI Olypics, Copter Hack, Innopolis Open Robotics, etc.
This section contains articles written specifically for a particular event.

View File

@@ -34,7 +34,7 @@
<img src="../assets/fpv/fpv_9.png" width=300 class="zoom border">
</div>
> **Hint** Check what you are wearing shrink tubes before soldering the wires.
> **Hint** Сheck what you are wearing shrink tubes before soldering the wires.
6. Solder the JST male connector to the transmitter.

View File

@@ -4,8 +4,6 @@ The RPi image for Clover contains all the necessary software for working with Cl
## Usage
> **Info** Starting from version v0.22, the image is based on ROS Noetic and using Python 3. If you want to use ROS Melodic and Python 2, use version [v0.21.2](https://github.com/CopterExpress/clover/releases/download/v0.21.2/clover_v0.21.2.img.zip).
1. Download the latest stable release of the image **<a class="latest-image" href="https://github.com/CopterExpress/clover/releases">download</a>**.
2. Download and install [Etcher](https://www.balena.io/etcher/), the software for flashing images (available for Windows/Linux/macOS).
3. Put the MicroSD-card into your computer (use an adapter if necessary).

View File

@@ -98,7 +98,7 @@ Main strip control methods:
+ `numPixels()` returns the number of pixels in the strip. Convenient for whole strip operations.
+ `setPixelColor(pos, color)` sets the pixel color at `pos` to `color`. Color should be a 24-bit value, where the first 8 bits are for the red channel, the next 8 bits are for the green channel, and the last 8 bits are for the blue channel. You may use the `Color(red, green, blue)` convenience function to convert colors to this format. Each color value should be an integer in the \[0..255\] range, where 0 means zero brightness and 255 means full brightness.
+ `SetPixelColorRGB(pos, red, green, blue)` sets the pixel at `pos` to the color value with components `red`, `green` and `blue`. Each component value should be an integer in the \[0..255\] range, where 0 means zero brightness and 255 means full brightness.
+ `SetPixelColorRGB(pos, red, green, blue)` sets the pixel at `pos` to the color value with components `red`, `green` and `blue`. Each component value shoule be an integer in the \[0..255\] range, where 0 means zero brighness and 255 means full brightness.
+ `show()` updates the strip state. Any changes to the strip state are only pushed to the actual strip after calling this method.
## Does it have to be this way?

View File

@@ -1,27 +0,0 @@
# COEX packages repository
COEX provides an open [Debian-repository](https://wiki.debian.org/DebianRepository) with ROS Noetic related prebuilt binary pacakges for `armhf` architecture.
> **Info** Repository URL: http://packages.coex.tech.
The repository is already addedd in [RPi image](image.md) and may be used for simple installation of additional ROS packages.
## Packages publishing
You can make a Pull Request in a [git repository with packages](https://github.com/CopterExpress/packages), adding or updating your package (a file with `.deb` extension), that relates to Clover or ROS. After merging your package will be available for installation with `apt` utility:
```bash
sudo apt install ros-noetic-clover-some-feature
```
Packages, that extend Clover functionality are recommended to be named with `clover_` prefix, e. g. `clover_some_feature`.
## Using on a normal Raspberry Pi OS
On a normal Raspberry Pi OS, the repository may be added to the sources list, this way:
```bash
wget -O - 'http://packages.coex.tech/key.asc' | apt-key add -
echo 'deb http://packages.coex.tech buster main' >> /etc/apt/sources.list
sudo apt update
```

View File

@@ -34,15 +34,7 @@ Read more in the [GPS connection](gps.md) article.
> **Info** For studying Python programming language, see [tutorial](https://www.learnpython.org/en/Welcome).
After you've configured your positioning system, you can start writing programs for autonomous flights. Use the [SSH connection to the Raspberry Pi](ssh.md) to run your scripts.
Before the first flight it's recommended to check the Clover's configuration with [selfcheck.py utility](selfcheck.md):
```bash
rosrun clover selfcheck.py
```
In order to run a Python script use the `python3` command:
After you've configured your positioning system, you can start writing programs for autonomous flights. Use the [SSH connection to the Raspberry Pi](ssh.md) to run your scripts. In order to run a Python script use the `python3` command:
```bash
python3 flight.py

View File

@@ -268,6 +268,12 @@ Flying forward (relative to the drone) at the speed of 1 m/s:
set_velocity(vx=1, vy=0.0, vz=0, frame_id='body')
```
One possible way of flying in a circle:
```python
set_velocity(vx=0.4, vy=0.0, vz=0, yaw=float('nan'), yaw_rate=0.4, frame_id='body')
```
### set_attitude
Set pitch, roll, yaw and throttle level (similar to [the `STABILIZED` mode](modes.md)). This service may be used for lower level control of the drone behavior, or controlling the drone when no reliable data on its position is available.

View File

@@ -359,28 +359,3 @@ calibrate_gyro()
```
> **Note** In process of calibration the drone should not be moved.
<!-- markdownlint-disable MD044 -->
### # {#aruco-detect-enabled}
<!-- markdownlint-enable MD044 -->
Enable and disable [ArUco markers recognition](aruco_marker.md) dynamically (for example, for saving CPU resources):
```python
import rospy
import dynamic_reconfigure.client
# ...
client = dynamic_reconfigure.client.Client('aruco_detect')
# Turn markers recognition off
client.update_configuration({'enabled': False})
rospy.sleep(5)
# Turn markers recognition on
client.update_configuration({'enabled': True})
```

View File

@@ -13,9 +13,9 @@ ssh pi@192.168.11.1
Password: `raspberry`.
For SSH access from Windows, you may use [PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html).
For SSH access from Windows, you may use [PuTTY] (https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html).
You can also gain SSH access from your smart-phone using the [Termius](https://www.termius.com) app.
You can also gain SSH access from your smart-phone using the [Termius] app (https://www.termius.com).
Read more: https://www.raspberrypi.org/documentation/remote-access/ssh/README.md

View File

@@ -7,10 +7,7 @@ Connecting to Clover via Wi-Fi
Connect to this Wi-Fi using the password `cloverwifi`.
<div class="image-group">
<img src="../assets/wifi-ssid.png" width=300 class="zoom">
<img src="../assets/wifi-pass.png" width=300 class="zoom">
</div>
<img src="../assets/ssid.png" width="300px" alt="Wi-Fi SSID">
To edit Wi-Fi settings, or to obtain more detailed information about the network device on Raspberry Pi, read this [article](network.md).

View File

@@ -1,6 +1,6 @@
# Подключение регуляторов 4in1
## Распиновка платы регуляторов 4in1
## Распиновка платы реуляторов 4in1
Одним цветом выделены соответствующие фазные провода (рис. 1a) и управляющий ими сигнал (рис. 1b).
@@ -10,7 +10,7 @@
На рис. 2a указана распиновка гребенки:
* **SIGNAL** подключение регуляторов. Каждый пин имеет свой собственный сигнал. На 5 и 6 сигнал можно получать ШИМ сигнал (Например, можно подключить сервопривод).
* **SIGNAL** подключение регуляторов. Каждый пин имет свой собственный сигнал. На 5 и 6 сигнал можно получать ШИМ сигнал (Например, можно подключить сервопривод).
* **GND** земля полетного контроллера. Единая шина на всех пинах GND (отмечены черным).
* 1, 2, 3, 4 порты для подключения ESC.
* 1, 2 - порты расширения выходного ШИМ сигнала (настраиваются в QGroundControl, также могут использоваться для управления гексакоптером).
@@ -23,7 +23,7 @@
## Иллюстрация подключения, исходя из текущей ориентации платы регуляторов 4in1
Используя рис. 1a, 1b, 2a, 2b необходимо сопоставить каждому мотору свой сигнал управления и подключить в соответствии с порядком нумерации моторов Pixracer.
Используя рис. 1a, 1b, 2a, 2b необходимо сопоставить каждому мотору свой сигнал управления и подключить в соотвествии с порядком нумерации моторов Pixracer.
Например, мотор М3, вращающийся против часовой стрелки (верхний левый угол) управляется сигналом S4 (зеленый провод). Подключается в порт 3.

View File

@@ -86,7 +86,6 @@
* [Установка FPV (Клевер 3)](fpv.md)
* [Магнитный захват](magnetic_grip.md)
* [Механический захват](mechanical_grip.md)
* [Груз для магнитного захвата](magnetic_grip_load.md)
* [Сборка шаровой защиты](sphere_guard.md)
* [Управление в режиме тренера](trainer_mode.md)
* [Техника лужения](tinning.md)
@@ -97,13 +96,11 @@
* [Подключение регулятора 4 в 1](4in1.md)
* [Светодиодная лента (legacy)](leds_old.md)
* [Вклад в Клевер](contributing.md)
* [Репозиторий пакетов COEX](packages.md)
* [Переход на версию 0.20](migrate20.md)
* [Переход на версию 0.22](migrate22.md)
* [COEX DuoCam](duocam.md)
* [COEX Duocam](duocam.md)
* [Виртуальная MAVLink-камера](duocam_mavlink.md)
* [Мероприятия](events.md)
* [CopterHack-2022](copterhack2022.md)
* [CopterHack-2021](copterhack2021.md)
* [CopterHack-2019](copterhack2019.md)
* [Олимпиада НТИ 2019](nti2019.md)

View File

@@ -76,7 +76,7 @@ for(int i=0; i<8; i++) {
Пример программы, контролирующей коптер по позиции, с использованием сервисов `navigate` и `set_mode`:
```cpp
// Подключение библиотек для работы с rosserial
// Подключение библиотек для работы с rosseral
#include <ros.h>
// Подключение заголовочных файлов сообщений пакета clover и MAVROS

View File

@@ -6,7 +6,7 @@
## Создание поля
<div style="display: flex; flex-direction: row"><img src="../assets/fieldsetup.PNG" alt=""><div style="padding-left: 20px">Перед началом работы надо задать размеры поля. Оно нужно только для удобства. Для перемещения по "полотну" используйте тачпад или колёсико мыши для перемещения по карте. При использовании мыши зажмите Shift для перемещения в горизонтальном направлении и Ctrl для увеличения/уменьшения поля.</div></div>
<div style="display: flex; flex-direction: row"><img src="../assets/fieldsetup.PNG" alt=""><div style="padding-left: 20px">Перед началом работы надо задать размеры поля. Оно нужно только для удобства. Для перемения по "полотну" испольнуйте тачпад или колёсико мыши для перемещения по карте. При использовании мыши зажмите Shift для перемещения в горизонтальном направлении и Ctrl для увеличения/уменьшения поля.</div></div>
## Инструмент творения

View File

@@ -204,7 +204,7 @@
![Постпаячная проверка](../assets/zapPDBtest.jpg)
Чтобы припой аккуратно заполнил всю площадку, необходимо её прогреть. Для этого нужно удерживать жало паяльника на контактной площадке в течение 2 сек (или больше, если потребуется)
Чтобы припой аккуратно заполнил всю площадку, необходимо её прогреть. Для этого нужно удерживать жало паяльника на контактной плащадке в течение 2 сек (или больше, если потребуется)
#### Пайка силового разъема питания XT60

View File

@@ -393,7 +393,7 @@
Установите 4 пропеллера, согласно [схеме вращения](#проверка-направления-вращения-моторов). При установке пропеллеров АКБ должна быть отключена.
При установке будьте внимательны, чтобы пропеллер не был перевернут. На лицевой стороне пропеллера имеется маркировка его характеристик, а также направление вращения, которое должно совпадать с направлением вращения моторов.
При установке будте внимательны, чтобы пропеллер не был перевернут. На лицевой стороне пропеллера имеется маркировка его характеристик, а также направление вращения, которое должно совпадать с направлением вращения моторов.
<div class="image-group">
<img src="../assets/assembling_clever4/final_2.png" width=300 class="zoom border">
@@ -413,7 +413,7 @@
<img src="../assets/assembling_clever4/final_1.png" width=300 class="zoom border center">
Обязательно установите и настройте индикатор напряжения перед полетом, чтобы не переразрядить аккумулятор. Для настройки индикатора используйте кнопку расположенную в его основании. Отображаемые цифры во время настройки обозначают минимально возможное напряжение в каждой [ячейке](glossary.md#ячейка--банка-акб) аккумулятора, рекомендуемое значение **3.5**.
Обязательно установите и настройте индикатор напряжения перед полетом, чтобы не переразрядить аккумулятор. Для настройки индикатора используйте конпку расположенную в его основании. Отображаемые цифры во время настройки обозначают минимально возможное напряжение в каждой [ячейке](glossary.md#ячейка--банка-акб) аккумулятора, рекомендуемое значение **3.5**.
> **Info** Звуковая индикация означает, что ваш аккумулятор разряжен и его нужно зарядить.

View File

@@ -47,7 +47,7 @@ git clone https://github.com/Tennessium/HUEX
Перед началом работы с системой необходимо перевести коптеры в режим клиента и подключить к сети WiFi. Вы можете воспользоваться [этим мануалом](network.md#переключение-адаптера-в-режим-клиента)
Однако, для упрощения развертывания системы на нескольких коптерах, рекомендуется использование нашего скрипта, лежащего в папке *copter/setup/*
Однако, для упрощения развертывания системы на нескольких коптреах, рекомендуется использование нашего скрипта, лежащего в папке *copter/setup/*
- Перейдите в папку
@@ -91,7 +91,7 @@ pip install -r requirements.txt
В файле *copter/consts.py* укажите IP-адрес сервера.
Для запуска основного скрипта воспользуйтесь нашим systemd-сервисом.
Для запуска основного скрипта воспользуйтсь нашим systemd-сервисом.
```bash
sudo systemctl enable /home/pi/HUEX/clever/setup/taxi.service
@@ -108,7 +108,7 @@ sudo systemctl stop taxi.service
## Веб-интерфейс центра управления полётами
<img src="../assets/cup.png" alt=""/>
В данном веб интерфейсе можно следить за полётами всех дронов на карте (масштабировать с помощью колёсика, передвигать с помощью Alt). При нажатии на лебедя в правом верхнем углу все коптеры аварийно садятся, А при нажатии на значок "обновить" все коптеры автоматически удаляются, что приводит к удалению всех команд и посадке активных на текущий момент коптеров.
В данном веб интерфейсе можно следить за полётами всех дронов на карте (масштабировать с помощью колёсика, передвигаять с помощью Alt). При нажатии на лебедя в правом верхнем углу все коптеры аварийно садятся, А при нажатии на значок "обновить" все коптеры автоматически удаляются, что приводит к удалению всех комманд и посадке активных на текущий момент коптеров.
С помощью инструментов в правом нижнем углу можно строить новые основания и рёбра.
## Веб-интерфейс заказа

View File

@@ -69,7 +69,7 @@
* *body* координаты относительно коптера: вперед (*forward*), влево (*left*), вверх (*up*).
* *markers map* система координат, связанная с [картой ArUco-маркеров](aruco_map.md).
* *marker* система координат, связанная с [ArUco-маркером](aruco_marker.md); появляется поле для ввода ID маркеа.
* *marker* система координта, связанная с [ArUco-маркером](aruco_marker.md); появляется поле для ввода ID маркеа.
* *last navigate target* координаты относительно последней заданной точки для навигации.
* *map* локальная система координат коптера, связана с местом его инициализации.

View File

@@ -135,7 +135,7 @@ def image_callback(data):
cv_image = bridge.imgmsg_to_cv2(data, 'bgr8') # OpenCV image
barcodes = pyzbar.decode(cv_image)
for barcode in barcodes:
b_data = barcode.data.decode("utf-8")
b_data = barcode.data.encode("utf-8")
b_type = barcode.type
(x, y, w, h) = barcode.rect
xc = x + w/2
@@ -155,13 +155,3 @@ rospy.spin()
```
Топик для подписчика в этом случае необходимо поменять на `main_camera/image_raw_throttled`.
## Запись видео
Для записи видео может использована нода [`video_recorder`](http://wiki.ros.org/image_view#image_view.2Fdiamondback.video_recorder) из пакета `image_view`:
```bash
rosrun image_view video_recorder image:=/main_camera/image_raw
```
Видео будет сохранено в файл `output.avi`. В аргументе `image` указывается название топика для записи видео.

View File

@@ -66,7 +66,7 @@ sudo python setup.py install
![asd](../assets/cam_calib3.png)
Если перекрестия были распознаны правильно, нажмите на клавишу ***Add***, и перейдите к получению новых фотографий. В противном же случае, если перекрестия были распознаны некорректно, пропустите данную фотографию при помощи клавиши ***Skip***.
Если перекрестия были распознаныы правильно, нажмите на клавишу ***Add***, и перейдите к получению новых фотографий. В противном же случае, если перекрестия были распознаны некорректно, пропустите данную фотографию при помощи клавиши ***Skip***.
>В большинстве случаев найденные углы будут подсвечиваться разными цветами, но иногда подсветка будет становиться красной. это происходит в том случае, если углы распознаны, но неточно.
@@ -183,7 +183,7 @@ Path: # Путь до папки с изображениями
![asd](../assets/img2.jpg)
Исправленные изображения:
Иcправленные изображения:
![asd](../assets/calibresult.jpg)

View File

@@ -1,6 +1,6 @@
# clever-show
Программное обеспечение для запуска шоу дронов под управлением Raspberry Pi с пакетом COEX [Clover](https://github.com/CopterExpress/clever) и полётного контроллера с прошивкой PX4.
Програмное обеспечение для запуска шоу дронов под управлением Raspberry Pi с пакетом COEX [Clover](https://github.com/CopterExpress/clever) и полётного контроллера с прошивкой PX4.
Создайте анимацию в Blender, сконвертируйте её в полётные пути дронов, настройте дроны и запустите своё собственное шоу дронов!

View File

@@ -2,8 +2,6 @@
ГНСС-приемник **COEX GPS** совместим с полетным контроллером [COEX Pix](coex_pix.md). Этот приемник поставляется с наборами COEX Клевер 4 Pro.
> **Hint** Исходные файлы платы COEX GPS [выложены](https://github.com/CopterExpress/hardware/tree/master/COEX%20GPS) в открытый доступ под лицензией CC BY-NC-SA.
## Схемы расположения контактов
### Вид сверху

View File

@@ -4,8 +4,6 @@
Габаритные размеры платы: 35x35 мм.
> **Hint** Исходные файлы платы COEX PDB [выложены](https://github.com/CopterExpress/hardware/tree/master/COEX%20PDB) в открытый доступ под лицензией CC BY-NC-SA.
## Схемы расположения контактов
### Вид сверху

View File

@@ -2,8 +2,6 @@
Полетный контроллер **COEX Pix** является модифицированным аналогом полетного контроллера [Pixracer](https://docs.px4.io/v1.9.0/en/flight_controller/pixracer.html). Этот полетный контроллер поставляется с наборами **Клевер 4** и далее.
> **Hint** Исходные файлы полетного контроллера COEX Pix [выложены](https://github.com/CopterExpress/hardware/tree/master/COEX%20Pix) в открытый доступ под лицензией CC BY-NC-SA.
## Ревизия 1.1
### Характеристики
@@ -31,7 +29,7 @@
* *I2C* (JST-GH 4 pin) разъем для подключения поддерживаемых I2C устройств.
* *PWR* (JST-GH 6 pin) разъем для подключения питания с платы COEX PDB или аналогичной, датчиков напряжения и тока.
* *RC IN* (JST-GH 4 pin) разъем для подключения радиоприемника аппаратуры радиоуправления, канала для * снятия показаний RSSI. Поддерживаемые RC протоколы PPM и SBUS.
* Разъем Micro USB для подключения к ПК для настройки и коммуникации по протоколу USB 2.0/1.1
* Разьем Micro USB для подключения к ПК для настройки и коммуникации по протоколу USB 2.0/1.1
* Слот для карты памяти MicroSD, до 32 ГБ.
* Серворазъемы для подключения контроллеров моторов и других устройств.

View File

@@ -96,7 +96,3 @@
## Простой способ
Если вышеприведенные инструкции для вас оказываются слишком сложными, отправляйте правки или новые статьи по e-mail (<a href="mailto:okalachev@gmail.com">okalachev@gmail.com</a>) или в Telegram (пользователь <a href="tg://resolve?domain=okalachev">@okalachev</a>).
## Публикация пакетов
Вы также можете опубликовать собственный пакет, расширяющий функциональность Клевера, в [Debian-репозитории COEX](packages.md).

View File

@@ -1,6 +1,6 @@
# CopterHack 2021
CopterHack 2021 это командный конкурс по разработке проектов с открытым исходным кодом для платформы квадрокоптера "Клевер". В конкурсе приняло участие 54 команды из 12 стран.
CopterHack 2021 это командный конкурс по разработке проектов с открытым исходным кодом для платформы квадрокоптера "Клевер".
Все информацию о мероприятии смотрите на официальном сайте: https://ru.coex.tech/copterhack.

View File

@@ -1,136 +0,0 @@
# CopterHack 2022
<img src="../assets/copterhack2022.svg" width=300 align=right>
CopterHack 2022 — это международный конкурс по разработке проектов по летающей робототехнике с открытым исходным кодом. CopterHack 2022 имеет основное направление со свободным выбором темы проекта, а также отдельную номинацию "кейсы компании". Основным языком конкурса является английский.
Ознакомиться со статьями команд-финалистов предыдущего года можно в статье о [CopterHack 2021](copterhack2021.md).
На конкурс принимаются проекты с открытым исходным кодом и совместимые с платформой квадрокоптера "Клевер". На протяжении конкурса команды работают на собственными идеями и разработками, приближая их к состоянию готового продукта. В этом участникам помогают эксперты отрасли через лекции и регулярную обратную связь.
## Направление "кейс компании"
Команды приглашаются принять участие в работе над следующими кейсами компании:
1. Модификация прошивки PX4 версии v1.12.0 под Клевер.
2. Разработка платы полетного контроллера PX4 v.4 на основе COEX Pix размером 55*40 мм и возможностью установки Raspberry Pi CM4.
Список кейсов может быть расширен.
## Этапы CopterHack 2022
Отборочный и проектный этапы конкурса проходят в онлайн-формате, формат проведения финала гибридный (оффлайн + онлайн). Конкурс подразумевает ежемесячные апдейты от команд с получением регулярной обратной связи от жюри. Для участия в заключительном этапе необходимо подготовить финальное видео и презентацию о результатах проекта.
1. Отборочный этап. Подача заявок (10 июня — 31 октября 2021).
2. Проектный этап. Менторство проектов (10 июня 2021 — 28 февраля 2022).
3. Подготовка финального видео (1 — 31 марта 2022).
4. Заключительный этап. Финальная защита проектов на английском языке (9 — 10 апреля 2022).
## Условия и критерии оценки
Условия, предъявляемые к проектам:
1. Открытый исходный код/модели/схемы/чертежи.
2. Совместимость с платформой "Клевер".
Критерии оценивания жюри в финале:
1. Готовность и статья (макс. 10 баллов): степень готовности проекта; доступное и понятное описание проекта в статье; прикреплены код с комментариями, схемы, чертежи. По статье должно быть возможно повторить проект, получить результат.
2. Объем проделанной работы (макс. 6 баллов): объем проделанной командой работы в рамках CopterHack 2022, ее сложность и технический уровень.
3. Полезность для Клевера (макс. 6 баллов): актуальность применения на практике в платформе Клевер и PX4, потенциальный уровень спроса на разработку со стороны других пользователей Клевера.
4. Презентация на финале (макс. 3 балла): качество и зрелищность финальной презентации; полнота освещения проекта; демонстрация; ответы на вопросы жюри.
## Призовой фонд
Основное направление конкурса предполагает следующие призы от компании COEX по результатам оценивания жюри на финале:
* I место: $3000.
* II место: $2000.
* III место: $1000.
* IV место: $500.
* V место: $500.
Партнеры конкурса могут поощрить команды по дополнительным критериям, выявленным в результате оценки проектов в ходе финала.
Номинация "кейс компании" предоставляет приз от компании COEX для дальнейшего развития проекта в размере $2500 для команды с лучшим результатом по каждому из кейсов.
## Как подать заявку?
> **Note** Для подачи заявки необходимо иметь аккаунт на [GitHub](https://github.com).
Подготовьте вашу заявку и пришлите ее в виде Draft Pull Request в [репозиторий Клевера](https://github.com/CopterExpress/clover).
1. Сделайте форк репозитория Клевера:
<img src="../assets/github_application/github-fork.png" alt="GitHub Fork">
2. На web странице вашего форка зайдите в раздел `docs/ru` и создайте новый файл в формате [Markdown](https://ru.wikipedia.org/wiki/Markdown):
<img src="../assets/github_application/create_new_file.png" alt="GitHub Create New File">
3. Введите название вашей статьи. Например, `new-article.md`
<img src="../assets/github_application/new_article.png" alt="GitHub New Article">
4. Оформите вашу заявку в соответствии с рекомендуемым шаблоном:
```markdown
# Название проекта
[CopterHack-2022](copterhack2022.md), команда **Название команды**.
## Информация о команде
Состав команды:
(Опишите состав команды: имя и фамилия, контакты (e-mail/имя пользователя в Telegram), роль в команде).
* Александр Соколов, @aleksandrsokolov111, тимлид;
* Елена Смирнова, @elenasmirnova111, Full-stack разработчик.
## Описание проекта
### Идея проекта
Опишите кратко идею и стадию проекта.
### Планируемые результаты
Опишите как вы видите результат проекта.
### Использование платформы "Клевер"
Опишите как в вашем проекте будет использоваться платформа "Клевер".
#### Дополнительная информация по желанию участников
Например, информация об опыте работы команды над проектами, прикрепить ссылку на статьи, видео.
```
5. Перейдите вниз страницы и создайте новую ветку с названием вашей статьи:
<img src="../assets/github_application/propose_new_file.png" alt="GitHub Propose New File">
6. При необходимости поместите дополнительные визуальные материалы в папку `docs/assets` и оформите на них ссылки в вашей статье.
7. Сделайте Draft Pull Request вашей ветки в master Клевера:
<img src="../assets/github_application/github-pull-request-create.png" alt="GitHub Create Pull">
8. В комментариях Pull Request вам будет дана обратная связь по заявке. На страничке конкурса в разделе "Проекты участников конкурса" будет опубликована ссылка на вашу заявку в вашем форке.
9. На протяжении конкурса вы будете работать над этим документом, приближая его к состоянию статьи. В документе будет видна история разработки и ежемесячные апдейты. К финалу конкурса вы сможете опубликовать вашу статью, это и будет результат вашей работы в CopterHack.
Как только ссылка на заявку будет добавлена на эту страничку в раздел "Проекты участников конкурса", ваша команда стала официальным участником CopterHack 2022!
Участники конкурса будут добавлены в Telegram-группу, куда можно отправлять первый апдейт и получить обратную связь от Жюри. Для команд-участников предусмотрена скидка 50% на конструктор программируемого квадрокоптера "Клевер".
> **Info** Ограничения по возрасту, образованию и количеству человек в команде отсутствуют.
## Проекты участников конкурса
Заявки будут публиковаться по мере поступления.
---
По всем вопросам: [CopterHack 2022](https://t.me/CopterHack).

View File

@@ -10,12 +10,8 @@
> **Warning** Протокол взаимодействия находится в процессе модификации. В новых версиях планируется избавиться от прямой отправки значений параметров и их количества от `duocam-mavlink` к QGroundControl.
<!-- markdownlint-disable MD044 -->
`duocam-camera` и `duocam-mavlink` обмениваются данными с помощью очередей POSIX. Имена очередей и формат сообщений доступен в репозитории [duocam-common](https://github.com/CopterExpress/duocam-common).
<!-- markdownlint-enable MD044 -->
Для объединения блоков, взаимодействующих через MAVLink, можно использовать любой MAVLink-коммутатор/маршрутизатор, который либо позволяет отключить таблицу коммутации, либо заполняет её по схеме *MAVLink ID:Component ID* (например, `cmavnode`, `mavlink-fast-switch`, `mavlink-switch`).
> **Warning** При использовании `mavlink-fast-switch` требуется использовать `mavlink-serial-bridge`, либо любой другой мост для передачи MAVLink из последовательного порта в UDP, так как `mavlink-fast-switch` работает только с UDP.

View File

@@ -82,7 +82,7 @@
Прежде чем начинать полет, необходимо перевести коптер в состояние *Armed*.
* Состояние *Armed* моторы вращаются в соответствии с положением стика газа, коптер готов к полету.
* Состояние *Armed* моторы вращаются в соответсвии с положением стика газа, коптер готов к полету.
* Состояние *Disarmed* моторы не вращаются, коптер не реагирует на стик газа.
По умолчанию коптер находится в состоянии *Disarmed* и переходит в него в случае если вы долго не взлетаете.

View File

@@ -89,7 +89,7 @@
## Воздушная подушка и управление в ней
Понятие *воздушной подушки* очень важно во всей летательной технике. Сама по себе воздушная подушка является зоной повышенного давления, возникающая за счет воздуха пропускаемого через пропеллеры. Данная область характеризуется турбулентностями и воздушными потоками влияющими на полет коптера.
Понятие *воздушной подушки* очень важно во всей летательной технике. Сама по себе воздушная подушка является зоной повышенного давления, возникающая за счет воздуха пропускаемого через пропеллеры. Данная область харрактеризуется турбелентностями и воздушными потоками влияющими на полет коптера.
Пилоты стараются избегать полетов в воздушной подушке, но на ее границе имеется стабильная область, в которой коптер может зависнуть при минимальном значении газа. В таком случае создается ощущение, что коптер "сел" на воздушную подушку.
@@ -103,9 +103,9 @@
Аналогично с предыдущими упражнениями перед взлетом выполните [следующие действия](#предполетные-проверки).
**Упражнение №1**. Поднимайте стик газа, пока коптер не пролетит воздушную подушку и не окажется над ней (высота от пола ~25-30 см, для коптера Клевер 4). Коптер не должен подниматься вверх или проваливаться вниз, высота полета должна стабилизироваться. Как и в предыдущем упражнении корректируйте позицию коптера по осям X, Y с помощью стика крена и тангажа. В результате коптер должен зависнуть в одной точке с небольшими покачиваниями по сторонам. Удерживайте коптер 30-40 секунд.
**Упражнение №1**. Поднимайте стик газа, пока коптер не пролетит воздушную подушку и не окажется над ней (высота от пола ~25-30 см, для коптера Клевер 4). Коптер не должен подниматься вверх или проваливаться вниз, высота полета должа стабилизироваться. Как и в предыдущем упражнении корректируйте позицию коптера по осям X, Y с помощью стика крена и тангажа. В результате коптер должен зависнуть в одной точке с небольшими покачиваниями по сторонам. Удерживайте коптер 30-40 секунд.
**Упражнение №2**. Поднимите коптер на воздушную подушку и стабилизируйте его в одной точке. Далее пролетите по квадрату со стороной 1 м сначала по часовой стрелке, потом против часовой стрелки. Повторите траекторию в каждую сторону 2-3 раза.
**Упражнение №2**. Поднимите коптер на воздушную подушку и стабилизируйте его в одной точке. Далее пролетите по квадрату со стороной 1 м сначала по часовой стрелке, потом против часовой стрели. Повторите траекторию в каждую сторону 2-3 раза.
**Упражнение №3**. Поднимите коптер на воздушную подушку и стабилизируйте его в одной точке. Попробуйте описать коптером круг с диаметром 1 м, по часовой и против часовой стрелки. Повторите траекторию в каждую сторону 2-3 раза.
@@ -126,7 +126,7 @@
**Упражнение №1**. Поднимите коптер на воздушную подушку и стабилизируйте его в одной точке. Описывайте коптером круг вокруг себя, на расстоянии 2-3 м, при этом поворачивая его таким образом, чтобы задняя часть коптера всегда была направлен на вас. Выполняйте упражнение по часовой стрелке и против. Повторите упражнение 4-5 раз.
**Упражнение №2**. Поднимите коптер на воздушную подушку и стабилизируйте его в одной точке. Обойдите коптер вокруг, при этом поворачивая его таким образом, чтобы задняя часть была направлена на вас. Обходите коптер по часовой стрелке и против. Повторите упражнение 4-5 раз.
**Упражнение №2**. Поднимите коптер на воздушную подушку и стабилизируйте его в одной точке. Обойдите коптер вокруг, при этом поворачивая его таким образом, чтобы задяя часть была направлена на вас. Обходите коптер по часовой стрелке и против. Повторите упражнение 4-5 раз.
> **Caution** Дополнительные упражнения значительно сложнее обычных и не обязательны к выполнению. Приступайте к ним, только если вы уже уверенно управляете коптером.
@@ -136,7 +136,7 @@
## Свободный полет
Если вы можете выполнить каждое из описанных выше упражнений, скорее всего, вы уже умеете свободно взлетать и управлять коптером. Далее будут представлены некоторые упражнения для закрепления полученных навыков.
Если вы можете выполнить каждое из описанных выше упражнений, скорее всего, вы уже умеете свободно взлетать и управлять коптером. Далее будут представленны некоторые упражнения для закрепления полученных навыков.
Упражнения:

View File

@@ -39,7 +39,7 @@ ESC имеет прошивку, которая определяет особе
## Ячейка / "банка" АКБ
Составная часть АКБ, непосредственный источник тока. Обычно АКБ для БПЛА состоят из нескольких (26) ячеек, соединенных последовательно. Максимальное напряжение одной Li-po ячейки 4.2 В; общее напряжение АКБ равно суммарному напряжению ячеек. Количество ячеек обозначается буквой *S*, например: *2S*, *3S*, *4S*.
Составная часть АКБ, непосредственный источник тока. Обычно АКБ для БПЛА состоят из нескольких (26) ячеек, соединенных последовательно. Максимальное напряжение одной Li-po ячейки 4.2 В; общее напряжение АКБ равно суммарному напряжению ячеек. Количество ячеек обозночается буквой *S*, например: *2S*, *3S*, *4S*.
В Клевере обычно применяются аккумуляторы *3S*.
@@ -55,7 +55,7 @@ ESC имеет прошивку, которая определяет особе
**2\.** Совокупность данных о состоянии аппарата, так таковая (высота, ориентация, глобальные координаты и т. д.).
**3\.** Система для передачи данных о состоянии аппарата или команд для него по воздуху. Примеры: радиомодемы (RFD900, 3DR Radio Modem), Wi-Fi модули (ESP-07). Raspberry Pi на Клевере также может быть использован в качестве модуля для телеметрии: [использование QGroundControl через Wi-Fi](gcs_bridge.md).
**3\.** Система для передачи данных о состоянии аппарата или команд для него по воздуху. Примеры: радиомодемы (RFD900, 3DR Radio Modem), Wi-Fi модули (ESP-07). Raspberry Pi на Клевере также может быть использован в качестве модуля для телемерии: [использование QGroundControl через Wi-Fi](gcs_bridge.md).
## Арминг
@@ -73,7 +73,7 @@ Armed состояние коптера готовности к полету
## Образ SD-карты
Полная копия содержимого SD-карты, представленная в виде файла. Такой файл можно загрузить на SD-карту, воспользовавшись специальной утилитой, например Etcher. SD-карта, вставленная в Raspberry Pi является единственным его долговременным хранилищем и полностью определяет, что он будет делать.
Полная копия содержимого SD-карты, представленная в виде файла. Такой файл можно зазгрузить на SD-карту, воспользовавшись специальной утилитой, например Etcher. SD-карта, вставленная в Raspberry Pi является единственным его долговременным хранилищем и полностью определяет, что он будет делать.
Конструктор Клевер включает в себя [рекомендованный образ для SD-карты](image.md).

Some files were not shown because too many files have changed in this diff Show More