Compare commits

...

535 Commits
v0.9 ... v0.14

Author SHA1 Message Date
Oleg Kalachev
aa8ed7662f docs: add article about using sonar 2018-12-13 01:16:10 +03:00
Oleg Kalachev
06df8848bd image: add rpi_ws281x library for LED 2018-12-13 00:19:45 +03:00
Andrei Korigodski
02b365eb96 docs: fix typo in copterhack2017.md 2018-12-12 21:21:54 +03:00
Oleg Kalachev
db71d0e234 docs: tune arduino article 2018-12-12 06:07:30 +03:00
Oleg Kalachev
21121b294d docs: tune titles 2018-12-12 05:04:25 +03:00
Oleg Kalachev
4bca49113a Use normal link to documentation 2018-12-12 04:40:44 +03:00
Oleg Kalachev
54e6701c51 License file is not markdown 2018-12-12 04:29:14 +03:00
Oleg Kalachev
8f73c6af0b image: add pigpiod library 2018-12-12 04:14:37 +03:00
Oleg Kalachev
962ac189ea ios rc: merge repeated notifications 2018-12-12 02:14:13 +03:00
Oleg Kalachev
1e1d11b216 docs: add video from Copter Hack 2018 2018-12-12 00:30:58 +03:00
Oleg Kalachev
c3dd18d661 docs: tuning 2018-12-10 08:07:45 +03:00
Oleg Kalachev
e5c66ec77d docs: reduce images size 2018-12-10 07:57:32 +03:00
Oleg Kalachev
52ab8de1cc docs: editing and linting 2018-12-10 07:30:53 +03:00
Oleg Kalachev
31351100aa docs: making linter happy + remove unused 2018-12-10 07:11:00 +03:00
Oleg Kalachev
6f59e4c9d6 docs: yaw example 2018-12-09 22:58:21 +03:00
Oleg Kalachev
79a78ceb7b docs: small fix 2018-12-09 00:36:59 +03:00
Oleg Kalachev
ef3776e235 docs: add estimation info to glossary 2018-12-09 00:32:27 +03:00
Oleg Kalachev
422ce4b3f7 docs: aruco docs improvements 2018-12-08 23:45:56 +03:00
Oleg Kalachev
00a3ec01f2 docs: ‘vision yaw’ was removed from LPE_FUSION 2018-12-08 23:26:58 +03:00
Oleg Kalachev
da37f29d9d docs: improvements 2018-12-07 18:33:02 +03:00
Oleg Kalachev
a69146a36e docs: little addition 2018-12-07 18:33:02 +03:00
Oleg Kalachev
e7b12be958 docs: foo => flight 2018-12-07 06:20:23 +03:00
Arthur Golubtsov
c8994aebb4 Add camera visualization for Clever 3 2018-12-05 00:55:09 +03:00
Oleg Kalachev
47fc673d73 docs: add info on how to change wi-fi ssid and password 2018-12-05 00:14:30 +03:00
Oleg Kalachev
8a4cdb3287 docs: fix 2018-12-04 17:04:56 +03:00
Oleg Kalachev
253d3563d5 docs: fix links 2018-12-04 16:53:40 +03:00
Oleg Kalachev
96e6c5bc71 selfcheck.py: don’t capitalize failure messages 2018-12-03 06:31:10 +03:00
Oleg Kalachev
8c5a0716e7 selfcheck.py: check VPE and local position inconsistency 2018-12-03 06:26:01 +03:00
Oleg Kalachev
ff7ffa0c22 docs: editing 2018-12-01 21:29:26 +03:00
Oleg Kalachev
ced31329ef docs: small fix 2018-12-01 20:34:39 +03:00
Oleg Kalachev
3b2433127d gitbook: move Russian version to subdirectory, set up redirects, fix rich quotes, fixes 2018-12-01 06:59:02 +03:00
Oleg Kalachev
29c2ebc086 book.json cleanup 2018-11-30 21:10:36 +03:00
Oleg Kalachev
fb14d158ad gitbook: add anchors plugin 2018-11-30 20:55:29 +03:00
Oleg Kalachev
0e4b2a6e50 gitbook: fix link and add validate-links plugin 2018-11-30 20:38:56 +03:00
Oleg Kalachev
3c6482e204 .gitignore: add gitbook artifacts 2018-11-28 23:05:23 +03:00
Oleg Kalachev
72945cb094 docs: add Markdown tooling info 2018-11-28 23:03:52 +03:00
Oleg Kalachev
b8271dd49c docs: add English version 2018-11-28 02:18:50 +03:00
Oleg Kalachev
4cf8e19923 docs: unused file 2018-11-23 22:15:11 +03:00
Oleg Kalachev
436ec5e638 docs: unused files 2018-11-23 22:14:39 +03:00
Oleg Kalachev
d311c0584d docs: unused document 2018-11-23 22:12:38 +03:00
Oleg Kalachev
f98c31aba2 docs: style 2018-11-23 22:01:05 +03:00
Oleg Kalachev
3ca36f6edf docs: add link 2018-11-23 21:55:11 +03:00
Oleg Kalachev
7cdb627b1b docs: improve web_video_server article 2018-11-23 21:52:23 +03:00
Oleg Kalachev
8d8421ae35 docs: more info on image download page 2018-11-23 21:45:11 +03:00
Oleg Kalachev
08c38106ab docs: style 2018-11-23 21:39:37 +03:00
Oleg Kalachev
2a19a91714 docs: qgc_bridge: style 2018-11-23 21:35:54 +03:00
Oleg Kalachev
d9b29c89d9 docs: typo 2018-11-23 21:34:13 +03:00
Oleg Kalachev
c04eb6fd31 docs: wifi.md: add illustration 2018-11-23 21:33:10 +03:00
Oleg Kalachev
d1f58c2835 docs: style 2018-11-23 21:27:32 +03:00
Oleg Kalachev
29c360a501 markdownlint: allow question marks in headings 2018-11-23 21:23:41 +03:00
Oleg Kalachev
700e2b5e0f docs: safety.md style 2018-11-23 21:21:39 +03:00
Oleg Kalachev
ce1790d5e8 docs: fix network.md style 2018-11-23 21:18:18 +03:00
Oleg Kalachev
1f9ae88946 docs: fix style for assembling of clever 3 2018-11-23 00:05:37 +03:00
Oleg Kalachev
5abbdbab6c docs: improvements 2018-11-22 23:39:56 +03:00
Oleg Kalachev
80208e4c5e docs: style 2018-11-22 23:34:50 +03:00
Oleg Kalachev
c65f9eaace docs: unused file 2018-11-22 23:33:32 +03:00
Oleg Kalachev
9ebd744d2c docs: small addition 2018-11-22 22:45:39 +03:00
Oleg Kalachev
74fe0cce59 docs: small fix 2018-11-22 22:43:20 +03:00
Oleg Kalachev
8aec577706 gitbook: remove versions plugin 2018-11-22 22:40:50 +03:00
Oleg Kalachev
4c7cd17051 docs: make structure for summary 2018-11-22 22:39:24 +03:00
Oleg Kalachev
af2ce1bdc9 docs: edit raspberry pi article a little 2018-11-22 22:29:06 +03:00
Andrei Korigodski
de85a30065 docs: comment out TODOs in contributing.md 2018-11-22 19:59:51 +03:00
Andrei Korigodski
ae5ead3c75 docs: fix typo in contributing.md 2018-11-22 19:59:16 +03:00
Andrei Korigodski
e20d2f4076 docs: rename contribution.md to contributing.md 2018-11-22 19:48:27 +03:00
Oleg Kalachev
30a6ee9528 docs: fixes 2018-11-21 22:10:28 +03:00
Oleg Kalachev
6332e96b4e docs: fixes 2018-11-21 22:09:57 +03:00
Oleg Kalachev
4cf63fbd33 docs: fix 2018-11-21 22:08:47 +03:00
Oleg Kalachev
d32ec1004f docs: fixes 2018-11-21 22:08:27 +03:00
Oleg Kalachev
74940a3e31 docs: fixes 2018-11-21 22:05:58 +03:00
Oleg Kalachev
3de413cf71 docs: contribution 2018-11-21 22:01:17 +03:00
Oleg Kalachev
37443c9fdc docs: remove unused 2018-11-21 22:01:17 +03:00
Arthur Golubtsov
65666d619d Change docker image to add ability of copying directories 2018-11-19 18:50:20 +03:00
Arthur Golubtsov
3d85acaf68 Generate documentation pages via Gitbook toolchain and serve them with monkey-server 2018-11-19 18:48:48 +03:00
goldarte
b4287801a2 Updates docs/leds.md
Auto commit by GitBook Editor
2018-11-19 12:48:34 +00:00
Arthur Golubtsov
a51553fa1f Delete 2nd keyserver for ros, which was added for tests 2018-11-18 19:19:07 +03:00
Oleg Kalachev
e76f1a003d Merge pull request #81 from vilesovds/patch-3
docs: link in URL encoding format
2018-11-17 04:55:16 +03:00
Arthur Golubtsov
b31d88507e Fix versions of dirmngr (to 2.1.18-8~deb9u3) and python-rosdep (to 0.13.0-1) 2018-11-16 21:47:38 +03:00
Oleg Kalachev
d8ae4a3ad4 selfcheck.py: check pitch and roll angles (level horizon) 2018-11-15 22:59:05 +03:00
Oleg Kalachev
cb0f79cd2f docs: edit style 2018-11-14 19:23:37 +03:00
Oleg Kalachev
1b64cfbad6 docs: setup.md: edit style 2018-11-14 19:22:11 +03:00
Oleg Kalachev
0d7d299b7d docs: typos 2018-11-13 19:03:39 +03:00
Oleg Kalachev
9051b5d836 docs: add Butterfly terminal access info 2018-11-13 18:41:49 +03:00
Oleg Kalachev
3d95d83d9a docs: add selfchecking info 2018-11-13 18:41:49 +03:00
Arthur Golubtsov
f7e8497879 Delete pictures from root 2018-11-13 14:41:22 +03:00
DMITRY VILESOV
d61dea4b92 docs: link in URL encoding format
Самый простой способ запихнуть скобки в ссылку для gitbook - использовать %28 ... %29 вместо них. Русские символы были также закодированы на всякий случай...
2018-11-10 15:23:40 +03:00
Arthur Golubtsov
9cf4a7a9fa Edit summary structure, add missing links (zap.md and cl3_connectESC4in1.md) 2018-11-09 20:09:24 +03:00
Arthur Golubtsov
488be6185e Merge pull request #67 from Svetk0/CL3_assemble_new
Cl3 assemble new
2018-11-09 19:30:31 +03:00
Arthur Golubtsov
0649c0c58f Merge branch 'master' into CL3_assemble_new 2018-11-09 19:28:20 +03:00
Oleg Kalachev
24f30ca5e5 Merge pull request #80 from vilesovds/patch-2
docs: added escape chars to brackets in the link
2018-11-09 16:15:02 +03:00
Oleg Kalachev
eeb639d2b7 docs: edited fpv article a little 2018-11-09 01:50:32 +03:00
ArtemOsokin
abb8294bb0 Update SUMMARY.md 2018-11-09 01:43:25 +03:00
ArtemOsokin
237e562a4f docs: add fpv instruction (#1)
* Create fpv.md

* Update fpv.md

* Update fpv.md

* Add files via upload

* Add files via upload

* Add files via upload

* Update fpv.md

* Add files via upload

* Update fpv.md

* Update fpv.md

* Add files via upload

* Add files via upload

* Delete fpv_1.png

* Add files via upload

* Delete fpv_1.png

* Add files via upload
2018-11-09 01:42:47 +03:00
DMITRY VILESOV
e89185c654 docs: added escape chars to brackets in the link
А вот зачем дублировать эту ссылку под №12, но на английском - непонятно
2018-11-09 00:50:47 +03:00
Oleg Kalachev
a34272256a docs: remove image captions 2018-11-08 05:18:34 +03:00
Oleg Kalachev
e853df7781 docs: small fix 2018-11-08 05:11:53 +03:00
Oleg Kalachev
3517cfb869 Tune image captions 2018-11-08 05:08:57 +03:00
Oleg Kalachev
4886c3ef4c docs: small changes 2018-11-08 05:06:53 +03:00
Oleg Kalachev
51f8ea0ca4 gitbook: add image-caption plugin 2018-11-08 05:06:02 +03:00
Oleg Kalachev
7daa941ffe docs: add more info about Copter Hack 2018 2018-11-08 05:04:08 +03:00
Oleg Kalachev
5ed097ee0b snippets: add anchor link to each snippet 2018-11-08 04:33:23 +03:00
Oleg Kalachev
4e069c1e75 docs: tabs->spaces in python code 2018-11-08 04:27:08 +03:00
Oleg Kalachev
17ba10e2f2 snippets: add tf2 transform example 2018-11-05 21:04:04 +03:00
Arthur Golubtsov
dacf6a38ab changed default settings of main_camera.launch 2018-11-02 22:54:47 +03:00
Arthur Golubtsov
a4aa8bcc6d Add information and illustrations about camera orientations, update default settings in main_camera.launch 2018-11-02 22:28:50 +03:00
Arthur Golubtsov
5c8700257b Merge branch 'master' of https://github.com/CopterExpress/clever 2018-11-02 20:11:08 +03:00
Arthur Golubtsov
862b45a512 Add information for camera_markers visualization 2018-11-02 20:10:03 +03:00
Oleg Kalachev
db20dd0ec7 Merge pull request #79 from sfalexrog/WIP/build-script-fixes
Build script fixes
2018-11-02 18:56:43 +03:00
sfalexrog
8932314853 build-scripts: Disable system-wide upgrade for pip
Upgrading pip system-wide should be a task for the system package manager,
and doing it through pip itself seems to be frowned upon (not to mention leaving
the end user with a broken package installer and broken packages). It also seems
to have some fun/nasty side effects (like setting pip up to install packages for python3
instead of python2, for which pip2 is used).

Debian-packaged pip, while being older, doesn't seem to break stuff for now. End user should
be able to upgrade to a newer pip locally (which seems like the right thing to do), but
a possibility of having a more recent pip should be looked into nonetheless.
2018-11-02 11:08:19 +03:00
sfalexrog
8e0e5bba19 build-scripts: Fix upgrading pip for python3 2018-11-02 09:56:42 +03:00
Oleg Kalachev
3da2c1c79a Fix Etcher screensot 2018-11-01 19:25:44 +03:00
Oleg Kalachev
39e8874b87 Merge pull request #74 from timkondratiev/patch-1
Fixed missing sudoers changes
2018-10-29 16:52:40 +03:00
timkondratiev
d320702470 Fixed missing sudoers changes 2018-10-25 17:42:20 +03:00
Oleg Kalachev
110bba7c32 Update snippets.md 2018-10-23 04:45:20 +03:00
Oleg Kalachev
c653207daf Update copterhack2018.md 2018-10-21 02:46:04 +03:00
Oleg Kalachev
f1b4d779cb Update copterhack2018.md 2018-10-21 02:45:09 +03:00
Oleg Kalachev
0ead8d41e1 Update aruco.md 2018-10-21 02:41:26 +03:00
Oleg Kalachev
088e42a88a Update copterhack2018.md 2018-10-21 02:40:55 +03:00
Oleg Kalachev
12d2f42e41 docs: little update 2018-10-21 02:38:08 +03:00
goldarte
9c65f61db4 Creates docs/copterhack2018.md
Auto commit by GitBook Editor
2018-10-20 13:16:12 +00:00
Oleg Kalachev
225062cefe docs: some info on optical flow troubleshooting 2018-10-19 14:18:19 +03:00
Oleg Kalachev
a6196c182d Fix Travis build status link 2018-10-19 04:13:43 +03:00
Oleg Kalachev
1342182d7c Fix Travis build status icon 2018-10-19 04:13:01 +03:00
Oleg Kalachev
163af20d29 Tune up sitl.launch a little 2018-10-19 03:36:34 +03:00
Oleg Kalachev
d376bc0553 selfcheck: add vpe or mocap data checking 2018-10-19 03:32:42 +03:00
Oleg Kalachev
802d04e1eb selfcheck: add checking optical flow data 2018-10-19 03:23:46 +03:00
Oleg Kalachev
99b03ae5be selfcheck: add rangefinder data checking 2018-10-19 03:22:49 +03:00
Oleg Kalachev
9a3c13da77 simple_offboard: better handle non-existent frame_ids in get_telemetry 2018-10-19 00:14:19 +03:00
Oleg Kalachev
d012c4fe7a simple_offboard: fix bug when navigate target is at 0 distance 2018-10-18 23:48:26 +03:00
Oleg Kalachev
75d20b1234 docs: update opt-flow firmware link 2018-10-18 01:42:38 +03:00
Oleg Kalachev
96fb8a21e6 docs: small fix 2018-10-18 01:42:38 +03:00
Oleg Kalachev
39787af90b simple_offboard: make behaviour more reasonable when frame_id doesn’t exist 2018-10-18 01:42:38 +03:00
Oleg Kalachev
07a8ed0dc2 clever.launch: little fix 2018-10-18 01:42:38 +03:00
Oleg Kalachev
ee3941f16c Merge pull request #72 from vilesovds/patch-1
Fixed broken links
2018-10-18 00:40:54 +03:00
vilesovds
ffe89f8265 Fixed broken links 2018-10-18 00:27:07 +03:00
Artem Smirnov
2a0562188a image: Add params for monkey 2018-10-17 16:04:58 +03:00
Artem Smirnov
7978c9e6fa Merge pull request #71 from urpylka/master
Последние правки
2018-10-17 15:07:24 +03:00
Arthur Golubtsov
4237192802 Merge branch 'master' of https://github.com/CopterExpress/clever 2018-10-16 18:36:27 +03:00
Arthur Golubtsov
3caa6796b6 set the body/frame_id value to fcu_horiz 2018-10-16 14:20:59 +03:00
Oleg Kalachev
fcf9b6b909 docs: px4 parameters article stub 2018-10-16 02:48:56 +03:00
Artem Smirnov
572d8dc55f image: Delete enable web server param 2018-10-14 08:33:23 +03:00
Artem Smirnov
6f473816a1 image: Fix path to roscore.env 2018-10-14 08:33:09 +03:00
Artem Smirnov
6701c17332 image: Add debug output 2018-10-14 06:59:49 +03:00
Artem Smirnov
89cee43d38 image: Move my repeat func to my_travis_retry 2018-10-14 05:17:48 +03:00
Artem Smirnov
c17dde8f8f image: Remove symlink 2018-10-12 20:38:49 +03:00
Artem Smirnov
6e1aa44f2d image: Fix version cv_camera 2018-10-12 20:38:30 +03:00
Artem Smirnov
660d26bbce image: Fix bug 2018-10-12 19:25:23 +03:00
Artem Smirnov
7e7cb1c085 image: Remove sudo 2018-10-12 19:23:20 +03:00
Artem Smirnov
2aef7fbfba image: Don't use symlink 2018-10-12 19:13:34 +03:00
Artem Smirnov
76347bf4cc image: Change monkey startup 2018-10-12 19:12:24 +03:00
Artem Smirnov
280a0003ed image: Replace : to = for versions 2018-10-12 18:54:30 +03:00
Artem Smirnov
74a1e1cbee image: Fix rosdep key 2018-10-12 18:37:59 +03:00
Artem Smirnov
2099c75fa8 image: Add dependencies for compressed-image-transport 2018-10-12 18:37:43 +03:00
Artem Smirnov
cbb19271bf image: Debug install packages w versions 2018-10-12 18:37:07 +03:00
Oleg Kalachev
6fc2f952ce docs: add info on using rqt 2018-10-12 16:55:16 +03:00
Artem Smirnov
62c22d3539 image: Add ros_comm & rosbash
Doesn't work roscd & rosrun
2018-10-12 16:51:06 +03:00
Artem Smirnov
83ea7b8f54 image: Update cv_camera 2018-10-11 16:36:41 +03:00
Artem Smirnov
52fbe86e0f image: Add my_travis_retry for pip install 2018-10-10 15:28:29 +03:00
Artem Smirnov
d000f81356 image: Remove /dev/null on apt update 2018-10-10 15:28:11 +03:00
Artem Smirnov
e815c14070 image: Replace True to true, False to false 2018-10-10 13:23:58 +03:00
Artem Smirnov
8b4b7221b5 image: Unfix git 2018-10-10 12:09:41 +03:00
Artem Smirnov
6c025d84ad Merge pull request #68 from urpylka/master
New structure of the CLEVER
2018-10-10 11:51:19 +03:00
Artem Smirnov
ed08f41065 image: Enable debug output on install packages 2018-10-10 11:50:14 +03:00
Artem Smirnov
71e8d74160 image: Remove spaces 2018-10-10 11:47:32 +03:00
Artem Smirnov
6261ff9da5 Merge remote-tracking branch 'upstream/master' 2018-10-09 20:03:34 +03:00
Oleg Kalachev
f507923cb1 docs for experimental optical flow feature 2018-10-09 15:54:08 +03:00
Oleg Kalachev
8017904261 z_shift param in vl53 driver 2018-10-09 14:53:11 +03:00
Artem Smirnov
9a4d467d9f image: Add mavros_extras as depend of clever 2018-10-03 23:41:59 +03:00
Artem Smirnov
640781f381 image: Add web_video_server as depend of clever 2018-10-03 22:31:47 +03:00
Artem Smirnov
b255de4627 image: Change debug output in init_rpi.sh 2018-10-03 22:15:45 +03:00
Artem Smirnov
bb9ece650f image: Add cv_camera as depend for clever 2018-10-03 18:58:05 +03:00
Svetk0
ea860e20a6 Add files via upload 2018-10-03 13:23:47 +03:00
Svetk0
87686c1d36 Delete cl3_connectionESC4in1.jpg 2018-10-03 13:23:22 +03:00
Svetk0
e7ee8d2317 Add files via upload 2018-10-03 13:17:54 +03:00
Svetk0
b21c6bce9f Delete cl3_connectionESC4in1.jpg 2018-10-03 13:15:49 +03:00
Artem Smirnov
415689d725 image: Fix IMAGE_VERSION 2018-10-02 18:18:12 +03:00
Artem Smirnov
1b66508df7 image: Change source image path 2018-10-02 18:15:20 +03:00
Artem Smirnov
12c431f87c image: Remove MIT license 2018-10-02 17:43:56 +03:00
Artem Smirnov
00a506cfdf image: Add update pip 2018-10-02 17:42:30 +03:00
Artem Smirnov
e13ca40a75 image: Fix monkey 2018-10-02 15:59:42 +03:00
Svetk0
679e0bbd00 Add files via upload 2018-10-01 23:46:16 +03:00
Svetk0
58a73b3b53 Create cl3_connectESC4in1.md 2018-10-01 23:41:17 +03:00
Artem Smirnov
3a2ea23822 image: Remove slash 2018-10-01 22:00:25 +03:00
Artem Smirnov
fd4afdfc84 image: Fix butterfly.socket path 2018-10-01 20:18:50 +03:00
Artem Smirnov
ec757e3418 image: Replace echo to echo_stamp 2018-10-01 20:16:01 +03:00
Artem Smirnov
efd9d82131 Merge branch 'before-merge'
# Conflicts:
#	builder/assets/clever.service
#	builder/assets/hardware_setup.sh
#	builder/assets/kinetic-ros-clever.rosinstall
#	builder/assets/roscore.env
#	builder/assets/roscore.service
2018-10-01 20:06:01 +03:00
Artem Smirnov
affd349ee9 image: Install Monkey (web server) 2018-10-01 20:01:13 +03:00
Artem Smirnov
2ae1c1dfaa image: Install Butterfly (web terminal) 2018-10-01 20:01:13 +03:00
Artem Smirnov
bc6f066804 image: remove dubllicated code 2018-10-01 20:01:13 +03:00
Artem Smirnov
1f5f814f42 image: Update web_video_server version 2018-10-01 20:01:13 +03:00
Artem Smirnov
fc9b33b698 image: Add compressed_image_transport plugin 2018-10-01 20:01:13 +03:00
Artem Smirnov
1ed4221d9f image: Add ROS packages for interactive markers 2018-10-01 20:01:13 +03:00
Artem Smirnov
fe7f29b76f image: Set up syntax highlighting in vim for .launch files 2018-10-01 20:01:13 +03:00
Artem Smirnov
a165a4817c image: Deny byobu to check available updates 2018-10-01 20:01:13 +03:00
Artem Smirnov
e35a7fe108 image_builder: add ltrace utility 2018-10-01 20:01:13 +03:00
Artem Smirnov
f91b7742c3 image_builder: new configure UART on RPi 2018-10-01 20:01:13 +03:00
Artem Smirnov
5065ca8c3b image_builder: change os version to 2018-06-27 2018-10-01 20:01:13 +03:00
Artem Smirnov
3a2b8bd1f4 image_builder: Set max space for syslogs 2018-10-01 20:01:13 +03:00
Artem Smirnov
837c7af7ee image_builder: change builder to img-tool 2018-10-01 20:01:13 +03:00
Artem Smirnov
6c9103835f image_builder: remove docker_builder from repo
see: https://github.com/urpylka/img-tool
2018-10-01 20:01:13 +03:00
Artem Smirnov
d16a27c891 image_builder: try to fix image path 2018-10-01 20:01:13 +03:00
Artem Smirnov
834e21aaf0 image_builder: fix visibility TRAVIS_TAG in image-build 2018-10-01 20:01:13 +03:00
Artem Smirnov
7260433a91 image_builder: fix problem w setup TRAVIS_TAG 2018-10-01 20:01:13 +03:00
Artem Smirnov
c4bfff69f4 image_builder: remove unused string 2018-10-01 20:01:13 +03:00
Artem Smirnov
e71515ee3e image_builder: fix sh to bash 2018-10-01 20:01:13 +03:00
Artem Smirnov
2372824122 image_builder: fix image name in travis 2018-10-01 20:01:13 +03:00
Artem Smirnov
521baaa652 image_builder: move mjpeg-streamer to ros-clever 2018-10-01 20:01:13 +03:00
Artem Smirnov
8df037d1ad image_builder: install lxml w apt
pymavlink required lxml
can't install w pip https://stackoverflow.com/questions/33064433/lxml-will-never-finish-building-on-ubuntu
2018-10-01 20:01:13 +03:00
Artem Smirnov
afdbe7ba7a image_builder: fix headers & move apt init block 2018-10-01 20:01:13 +03:00
Artem Smirnov
852308c78d image_builder: add header 2018-10-01 20:01:13 +03:00
Artem Smirnov
020f3b6259 image_builder: fix lxml
https://github.com/ArduPilot/pymavlink
2018-10-01 20:01:13 +03:00
Artem Smirnov
4fdcb32044 image_builder: fix comments 2018-10-01 20:01:13 +03:00
Artem Smirnov
d55e7ed404 image_builder: delete comments 2018-10-01 20:01:13 +03:00
Artem Smirnov
4e38266101 image_builder: update .travis.yml 2018-10-01 20:01:13 +03:00
Artem Smirnov
330e3f92b4 image_builder: fix libxml2 requirements 2018-10-01 20:01:13 +03:00
Artem Smirnov
72ea0daeec image_builder: fix visibility of the function 2018-10-01 20:01:13 +03:00
Artem Smirnov
b938b28076 image_builder: fix path to mjpeg-streamer 2018-10-01 20:01:13 +03:00
Artem Smirnov
5bb818332a docs: add script for generate ros_lib to arduino article 2018-10-01 20:01:13 +03:00
Artem Smirnov
85a7db1b56 image_builder: fix geographic lib datasets 2018-10-01 20:01:13 +03:00
Artem Smirnov
972abc6277 image_builder: some fixes after transition to the new architecture 2018-10-01 20:01:13 +03:00
Artem Smirnov
5fdf22afc3 image_builder: fix pip package 2018-10-01 20:01:13 +03:00
Artem Smirnov
80669d7e2f image_builder: little fixes 2018-10-01 20:01:13 +03:00
Artem Smirnov
74157b4901 image_builder: fix path to builder API 2018-10-01 20:01:13 +03:00
Artem Smirnov
a42f631bf4 image_builder: little fixes 2018-10-01 20:01:13 +03:00
Artem Smirnov
47648cd57f image_builder: remove git debug string 2018-10-01 20:01:13 +03:00
Artem Smirnov
eec5b9c9b2 image_builder: change date output 2018-10-01 20:01:13 +03:00
Artem Smirnov
61544c2099 image_builder: new architecture for builder 2018-10-01 20:01:13 +03:00
Artem Smirnov
afa3523cb2 image_builder: fix syntax 2018-10-01 20:01:13 +03:00
Artem Smirnov
8c6af93fd1 image_builder: add qemu-arm-static to image-chroot.sh 2018-10-01 20:01:13 +03:00
Artem Smirnov
3dd5747b3c image_builder: fix bug w ${3:='def'} & standardization vars 2018-10-01 20:01:13 +03:00
Artem Smirnov
2901234d9c image_builder: new name for temp scripts 2018-10-01 20:01:13 +03:00
Artem Smirnov
595e67a928 image_builder: fix bug w scope of variable 2018-10-01 20:01:13 +03:00
Artem Smirnov
fa817d9f80 image_builder: fix bugs 2018-10-01 20:01:13 +03:00
Artem Smirnov
72b20f8c94 image_builder: fix image path 2018-10-01 20:01:13 +03:00
Artem Smirnov
6dc0bd5cc5 image_builder: disable stdout in wget 2018-10-01 20:01:13 +03:00
Artem Smirnov
da9eb7d0ba image_builder: disable debug comments 2018-10-01 20:01:13 +03:00
Artem Smirnov
18f973ce00 image_builder: debug 2018-10-01 20:01:13 +03:00
Artem Smirnov
469542416d image_builder: delete echo_stamp 2018-10-01 20:01:13 +03:00
Artem Smirnov
fb6b96fa5b image_builder: try to interrupt script-stage 2018-10-01 20:01:13 +03:00
Artem Smirnov
98f0b57eb6 image_builder: fix path to script after redesign builder 2018-10-01 20:01:13 +03:00
Artem Smirnov
4f8956829f image_builder: fix syntax with quotes & = 2018-10-01 20:01:13 +03:00
Artem Smirnov
9c6991e9d7 image_builder: fix syntax 2018-10-01 20:01:13 +03:00
Artem Smirnov
59b2c3895c image_builder: remove yadisk uploader 2018-10-01 20:01:13 +03:00
Artem Smirnov
ccef57f311 image_builder: new structure of builder 2018-10-01 20:01:13 +03:00
Artem Smirnov
c25a752b20 image_builder: add only tag or branch format 2018-10-01 20:01:13 +03:00
Artem Smirnov
9ecf10ea43 image_builder: update readme 2018-10-01 20:01:13 +03:00
Artem Smirnov
1238107b13 image_builder: try to build by my tag 2018-10-01 20:01:13 +03:00
Artem Smirnov
55fc7493c9 image_builder: remove on: tags: true 2018-10-01 20:01:13 +03:00
Artem Smirnov
5959f7cbcc image_builder: add no-verbose flag to wget 2018-10-01 20:01:13 +03:00
Artem Smirnov
25ab5933a2 image_builder: remove Jenkins files 2018-10-01 20:01:13 +03:00
Artem Smirnov
2e019c136f image_builder: try to fix travis 2018-10-01 20:01:13 +03:00
Artem Smirnov
1d91f2800d image_builder: fix trouble w permissions 2018-10-01 20:01:13 +03:00
Artem Smirnov
66b879ebb7 image_builder: add sudo for zip command 2018-10-01 20:01:13 +03:00
Artem Smirnov
e47824b1ff image_builder: use BUILD_DIR in Travis 2018-10-01 20:01:13 +03:00
Artem Smirnov
0e791c7bf7 image_builder: replace Jenkins to Travis icon 2018-10-01 20:01:13 +03:00
Artem Smirnov
4a02d27e35 image_builder: remove --no-verbose flag 2018-10-01 20:01:13 +03:00
Artem Smirnov
224d09be9f image_builder: show percents 2018-10-01 20:01:13 +03:00
Artem Smirnov
f236db3392 image_builder: fix got TARGET_COMMIT 2018-10-01 20:01:13 +03:00
Artem Smirnov
ee88d7d6bf image_builder: fix quotes 2018-10-01 20:01:13 +03:00
Artem Smirnov
273310f915 image_builder: add IMAGE_NAME 2018-10-01 20:01:13 +03:00
Artem Smirnov
405b956b06 image_builder: fix path in travis 2018-10-01 20:01:13 +03:00
Artem Smirnov
ef88fcbfd3 image_builder: fix path to images & add debug output 2018-10-01 20:01:13 +03:00
Artem Smirnov
c98913000c image_builder: fix docker image 2018-10-01 20:01:13 +03:00
Artem Smirnov
85d765e5e7 image_builder: delete space 2018-10-01 20:01:13 +03:00
Artem Smirnov
1406229b11 image_builder: move deploy folder to assets 2018-10-01 20:01:13 +03:00
Artem Smirnov
9c3a8627b5 image_builder: remove space in .travis 2018-10-01 20:01:13 +03:00
Artem Smirnov
a548fcafa8 image_builder: remove unused in gitignore 2018-10-01 20:01:13 +03:00
Artem Smirnov
b029054946 image_builder: remove clever_arduino.tar.gz
use generate_ros_lib script
2018-10-01 20:01:13 +03:00
Artem Smirnov
bcab7a9b15 remove _config.yml 2018-10-01 20:01:13 +03:00
Artem Smirnov
5cf7e86d33 image_builder: split builder_docker & builder_scripts skip travis 2018-10-01 20:01:13 +03:00
Artem Smirnov
c0cd53c733 image_builder: fix syntax: delete slash 2018-10-01 20:01:13 +03:00
Artem Smirnov
45743ca6ac image_builder: change get_new_image to get_image 2018-10-01 20:01:13 +03:00
Artem Smirnov
54048922fa image_builder: fix permissions & fix get_new_image 2018-10-01 20:01:13 +03:00
Artem Smirnov
2b1fd00ca0 image_builder: comment all stages for test gh release 2018-10-01 20:01:13 +03:00
Artem Smirnov
ccc5a12320 image_builder: zip image 2018-10-01 20:01:13 +03:00
Artem Smirnov
c828effd23 image_builder: split image_config.sh & standardization headers 2018-10-01 20:01:13 +03:00
Artem Smirnov
d7e6629567 image_builder: add normal deploy & delete unused code [skip travis] 2018-10-01 20:01:13 +03:00
Artem Smirnov
b6a06c62d1 image_builder: fix clever requirements 2018-10-01 20:01:13 +03:00
Artem Smirnov
cea91bd082 image_builder: comment unused import 2018-10-01 20:01:13 +03:00
Artem Smirnov
a9e5270acd image_builder: fix syntax in README 2018-10-01 20:01:13 +03:00
Artem Smirnov
3f5b856310 image_builder: try to fix bug w can't find setup.bash 2018-10-01 20:01:13 +03:00
Artem Smirnov
7595971f96 image_builder: add threads flag to wstool 2018-10-01 20:01:13 +03:00
Artem Smirnov
1ecc2774d7 image_builder: use deb package for mjpg-streamer 2018-10-01 20:01:13 +03:00
Artem Smirnov
7e47914abe image_builder: comment not working code 2018-10-01 20:01:13 +03:00
Artem Smirnov
ef204e0a54 image_builder: add error handler 2018-10-01 20:01:13 +03:00
Artem Smirnov
8e1015f64e image_builder: unused tee 2018-10-01 20:01:13 +03:00
Artem Smirnov
ec9d7ab22f image_builder: comment github deploy 2018-10-01 20:01:13 +03:00
Artem Smirnov
8cc9a916c4 image_builder: fix syntax 2018-10-01 20:01:13 +03:00
Artem Smirnov
0d1c1bfec2 image_builder: remove cache 2018-10-01 20:01:13 +03:00
Artem Smirnov
90debd91ba image_builder: install ros-kinetic-ros as depend for clever 2018-10-01 20:01:13 +03:00
Artem Smirnov
bccecbbc88 image_builder: try to use github release 2018-10-01 20:01:13 +03:00
Artem Smirnov
850afc6688 image_builder: Add link to .travis.yml 2018-10-01 20:01:13 +03:00
Artem Smirnov
3bffcba4de image_builder: fix .travis.yml 2018-10-01 20:01:13 +03:00
Artem Smirnov
0fc319c2af image_builder: debug 2018-10-01 20:01:13 +03:00
Artem Smirnov
3434f6963e image_builder: add yaml file to repo 2018-10-01 20:01:13 +03:00
Artem Smirnov
482d47a48c image_builder: debug 2018-10-01 20:01:13 +03:00
Artem Smirnov
0ce4714f8e image_builder: debug 2018-10-01 20:01:13 +03:00
Artem Smirnov
1d27febf6a image_builder: debug rosdep 2018-10-01 20:01:13 +03:00
Artem Smirnov
290301115b image_builder: debug 2018-10-01 20:01:13 +03:00
Artem Smirnov
81ef67787a image_builder: syntax fix 2018-10-01 20:01:13 +03:00
Artem Smirnov
815bebf6f2 image_builder: fix clever.rosinstall 2018-10-01 20:01:13 +03:00
Artem Smirnov
1f29d4c0ec image_builder: remove numbers 2018-10-01 20:01:13 +03:00
Artem Smirnov
4eaf8c87c5 image_builder: fix install dirmngr 2018-10-01 20:01:13 +03:00
Artem Smirnov
234b377ceb image_builder: TEMP: Add support installation wo sources 2018-10-01 20:01:13 +03:00
Artem Smirnov
23ba569e48 image_builder: change rosdep installation loop 2018-10-01 20:01:13 +03:00
Artem Smirnov
6e364009e3 image_builder: restyle for init ros_catkin_ws 2018-10-01 20:01:13 +03:00
Artem Smirnov
b1f79c1903 image_builder: add comments whats need todo 2018-10-01 20:01:13 +03:00
Artem Smirnov
0cb23e600c image_builder: trans /dev/null to comment 2018-10-01 20:01:13 +03:00
Artem Smirnov
04b22af49d image_builder: comeback /dev/null 2018-10-01 20:01:13 +03:00
Artem Smirnov
1e0589b3ed image_builder: debug opencv installation 2018-10-01 20:01:13 +03:00
Artem Smirnov
214224101c image_builder: stderr to /dev/null 2018-10-01 20:01:13 +03:00
Artem Smirnov
d574adbc3f image_builder: debug opencv installation 2018-10-01 20:01:13 +03:00
Artem Smirnov
1c77d030d9 image_builder: debug opencv installation 2018-10-01 20:01:13 +03:00
Artem Smirnov
0410246918 image_builder: debug opencv installation 2018-10-01 20:01:13 +03:00
Artem Smirnov
a86e662c1e image_builder: disable OK of apt-key 2018-10-01 20:01:13 +03:00
Artem Smirnov
c68fb8883c image_builder: debug opencv installation 2018-10-01 20:01:13 +03:00
Artem Smirnov
7dd0779f69 image_builder: remove own 'q' 2018-10-01 20:01:13 +03:00
Artem Smirnov
98ad1cdba8 image_builder: debug opencv installation 2018-10-01 20:01:13 +03:00
Artem Smirnov
386c88a8f4 image_builder: debug installation opencv 2018-10-01 20:01:13 +03:00
Artem Smirnov
5accc55e93 image_builder: debug opencv installation 2018-10-01 20:01:13 +03:00
Artem Smirnov
756e50d3ac image_builder: debug 2018-10-01 20:01:13 +03:00
Artem Smirnov
d8c4b452c5 image_builder: debug opencv installation 2018-10-01 20:01:13 +03:00
Artem Smirnov
1430968566 image_builder: fix syntax 2018-10-01 20:01:13 +03:00
Artem Smirnov
13fcc3c20a image_builder: debug opencv3 installation 2018-10-01 20:01:13 +03:00
Artem Smirnov
8b7c20b40c image_builder: replace terrible echo 2018-10-01 20:01:13 +03:00
Artem Smirnov
f7b58c9e6d image_builder: debug 2018-10-01 20:01:13 +03:00
Artem Smirnov
2adb329ece image_builder: delete duplicate string 2018-10-01 20:01:13 +03:00
Artem Smirnov
a5cdb9dc00 image_builder: debug opencv installation 2018-10-01 20:01:13 +03:00
Artem Smirnov
c971b1b00c image_builder: add opencv version & messages for SUCCESS/ERROR 2018-10-01 20:01:13 +03:00
Artem Smirnov
85bbd15bd0 image_builder: remove old comment 2018-10-01 20:01:13 +03:00
Artem Smirnov
dc597c9299 image_builder: try to fix continue if error between stages 2018-10-01 20:01:13 +03:00
Artem Smirnov
b85b8a978a image_builder: disable /dev/null for debub
E: Unable to correct problems, you have held broken packages.
2018-10-01 20:01:13 +03:00
Artem Smirnov
b27ad9d395 image_builder: rm stderr in coex-mirror.gpg download 2018-10-01 20:01:13 +03:00
Artem Smirnov
671de1a799 image_builder: fix stderr transmission 2018-10-01 20:01:13 +03:00
Artem Smirnov
2565997fb6 image_builder: change key-storage 2018-10-01 20:01:13 +03:00
Artem Smirnov
8baba02f98 image_builder: stderr to /dev/null 2018-10-01 20:01:13 +03:00
Artem Smirnov
fbbfdd54e8 image_builder: fix syntax & move install opencv to software stage 2018-10-01 20:01:13 +03:00
Artem Smirnov
a09bc7156a image_builder: install opencv3 as deb package 2018-10-01 20:01:13 +03:00
Artem Smirnov
5922619605 image_builder: redirect stderr to file 2018-10-01 20:01:13 +03:00
Artem Smirnov
2bd9e119f8 image_builder: little fix 2018-10-01 20:01:13 +03:00
Artem Smirnov
a52faadbef image_builder: update readme 2018-10-01 20:01:13 +03:00
Artem Smirnov
5751184c46 image_builder: idea 2018-10-01 20:01:13 +03:00
Artem Smirnov
d7418e80c2 image_builder: success if success 2018-10-01 20:01:13 +03:00
Artem Smirnov
d9578d3c32 image_builder: add travis 2018-10-01 20:01:13 +03:00
Artem Smirnov
66b09ee99a image_builder: try ros build on travis 2018-10-01 20:01:13 +03:00
Artem Smirnov
8b213d6103 image_builder: disable STDERR in mjpeg-streamer 2018-10-01 20:01:13 +03:00
Artem Smirnov
2f584fd2d7 image_builder: disable STDOUT in wget image 2018-10-01 20:01:13 +03:00
Artem Smirnov
9cf8357c4f image_builder: change master by default 2018-10-01 20:01:13 +03:00
Artem Smirnov
3f53de0832 image_builder: fix autosizer awk
echo "2:48234496B:7516192767B:7467958272B:ext4::;" | awk -F: '{ print substr($2,0,length($2)-1) }'
Default awk in docker: 4823449
GNU Awk 4.1.3, API: 1.1 (GNU MPFR 3.1.4, GNU MP 6.1.0): 48234496
2018-10-01 20:01:13 +03:00
Artem Smirnov
59e6f33e9f image_builder: not listing /image_builder/image/ 2018-10-01 20:01:13 +03:00
Artem Smirnov
24edace814 image_builder: rename to build.sh 2018-10-01 20:01:13 +03:00
Artem Smirnov
5da1125ecd image_builder: use dynamic counting vars 2018-10-01 20:01:13 +03:00
Artem Smirnov
8566c2ccbd image_builder: temp comment ROS for debug 2018-10-01 20:01:13 +03:00
Artem Smirnov
d3acb298e8 image_builder: move REGISTER to var 2018-10-01 20:01:13 +03:00
Artem Smirnov
3827bb4210 image_builder: add --rm flag 2018-10-01 20:01:13 +03:00
Artem Smirnov
e71519d358 image_builder: add exit code true 2018-10-01 20:01:13 +03:00
Artem Smirnov
4c2a881407 image_builder: delete condition of existing dir 2018-10-01 20:01:13 +03:00
Artem Smirnov
a67179105c image_builder: fix path 2018-10-01 20:01:13 +03:00
Artem Smirnov
e092cec215 image_builder: remove $ from params message 2018-10-01 20:01:13 +03:00
Artem Smirnov
4f8e9019af image_builder: add bc to Docker image 2018-10-01 20:01:13 +03:00
Artem Smirnov
4d68f77368 image_builder: fix var 2018-10-01 20:01:13 +03:00
Artem Smirnov
a05ae6cafe image_builder: add params message 2018-10-01 20:01:13 +03:00
Artem Smirnov
1283219c51 image_builder: force write 2018-10-01 20:01:13 +03:00
Artem Smirnov
de30d0d09f image_builder: doc: update docker link 2018-10-01 20:01:13 +03:00
Artem Smirnov
ab5df9f725 image_builder: fix path 2018-10-01 20:01:13 +03:00
Artem Smirnov
613fe1639c image_builder: change sample 2018-10-01 20:01:13 +03:00
Artem Smirnov
4de6468393 image_builder: remove VOLUME from docker file 2018-10-01 20:01:13 +03:00
Artem Smirnov
c4f4c9a81a image_builder: try to fix bag 2018-10-01 20:01:13 +03:00
Artem Smirnov
5a22dce8d4 image_builder: fix path 2018-10-01 20:01:13 +03:00
Artem Smirnov
bea4f3044c image_builder: add test Dockerfile 2018-10-01 20:01:13 +03:00
Artem Smirnov
f8018aab68 image_builder: add TODO to autosizer 2018-10-01 20:01:13 +03:00
Artem Smirnov
a9d9adc25f image_builder: add readme for docker 2018-10-01 20:01:13 +03:00
Artem Smirnov
e04cb7cb6a image_builder: use params for threads numbers 2018-10-01 20:01:13 +03:00
Artem Smirnov
8539ff8430 image_builder: move partition change to init script 2018-10-01 20:01:13 +03:00
Artem Smirnov
8b60d2c61d image_builder: delete unused script 2018-10-01 20:01:13 +03:00
Artem Smirnov
5590e64e0a image_builder: little syntax fix 2018-10-01 20:01:13 +03:00
Artem Smirnov
8379f8ac6a image_builder: add suffix for mktemp 2018-10-01 20:01:13 +03:00
Artem Smirnov
fcd6d41586 image_builder: change manual to autobuild 2018-10-01 20:01:13 +03:00
Artem Smirnov
c72b04a413 image_builder: add main script for build 2018-10-01 20:01:13 +03:00
Artem Smirnov
342bf0caed image_builder: add config file for build 2018-10-01 20:01:13 +03:00
Artem Smirnov
850b18ab35 image_builder: remove unused comment 2018-10-01 20:01:13 +03:00
Artem Smirnov
f2437b4722 image_builder: remove STATIC FUNCTION comments 2018-10-01 20:01:13 +03:00
Artem Smirnov
595d84fb7c image_builder: changes vars to SCRIPTS_DIR & IMAGE_PATH 2018-10-01 20:01:13 +03:00
Artem Smirnov
26246e3ef7 image_builder: git clone w checks 2018-10-01 20:01:13 +03:00
Artem Smirnov
70196d69ad image_builder: use another vars init 2018-10-01 20:01:13 +03:00
Artem Smirnov
5f6ba57b33 image_builder: mv rosinstall to scripts 2018-10-01 20:01:13 +03:00
Artem Smirnov
749d465556 image_builder: little syntax fix 2018-10-01 20:01:13 +03:00
Artem Smirnov
f143a94426 image_builder: rename all to IMAGE_PATH 2018-10-01 20:01:13 +03:00
Artem Smirnov
916ad43f4e image_builder: use IMAGE_PATH in get_image 2018-10-01 20:01:13 +03:00
Artem Smirnov
4850d03825 image_builder: use IMAGE_PATH in publish image 2018-10-01 20:01:13 +03:00
Artem Smirnov
8c72eb65ff image_builder: fix syntax ros_install 2018-10-01 20:01:13 +03:00
Artem Smirnov
be2ffe7580 image_builder: delete comments & spaces 2018-10-01 20:01:13 +03:00
Artem Smirnov
a0a54716b8 image_builder: not used double space after slash 2018-10-01 20:01:13 +03:00
Artem Smirnov
386c85c01b image_builder: delete STATIC FUNCTION comments 2018-10-01 20:01:13 +03:00
Artem Smirnov
908a7bfcc0 image_builder: little syntax fix 2018-10-01 20:01:13 +03:00
Artem Smirnov
a2e0e483b5 image_builder: set var by default 2018-10-01 20:01:13 +03:00
Artem Smirnov
f84e6d4598 image_builder: enhancement apt`s call 2018-10-01 20:01:13 +03:00
Artem Smirnov
5e5247aee1 image_builder: migrate from build.Jenkinsfile to manual.sh 2018-10-01 20:01:13 +03:00
Artem Smirnov
2e27485e3b image_builder: fix numbers 2018-10-01 20:01:13 +03:00
Artem Smirnov
67cb2f1c8f image_builder: self-remove if return non-zero code 2018-10-01 20:01:13 +03:00
Artem Smirnov
f2ff6eaa4a image_builder: add echo_bold to autosizer 2018-10-01 20:01:13 +03:00
Artem Smirnov
2367709b2e image_builder: add autoremove to init scripts 2018-10-01 20:01:13 +03:00
Artem Smirnov
3fc266a061 image_builder: add echo_stamp to other files 2018-10-01 20:01:13 +03:00
Artem Smirnov
a008f6b57c image_builder: fix sed expression 2018-10-01 20:01:13 +03:00
Artem Smirnov
27ef8da039 image_builder: add todo 2018-10-01 20:01:13 +03:00
Artem Smirnov
e45665502f image_builder: fix colors 2018-10-01 20:01:13 +03:00
Artem Smirnov
c6297469d7 image_builder: try to fix syntax 2018-10-01 20:01:13 +03:00
Artem Smirnov
b419b400ba image_builder: temp solution for fix mount if already mounted 2018-10-01 20:01:13 +03:00
Artem Smirnov
e7a7a87e48 image_builder: change code order in manual.sh 2018-10-01 20:01:13 +03:00
Artem Smirnov
61cb198893 image_builder: add quotes to manual 2018-10-01 20:01:13 +03:00
Artem Smirnov
dc02747f87 image_builder: add autosizer to manual 2018-10-01 20:01:13 +03:00
Artem Smirnov
676c3d6b79 image_builder: remove partition numbers 2018-10-01 20:01:13 +03:00
Artem Smirnov
e32ed43c29 image_builder: add lines 2018-10-01 20:01:13 +03:00
Artem Smirnov
b4fabf70c2 image_builder: try to normal template 2018-10-01 20:01:13 +03:00
Artem Smirnov
e0af232f76 image_builder: authors to top 2018-10-01 20:01:13 +03:00
Artem Smirnov
bdd9997bb5 image_builder: add echo_stamp 2018-10-01 20:01:13 +03:00
Artem Smirnov
950503d231 image_builder: edit to HW setup at init script 2018-10-01 20:01:13 +03:00
Artem Smirnov
20a6275ae8 image_builder: test build 2018-10-01 20:01:13 +03:00
Artem Smirnov
ef187ed37e image_builder: disable apt output 2018-10-01 20:01:13 +03:00
Artem Smirnov
11f6818663 image_builder: -j4 2018-10-01 20:01:13 +03:00
Artem Smirnov
41ef3b1d22 image_builder: /dev/null 2018-10-01 20:01:13 +03:00
Artem Smirnov
1ddec5f97b image_builder: test_install 2018-10-01 20:01:13 +03:00
Artem Smirnov
9ddd4a63bb image_builder: add cp address support 2018-10-01 20:01:13 +03:00
Artem Smirnov
3f1d9e3be0 image_builder: refactor manual script 2018-10-01 20:01:13 +03:00
Artem Smirnov
fa7c5ee40d image_builder: remove macos's shit 2018-10-01 20:01:13 +03:00
Artem Smirnov
10ee12bfcd image_builder: add all.sh 2018-10-01 20:01:13 +03:00
Artem Smirnov
a43e5861d7 image_builder: remove mount_system function 2018-10-01 20:01:13 +03:00
Artem Smirnov
1724dcc8ff image_builder: add qemu 2018-10-01 20:01:13 +03:00
Artem Smirnov
aca11bdb40 Remove conflict files 2018-09-30 19:21:36 +03:00
Oleg Kalachev
862ee9a2d0 simple_offboard: get local frame name from mavros params 2018-09-28 03:49:45 +03:00
Oleg Kalachev
a1f29738ab Add one auxiliary frames node, rename ‘fcu_horiz’ to ‘body’ by default 2018-09-28 03:41:22 +03:00
Yuliya1404
b03919ed86 Update lessons.md 2018-09-27 18:28:35 +03:00
Oleg Kalachev
d5c6c67f11 Update Flask version 2018-09-27 06:17:09 +03:00
Oleg Kalachev
07d33798a0 Add Python version of vl53l1x driver 2018-09-27 06:11:52 +03:00
Oleg Kalachev
27a748c6a6 selfcheck: add angular velocity check 2018-09-27 03:49:17 +03:00
goldarte
9c839854fa Updates docs/testovoe-opisanie-klevera-po-shablonu-robotsrosorggapter.md
Auto commit by GitBook Editor
2018-09-26 17:21:43 +00:00
goldarte
fb2ea36c4b Creates docs/testovoe-opisanie-klevera-po-shablonu-robotsrosorggapter.md
Auto commit by GitBook Editor
2018-09-26 17:20:45 +00:00
Oleg Kalachev
6ae4d63c30 Set camera capture delay 2018-09-26 01:39:19 +03:00
Oleg Kalachev
ae3ef67825 mavros: blacklisted home_position plugin 2018-09-26 01:18:51 +03:00
Oleg Kalachev
751412e639 selfcheck.py: check camera info dimensions 2018-09-22 01:46:31 +03:00
Oleg Kalachev
c73921af4f docs: add warning to rc 2018-09-22 01:38:28 +03:00
Oleg Kalachev
ab9106f902 Minor improvements to selfcheck 2018-09-22 01:28:11 +03:00
Artem Smirnov
aad6940ca7 Merge branch 'CL3_assemble_new' 2018-09-21 06:16:03 +05:00
Artem Smirnov
470e4264b2 docs: Fix syntax & other in articles of assemble 2018-09-21 06:11:27 +05:00
Artem Smirnov
72e76638ff docs: Move images from root 2018-09-21 06:11:27 +05:00
Svetk0
af1388a067 docs: Add assemble's doc of Clever 3 2018-09-21 05:36:13 +05:00
Svetk0
769c999c98 Update assemble_clever3_4in1.md 2018-09-20 11:51:10 +03:00
Svetk0
e0e53aa517 Add files via upload 2018-09-20 11:50:57 +03:00
Svetk0
3a59e60373 Add files via upload 2018-09-20 11:46:09 +03:00
Svetk0
78b4b9c938 Delete cl3_testMotorsFlysky.JPG 2018-09-20 11:45:26 +03:00
Svetk0
ea166af67b Delete cl3_mountPixracer.JPG 2018-09-20 11:45:00 +03:00
Svetk0
5baddc9946 Delete cl3_mountRaspberryPi.JPG 2018-09-20 11:44:32 +03:00
Svetk0
7357694211 Update assemble_clever3_4in1.md 2018-09-20 11:43:02 +03:00
Oleg Kalachev
8205a7c33f docs: add link to Termius 2018-09-20 09:48:30 +03:00
Oleg Kalachev
f532372535 Attempt 4 to fix build, temporarily move Butterfly install to ros_install 2018-09-19 21:32:43 +03:00
Svetk0
1dd2d0c1e4 Update assemble_clever3_4in1.md 2018-09-19 17:33:16 +03:00
Svetk0
5e5d46ee4e Update assemble_clever3_4in1.md 2018-09-19 17:29:28 +03:00
Svetk0
91782898fc Update assemble_clever3_4in1.md 2018-09-19 17:28:06 +03:00
Svetk0
58d41eda8b Update assemble_clever3_4in1.md 2018-09-19 17:23:43 +03:00
Svetk0
c017102cc9 Update assemble_clever3_4in1.md 2018-09-19 17:22:50 +03:00
Svetk0
2f757f9bfd Update assemble_clever3_4in1.md 2018-09-19 15:50:10 +03:00
Svetk0
e9c759df15 Add files via upload 2018-09-19 15:48:16 +03:00
Svetk0
111eab727e Update assemble_clever3_4in1.md 2018-09-19 15:47:20 +03:00
Svetk0
1f39d5e938 Create assemble_clever3_4in1.md 2018-09-19 12:42:24 +03:00
Svetk0
9bf908bdfb Update SUMMARY.md 2018-09-19 12:41:07 +03:00
Svetk0
cba5100d17 Update SUMMARY.md 2018-09-19 12:40:44 +03:00
Svetk0
d9b3a029c3 Update assemble.md 2018-09-19 12:26:05 +03:00
Oleg Kalachev
a2a34a4e2f Fix build, attempt 3 2018-09-19 08:16:33 +03:00
Oleg Kalachev
6f96c9e3ff Fix build, attempt #2 2018-09-19 07:04:34 +03:00
Oleg Kalachev
9aca12e0a5 Little fix in byobu installation 2018-09-19 04:40:20 +03:00
Oleg Kalachev
ead55fe0e3 image: add ltrace utility 2018-09-19 03:22:31 +03:00
Oleg Kalachev
f2820471bc mavros.launch: blacklisted wind_estimation plugin 2018-09-19 03:06:29 +03:00
Oleg Kalachev
fb7885ada2 optical flow: get fcu frame id from mavros params 2018-09-19 02:58:33 +03:00
Oleg Kalachev
f9f4dc5a92 simple_offboard: minor optimization 2018-09-19 02:56:59 +03:00
Oleg Kalachev
ffe4f562cc Code style 2018-09-19 02:53:16 +03:00
Oleg Kalachev
a906428734 image: add ROS packages for interactive markers 2018-09-19 01:42:08 +03:00
Oleg Kalachev
abc7e6fec1 Little fix 2018-09-19 01:30:51 +03:00
Oleg Kalachev
3b01cf3782 Experimental node for controlling the copter with rviz interactive markers 2018-09-19 00:13:11 +03:00
Oleg Kalachev
53d616fb16 image: add compressed_image_transport plugin 2018-09-18 04:39:27 +03:00
Oleg Kalachev
8168c1f201 docs: type 2018-09-17 19:57:44 +03:00
Oleg Kalachev
a0e1e032d6 docs: little fix 2018-09-17 19:57:15 +03:00
Andrei Korigodski
77eca7578f Use Copter Express Technologies as copyright holder 2018-09-17 19:51:20 +03:00
Andrei Korigodski
d13badca50 Improve copyright notices 2018-09-17 19:51:20 +03:00
Oleg Kalachev
acf4f84cae mavros.launch: fix copter_visualization params 2018-09-16 07:12:48 +03:00
Oleg Kalachev
c24d135815 docs: Pixhawk and Pixracer name themselves this way 2018-09-16 05:37:54 +03:00
Oleg Kalachev
0d64476b04 docs: spelling 2018-09-16 05:28:30 +03:00
Oleg Kalachev
091e110afd Move copter_visualization.launch to mavros.launch 2018-09-16 04:43:16 +03:00
Oleg Kalachev
de8ba52643 mavros.launch: fix aligning 2018-09-16 04:37:06 +03:00
Oleg Kalachev
8a2bb6eb32 mavros.launch: default connection is usb 2018-09-16 04:30:22 +03:00
Oleg Kalachev
ed649fd1b1 mavros: disable waypoint plugin 2018-09-16 04:30:07 +03:00
Oleg Kalachev
4cd4b99ae0 docs: add remark about plugin_blacklist usage in mavros 2018-09-16 04:13:37 +03:00
Oleg Kalachev
c903afa09d docs: small fix in snippets 2018-09-12 23:36:35 +03:00
Oleg Kalachev
8aeb11f771 snippet: correct formula for calculating angle to horizon 2018-09-12 23:35:53 +03:00
Oleg Kalachev
ed51b826a0 docs: add link to jsk-visualization plugins 2018-09-12 21:48:49 +03:00
Oleg Kalachev
bb84eeb35e docs: add some code smippets 2018-09-12 21:30:55 +03:00
Smirnov Artem
8a9fd2a97c Merge pull request #62 from urpylka/uart-article
Add UART article & new UART configure of image
2018-09-12 20:55:04 +03:00
Artem Smirnov
3b49f9a67f image_builder: new configure UART on RPi 2018-09-12 20:50:36 +03:00
Artem Smirnov
2a4faedf67 Add article about UART 2018-09-12 19:28:53 +03:00
Oleg Kalachev
82f7f82f54 Fix 2018-09-12 03:42:26 +03:00
Oleg Kalachev
276922104c Sane settings for rangefinders 2018-09-12 03:39:49 +03:00
Oleg Kalachev
3bd4a6673f Make camera markers node retrieve frame id from camera info 2018-09-12 02:50:36 +03:00
Oleg Kalachev
1909feceba Add experimental optical flow node 2018-09-11 19:30:11 +03:00
Oleg Kalachev
e585341933 Remove fpv_camera arg from sitl.launch 2018-09-11 06:54:08 +03:00
Oleg Kalachev
e87054f0d3 Respawn web server on failure 2018-09-11 04:35:37 +03:00
Oleg Kalachev
6b0bd77d49 selfcheck.py fixes 2018-09-11 04:02:36 +03:00
Oleg Kalachev
77f4cbcdd3 Remove unneeded 2018-09-08 23:40:30 +03:00
Oleg Kalachev
928c5938e9 Set up syntax highlighting in vim for .launch files 2018-09-08 23:38:51 +03:00
Oleg Kalachev
03500d70af selfcheck: add CPU usage checking 2018-09-08 23:37:31 +03:00
Oleg Kalachev
2c30a5361f selfcheck: add boot duration checking 2018-09-08 19:17:18 +03:00
Oleg Kalachev
c59d31fc21 Refactor selfcheck node 2018-09-08 18:45:58 +03:00
Oleg Kalachev
5115ba6d8a Update web_video_server version 2018-09-08 04:47:31 +03:00
Oleg Kalachev
4daab3d286 This is unneeded 2018-09-08 02:08:18 +03:00
Oleg Kalachev
34512e5e49 Deny byobu to check updates and take 100% CPU 2018-09-08 02:07:29 +03:00
Oleg Kalachev
0fddd90e1f clever.launch: remove viz argument from the header 2018-09-08 01:55:13 +03:00
Oleg Kalachev
29b6a58769 Set Monkey workers number to 1 2018-09-08 01:47:03 +03:00
Oleg Kalachev
549b2e3815 Add some plugins to mavros blacklist 2018-09-08 01:32:54 +03:00
Oleg Kalachev
88ef7d7eca Add butterfly web terminal 2018-09-08 01:32:05 +03:00
Oleg Kalachev
d70c3f92ad Remove FPV camera from clever.launch as it is not used 2018-09-08 00:18:21 +03:00
Oleg Kalachev
4a25fed9d5 Add camera visualisation markers node for aligning frame with rviz 2018-09-07 22:22:01 +03:00
Smirnov Artem
6fb4d43500 image_builder: change os version to 2018-06-27
Change base OS version to 2018-06-27-raspbian-stretch-lite
2018-09-06 15:56:15 +03:00
Oleg Kalachev
76dca88b62 image_builder: fix Monkey repository URL 2018-09-05 21:15:06 +03:00
Oleg Kalachev
bc7fb94d63 simple_offboard: fix yaw transformation 2018-09-05 20:30:37 +03:00
Smirnov Artem
2bedc6cd31 image_builder: Set max space for syslogs 2018-09-05 16:01:45 +03:00
Oleg Kalachev
c0f748756b docs: small fix 2018-09-04 22:44:35 +03:00
Oleg Kalachev
181a8aeb1b simple_offboard: default speed for navigate service 2018-09-04 02:23:28 +03:00
Oleg Kalachev
c45f7b8148 Don’t run web server in SITL 2018-09-04 01:52:23 +03:00
Oleg Kalachev
1d21665c16 Add Monkey web server 2018-09-04 01:30:30 +03:00
Oleg Kalachev
b87d3c612b Some fixes to selfcheck 2018-09-04 01:22:49 +03:00
Oleg Kalachev
d6757d67f8 Image builder: disable apt auto-updates 2018-09-03 20:15:11 +03:00
Oleg Kalachev
376e44ec6c simple_offboard: enable ‘navigate_after_armed’ by default 2018-09-01 02:48:53 +03:00
Oleg Kalachev
94402d96ad rc: new icon, version update 2018-08-24 00:36:13 +03:00
Oleg Kalachev
d3a1bf7eb6 Remove web server argument from sitl.launch 2018-08-22 20:50:43 +03:00
Oleg Kalachev
beb9370fc5 Remove web_server node 2018-08-22 18:08:48 +03:00
Svetk0
58ede7e85e Add files via upload 2018-08-21 13:24:52 +03:00
Svetk0
432e60f9cc Add files via upload 2018-08-17 11:47:31 +03:00
Artem Smirnov
b2bc692cc2 image_builder: add manual.sh 2018-08-16 23:40:12 +03:00
259 changed files with 4668 additions and 2967 deletions

View File

@@ -5,7 +5,7 @@ end_of_line = lf
insert_final_newline = true
charset = utf-8
[*.{py,cpp,h,swift,launch}]
[*.{py,swift,launch}]
indent_style = space
indent_size = 4

6
.gitignore vendored
View File

@@ -1,2 +1,6 @@
/deploy/ros_lib/
*.pyc
*.DS_Store
/images
node_modules/
_book/
package-lock.json

View File

@@ -1,8 +1,16 @@
{
"MD003": false,
"MD010": {
"code_blocks": false
},
"MD013": false,
"MD024": false,
"MD026" :{
"punctuation": ".,;:!"
},
"MD033": false,
"MD034": false,
"MD040": false,
"MD044": {
"names": [
"MAVLink",
@@ -13,10 +21,11 @@
"WireShark",
"Wi-Fi",
"Raspberry Pi",
"PixHawk",
"PixRacer",
"Pixhawk",
"Pixracer",
"ArUco"
],
"code_blocks": false
}
},
"MD045": false
}

35
.travis.yml Normal file
View File

@@ -0,0 +1,35 @@
sudo: required
language: generic
services:
- docker
env:
global:
- DOCKER="goldarte/img-tool:builder-mod"
- TARGET_REPO="https://github.com/${TRAVIS_REPO_SLUG}.git"
- if [[ -z ${TRAVIS_TAG} ]]; then IMAGE_VERSION="${TRAVIS_COMMIT}}"; else IMAGE_VERSION="${TRAVIS_TAG}"; fi
- IMAGE_NAME="$(basename -s '.git' ${TARGET_REPO})_${IMAGE_VERSION}.img"
git:
depth: 1
before_script:
- docker pull ${DOCKER}
script:
- docker run --privileged --rm -v /dev:/dev -v $(pwd):/builder/repo -e TRAVIS_TAG="${TRAVIS_TAG}" ${DOCKER}
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"
- sudo chmod -R 777 *
- cd images && zip ${IMAGE_NAME}.zip ${IMAGE_NAME}
deploy:
provider: releases
api_key: ${GITHUB_OAUTH_TOKEN}
file: ${IMAGE_NAME}.zip
skip_cleanup: true
on:
tags: true
# 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

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2018 Copter Express
Copyright (c) 2018 Copter Express Technologies
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -14,7 +14,7 @@ Use it to learn how to assemble, configure, pilot and program autonomous CLEVER
**Preconfigured image for Raspberry Pi 3 with installed and configured software, ready to fly, is available [in the Releases section](https://github.com/CopterExpress/clever/releases).**
[![Build Status](http://builder.coex.space/job/CopterExpress---clever/badge/icon)](http://builder.coex.space/job/CopterExpress---clever/)
[![Build Status](https://travis-ci.org/CopterExpress/clever.svg?branch=master)](https://travis-ci.org/CopterExpress/clever)
Image includes:
@@ -25,7 +25,7 @@ Image includes:
* mavros
* CLEVER software bundle for autonomous drone control
API description (in Russian) for autonomous flights is available [on GitBook](https://copterexpress.gitbooks.io/clever/simple_offboard.html).
API description (in Russian) for autonomous flights is available [on GitBook](https://clever.copterexpress.com/simple_offboard.html).
## Manual installation

View File

@@ -1,2 +0,0 @@
theme: jekyll-theme-cayman
tagline: Конструктор программируемого квадрокоптера

View File

@@ -1,21 +1,12 @@
PODS:
- MarqueeLabel/Swift (3.1.4)
- NotificationBannerSwift (1.5.4):
- MarqueeLabel/Swift
- SnapKit (~> 4.0)
- SnapKit (4.0.0)
- SwiftSocket (2.0.2)
DEPENDENCIES:
- NotificationBannerSwift
- SwiftSocket (~> 2.0)
SPEC CHECKSUMS:
MarqueeLabel: bf768455fe88d427f71476ebb23f9092b660f40b
NotificationBannerSwift: 4f6666c8421dcf11be0812dd1093d932c15921af
SnapKit: a42d492c16e80209130a3379f73596c3454b7694
SwiftSocket: 6f4c9c63fbc5c1d61188936bb3c599fd546f40ae
PODFILE CHECKSUM: fd5199f69c3ee8c1fbc0dd582477d890c8b2a24f
PODFILE CHECKSUM: 2044f57d00f536792fbc38c63ded4fa78dcc135c
COCOAPODS: 1.4.0

View File

@@ -226,16 +226,10 @@
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-cleverrc/Pods-cleverrc-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/MarqueeLabel/MarqueeLabel.framework",
"${BUILT_PRODUCTS_DIR}/NotificationBannerSwift/NotificationBannerSwift.framework",
"${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework",
"${BUILT_PRODUCTS_DIR}/SwiftSocket/SwiftSocket.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MarqueeLabel.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NotificationBannerSwift.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftSocket.framework",
);
runOnlyForDeploymentPostprocessing = 0;
@@ -397,7 +391,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 7QY6KJ2672;
DEVELOPMENT_TEAM = M8TDN3PAH2;
INFOPLIST_FILE = cleverrc/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = coex.cleverrc;
@@ -413,7 +407,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 7QY6KJ2672;
DEVELOPMENT_TEAM = M8TDN3PAH2;
INFOPLIST_FILE = cleverrc/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = coex.cleverrc;

View File

@@ -3,7 +3,7 @@
// cleverrc
//
// Created by Oleg Kalachev on 20.01.2018.
// Copyright © 2018 Copter Express. All rights reserved.
// Copyright © 2018 Copter Express Technologies. All rights reserved.
//
import UIKit

View File

@@ -3,114 +3,176 @@
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "cleverrc40.png",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "clever60.png",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "clever58.png",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "clever87.png",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "clever80.png",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "clever120.png",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "clever120-1.png",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "clever180-1.png",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "clever20.png",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "clever40.png",
"filename" : "Icon-App-20x20@2x-1.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "clever29.png",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "clever58-1.png",
"filename" : "Icon-App-29x29@2x-1.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "clever40-1.png",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "clever80-1.png",
"filename" : "Icon-App-40x40@2x-1.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "clever76.png",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "clever152.png",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "clever167.png",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "clever1024.png",
"filename" : "ItunesArtwork@2x.png",
"scale" : "1x"
},
{
"size" : "24x24",
"idiom" : "watch",
"scale" : "2x",
"role" : "notificationCenter",
"subtype" : "38mm"
},
{
"size" : "27.5x27.5",
"idiom" : "watch",
"scale" : "2x",
"role" : "notificationCenter",
"subtype" : "42mm"
},
{
"size" : "29x29",
"idiom" : "watch",
"role" : "companionSettings",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "watch",
"role" : "companionSettings",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "watch",
"scale" : "2x",
"role" : "appLauncher",
"subtype" : "38mm"
},
{
"size" : "44x44",
"idiom" : "watch",
"scale" : "2x",
"role" : "longLook",
"subtype" : "42mm"
},
{
"size" : "86x86",
"idiom" : "watch",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "38mm"
},
{
"size" : "98x98",
"idiom" : "watch",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "42mm"
},
{
"idiom" : "watch-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"pre-rendered" : true
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 867 B

View File

@@ -1,20 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.1</string>
<key>CFBundleVersion</key>
<string>5</string>
<string>6</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>

View File

@@ -3,13 +3,12 @@
// cleverrc
//
// Created by Oleg Kalachev on 20.01.2018.
// Copyright © 2018 Copter Express. All rights reserved.
// Copyright © 2018 Copter Express Technologies. All rights reserved.
//
import UIKit
import WebKit
import SwiftSocket
import NotificationBannerSwift
import AudioToolbox.AudioServices
class ViewController: UIViewController, WKScriptMessageHandler {

View File

@@ -64,9 +64,19 @@ new ROSLIB.Topic({
var notificationHideTimer;
function notify(text, severity) {
var repeated = notificationsEl.querySelector('.item:first-of-type[data-text=' + text + ']');
if (repeated) {
// don't repeat notifications
var count = repeated.getAttribute('data-count') || 1;
repeated.setAttribute('data-count', ++count);
repeated.innerHTML = text + ' (' + count + ')';
return;
}
var item = document.createElement('div');
item.innerHTML = text;
item.classList.add('item');
item.setAttribute('data-text', text);
notificationsEl.prepend(item);
var itemHeight = item.offsetHeight;
notificationsEl.classList.remove('anim');

View File

@@ -4,59 +4,32 @@
<version>0.0.0</version>
<description>ArUco maps precise pose estimation nodelet</description>
<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
<maintainer email="okalachev@gmail.com">Oleg Kalachev</maintainer>
<license>MIT</license>
<!--url type="website">http://wiki.ros.org/aruco_pose</url-->
<author email="okalachev@gmail.com">Oleg Kalachev</author>
<author email="urpylka@gmail.com">Artem Smirnov</author>
<!-- One license tag required, multiple allowed, one license per tag -->
<!-- Commonly used license strings: -->
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>TODO</license>
<!-- Url tags are optional, but multiple are allowed, one per tag -->
<!-- Optional attribute type can be: website, bugtracker, or repository -->
<!-- Example: -->
<!-- <url type="website">http://wiki.ros.org/aruco_pose</url> -->
<!-- Author tags are optional, multiple are allowed, one per tag -->
<!-- Authors do not have to be maintainers, but could be -->
<!-- Example: -->
<!-- <author email="jane.doe@example.com">Jane Doe</author> -->
<!-- The *_depend tags are used to specify dependencies -->
<!-- Dependencies can be catkin packages or system dependencies -->
<!-- Examples: -->
<!-- Use build_depend for packages you need at compile time: -->
<!-- <build_depend>message_generation</build_depend> -->
<!-- Use buildtool_depend for build tool packages: -->
<!-- <buildtool_depend>catkin</buildtool_depend> -->
<!-- Use run_depend for packages you need at runtime: -->
<!-- <run_depend>message_runtime</run_depend> -->
<!-- Use test_depend for packages you need only for testing: -->
<!-- <test_depend>gtest</test_depend> -->
<buildtool_depend>catkin</buildtool_depend>
<build_depend>nodelet</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>image_transport</build_depend>
<build_depend>cv_bridge</build_depend>
<build_depend>tf</build_depend>
<!-- Use buildtool_depend for build tool packages: -->
<buildtool_depend>catkin</buildtool_depend>
<!-- Use run_depend for packages you need at runtime: -->
<run_depend>nodelet</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>image_transport</run_depend>
<run_depend>cv_bridge</run_depend>
<build_depend>tf</build_depend>
<!-- Use test_depend for packages you need only for testing: -->
<!-- <test_depend>gtest</test_depend> -->
<!-- The export tag contains other, unspecified, tags -->
<export>
<nodelet plugin="${prefix}/nodelet_plugins.xml" />
<nodelet plugin="${prefix}/nodelet_plugins.xml" />
<!-- Other tools can request additional information be placed here -->
</export>
</package>

View File

@@ -4,19 +4,21 @@
"author": "Copter Express",
"language": "ru",
"root": "docs/",
"plugins": ["youtube", "richquotes", "versions", "yametrika"],
"plugins": [
"youtube",
"richquotes@https://github.com/okalachev/gitbook-plugin-richquotes.git",
"yametrika",
"anchors",
"validate-links",
"bulk-redirect@https://github.com/okalachev/gitbook-plugin-bulk-redirect.git"
],
"pluginsConfig": {
"disqus": {
"shortName": "coex-clever"
},
"versions": {
"type": "tags"
},
"yametrika": {
"id": 49359238
},
"bulk-redirect": {
"basepath": "/",
"redirectsFile": "redirects.json"
}
},
"structure": {
"glossary": "_GLOSSARY.md"
}
}

View File

@@ -0,0 +1,6 @@
[Unit]
Description=Butterfly Terminal Server
[Service]
ExecStart=/usr/local/bin/butterfly.server.py --host="0.0.0.0" --unsecure
User=pi

View File

@@ -0,0 +1,5 @@
[Socket]
ListenStream=57575
[Install]
WantedBy=sockets.target

View File

@@ -4,7 +4,7 @@ Requires=roscore.service
After=roscore.service
[Service]
EnvironmentFile=/home/pi/catkin_ws/src/clever/deploy/roscore.env
EnvironmentFile=/lib/systemd/system/roscore.env
ExecStart=/opt/ros/kinetic/bin/roslaunch clever clever.launch --wait
Restart=on-abort

View File

@@ -0,0 +1,78 @@
#! /usr/bin/env bash
#
# Script for build the image. Used builder script of the target repo
# For build: docker run --privileged -it --rm -v /dev:/dev -v $(pwd):/builder/repo smirart/builder
#
# Copyright (C) 2018 Copter Express Technologies
#
# Author: Artem Smirnov <urpylka@gmail.com>
#
set -e # Exit immidiately on non-zero result
echo_stamp() {
# TEMPLATE: echo_stamp <TEXT> <TYPE>
# TYPE: SUCCESS, ERROR, INFO
# More info there https://www.shellhacks.com/ru/bash-colors/
TEXT="$(date '+[%Y-%m-%d %H:%M:%S]') $1"
TEXT="\e[1m$TEXT\e[0m" # BOLD
case "$2" in
SUCCESS)
TEXT="\e[32m${TEXT}\e[0m";; # GREEN
ERROR)
TEXT="\e[31m${TEXT}\e[0m";; # RED
*)
TEXT="\e[34m${TEXT}\e[0m";; # BLUE
esac
echo -e ${TEXT}
}
##################################################
# Configure hardware interfaces
##################################################
# 1. Enable sshd
echo_stamp "#1 Turn on sshd"
touch /boot/ssh
# /usr/bin/raspi-config nonint do_ssh 0
# 2. Enable GPIO
echo_stamp "#2 GPIO enabled by default"
# 3. Enable I2C
echo_stamp "#3 Turn on I2C"
/usr/bin/raspi-config nonint do_i2c 0
# 4. Enable SPI
echo_stamp "#4 Turn on SPI"
/usr/bin/raspi-config nonint do_spi 0
# 5. Enable raspicam
echo_stamp "#5 Turn on raspicam"
/usr/bin/raspi-config nonint do_camera 0
# 6. Enable hardware UART
echo_stamp "#6 Turn on UART"
# Temporary solution
# https://github.com/RPi-Distro/raspi-config/pull/75
/usr/bin/raspi-config nonint do_serial 1
/usr/bin/raspi-config nonint set_config_var enable_uart 1 /boot/config.txt
/usr/bin/raspi-config nonint set_config_var dtoverlay pi3-disable-bt /boot/config.txt
systemctl disable hciuart.service
# After adding to Raspbian OS
# https://github.com/RPi-Distro/raspi-config/commit/d6d9ecc0d9cbe4aaa9744ae733b9cb239e79c116
#/usr/bin/raspi-config nonint do_serial 2
# 7. Enable V4L driver http://robocraft.ru/blog/electronics/3158.html
#echo "bcm2835-v4l2" >> /etc/modules
echo_stamp "#7 Turn on v4l2 driver"
if ! grep -q "^bcm2835-v4l2" /etc/modules;
then printf "bcm2835-v4l2\n" >> /etc/modules
fi
echo_stamp "#8 End of configure hardware interfaces"

14
builder/assets/index.html Normal file
View File

@@ -0,0 +1,14 @@
<h1>CLEVER Drone Kit Tools</h1>
<ul>
<!-- <li><a href="">View user reference</a> (<a href="http://clever.copterexpress.com">http://clever.copterexpress.com</a> snapshot)</li> -->
<li><a href="" id="wvs">View image topics</a> (<code>web_video_server</code>)</li>
<li><a href="" id="butterfly">Open web terminal</a> (<code>Butterfly</code>)</li>
<li><a href="/docs">Documentation</a> (<code>gitbook</code>)</li>
<!-- <li><a href="viz.html">View 3D visualization</a> (<code>ros3djs</code>)</li> -->
</ul>
<script type="text/javascript">
document.querySelector("#wvs").href = location.origin + ':8080';
document.querySelector("#butterfly").href = location.origin + ':57575';
</script>

43
builder/assets/init_rpi.sh Executable file
View File

@@ -0,0 +1,43 @@
#! /usr/bin/env bash
#
# Script for build the image. Used builder script of the target repo
# For build: docker run --privileged -it --rm -v /dev:/dev -v $(pwd):/builder/repo smirart/builder
#
# Copyright (C) 2018 Copter Express Technologies
#
# Author: Artem Smirnov <urpylka@gmail.com>
#
set -e # Exit immidiately on non-zero result
echo_stamp() {
# TEMPLATE: echo_stamp <TEXT> <TYPE>
# TYPE: SUCCESS, ERROR, INFO
# More info there https://www.shellhacks.com/ru/bash-colors/
TEXT="$(date '+[%Y-%m-%d %H:%M:%S]') $1"
TEXT="\e[1m$TEXT\e[0m" # BOLD
case "$2" in
SUCCESS)
TEXT="\e[32m${TEXT}\e[0m";; # GREEN
ERROR)
TEXT="\e[31m${TEXT}\e[0m";; # RED
*)
TEXT="\e[34m${TEXT}\e[0m";; # BLUE
esac
echo -e ${TEXT}
}
echo_stamp "Rename SSID"
sudo sed -i.OLD "s/CLEVER/CLEVER-$(head -c 100 /dev/urandom | xxd -ps -c 100 | sed -e 's/[^0-9]//g' | cut -c 1-4)/g" /etc/wpa_supplicant/wpa_supplicant.conf
echo_stamp "Harware setup"
/root/hardware_setup.sh
echo_stamp "Remove init scripts"
rm /root/init_rpi.sh /root/hardware_setup.sh
echo_stamp "End of initialization of the image"

View File

@@ -418,10 +418,6 @@
local-name: nodelet_core/nodelet
uri: https://github.com/ros-gbp/nodelet_core-release/archive/release/kinetic/nodelet/1.9.14-0.tar.gz
version: nodelet_core-release-release-kinetic-nodelet-1.9.14-0
- tar:
local-name: opencv3
uri: https://github.com/ros-gbp/opencv3-release/archive/release/kinetic/opencv3/3.3.1-5.tar.gz
version: opencv3-release-release-kinetic-opencv3-3.3.1-5
- tar:
local-name: orocos_kinematics_dynamics/orocos_kdl
uri: https://github.com/smits/orocos-kdl-release/archive/release/kinetic/orocos_kdl/1.3.1-0.tar.gz
@@ -676,5 +672,5 @@
version: vision_opencv-release-release-kinetic-cv_bridge-1.12.8-0
- tar:
local-name: web_video_server
uri: https://github.com/RobotWebTools-release/web_video_server-release/archive/release/kinetic/web_video_server/0.0.7-0.tar.gz
version: web_video_server-release-release-kinetic-web_video_server-0.0.7-0
uri: https://github.com/RobotWebTools-release/web_video_server-release/archive/release/kinetic/web_video_server/0.1.0-0.tar.gz
version: web_video_server-release-release-kinetic-web_video_server-0.1.0-0

View File

@@ -0,0 +1,528 @@
actionlib:
debian:
stretch: [ros-kinetic-actionlib]
actionlib_msgs:
debian:
stretch: [ros-kinetic-actionlib-msgs]
angles:
debian:
stretch: [ros-kinetic-angles]
async_web_server_cpp:
debian:
stretch: [ros-kinetic-async-web-server-cpp]
bond:
debian:
stretch: [ros-kinetic-bond]
bondcpp:
debian:
stretch: [ros-kinetic-bondcpp]
bondpy:
debian:
stretch: [ros-kinetic-bondpy]
camera_calibration_parsers:
debian:
stretch: [ros-kinetic-camera-calibration-parsers]
camera_info_manager:
debian:
stretch: [ros-kinetic-camera-info-manager]
catkin:
debian:
stretch: [ros-kinetic-catkin]
class_loader:
debian:
stretch: [ros-kinetic-class-loader]
cmake_modules:
debian:
stretch: [ros-kinetic-cmake-modules]
cpp_common:
debian:
stretch: [ros-kinetic-cpp-common]
cv_bridge:
debian:
stretch: [ros-kinetic-cv-bridge]
cv_camera:
debian:
stretch: [ros-kinetic-cv-camera=0.3.1-0stretch]
diagnostic_msgs:
debian:
stretch: [ros-kinetic-diagnostic-msgs]
diagnostic_updater:
debian:
stretch: [ros-kinetic-diagnostic-updater]
eigen_conversions:
debian:
stretch: [ros-kinetic-eigen-conversions]
gencpp:
debian:
stretch: [ros-kinetic-gencpp]
geneus:
debian:
stretch: [ros-kinetic-geneus]
genlisp:
debian:
stretch: [ros-kinetic-genlisp]
genmsg:
debian:
stretch: [ros-kinetic-genmsg]
gennodejs:
debian:
stretch: [ros-kinetic-gennodejs]
genpy:
debian:
stretch: [ros-kinetic-genpy]
geographic_msgs:
debian:
stretch: [ros-kinetic-geographic-msgs]
geometry_msgs:
debian:
stretch: [ros-kinetic-geometry-msgs]
image_transport:
debian:
stretch: [ros-kinetic-image-transport]
libmavconn:
debian:
stretch: [ros-kinetic-libmavconn]
lxml:
debian:
stretch: [python-lxml=3.7.1-1]
mavlink:
debian:
stretch: [ros-kinetic-mavlink]
mavros:
debian:
stretch: [ros-kinetic-mavros]
mavros_msgs:
debian:
stretch: [ros-kinetic-mavros-msgs]
mavros_extras:
debian:
stretch: [ros-kinetic-mavros-extras]
message_filters:
debian:
stretch: [ros-kinetic-message-filters]
message_generation:
debian:
stretch: [ros-kinetic-message-generation]
message_runtime:
debian:
stretch: [ros-kinetic-message-runtime]
mjpg-streamer:
debian:
stretch: [mjpg-streamer=2.0]
mk:
debian:
stretch: [ros-kinetic-mk]
nav_msgs:
debian:
stretch: [ros-kinetic-nav-msgs]
nodelet:
debian:
stretch: [ros-kinetic-nodelet]
opencv3:
debian:
stretch: [ros-kinetic-opencv3]
orocos_kdl:
debian:
stretch: [ros-kinetic-orocos-kdl]
pluginlib:
debian:
stretch: [ros-kinetic-pluginlib]
python_orocos_kdl:
debian:
stretch: [ros-kinetic-python-orocos-kdl]
ros:
debian:
stretch: [ros-kinetic-ros]
ros_comm:
debian:
stretch: [ros-kinetic-ros-comm]
ros_environment:
debian:
stretch: [ros-kinetic-ros-environment]
rosapi:
debian:
stretch: [ros-kinetic-rosapi]
rosauth:
debian:
stretch: [ros-kinetic-rosauth]
rosbag:
debian:
stretch: [ros-kinetic-rosbag]
rosbag_migration_rule:
debian:
stretch: [ros-kinetic-rosbag-migration-rule]
rosbag_storage:
debian:
stretch: [ros-kinetic-rosbag-storage]
rosbash:
debian:
stretch: [ros-kinetic-rosbash]
rosboost_cfg:
debian:
stretch: [ros-kinetic-rosboost-cfg]
rosbridge_library:
debian:
stretch: [ros-kinetic-rosbridge-library]
rosbridge_server:
debian:
stretch: [ros-kinetic-rosbridge-server]
rosbuild:
debian:
stretch: [ros-kinetic-rosbuild]
rosclean:
debian:
stretch: [ros-kinetic-rosclean]
rosconsole:
debian:
stretch: [ros-kinetic-rosconsole]
rosconsole_bridge:
debian:
stretch: [ros-kinetic-rosconsole-bridge]
roscpp:
debian:
stretch: [ros-kinetic-roscpp]
roscpp_serialization:
debian:
stretch: [ros-kinetic-roscpp-serialization]
roscpp_traits:
debian:
stretch: [ros-kinetic-roscpp-traits]
roscreate:
debian:
stretch: [ros-kinetic-roscreate]
rosgraph:
debian:
stretch: [ros-kinetic-rosgraph]
rosgraph_msgs:
debian:
stretch: [ros-kinetic-rosgraph-msgs]
roslang:
debian:
stretch: [ros-kinetic-roslang]
roslaunch:
debian:
stretch: [ros-kinetic-roslaunch]
roslib:
debian:
stretch: [ros-kinetic-roslib]
roslint:
debian:
stretch: [ros-kinetic-roslint]
roslisp:
debian:
stretch: [ros-kinetic-roslisp]
roslz4:
debian:
stretch: [ros-kinetic-roslz4]
rosmake:
debian:
stretch: [ros-kinetic-rosmake]
rosmaster:
debian:
stretch: [ros-kinetic-rosmaster]
rosmsg:
debian:
stretch: [ros-kinetic-rosmsg]
rosnode:
debian:
stretch: [ros-kinetic-rosnode]
rosout:
debian:
stretch: [ros-kinetic-rosout]
rospack:
debian:
stretch: [ros-kinetic-rospack]
rosparam:
debian:
stretch: [ros-kinetic-rosparam]
rospy:
debian:
stretch: [ros-kinetic-rospy]
rospy_tutorials:
debian:
stretch: [ros-kinetic-rospy-tutorials]
rosserial_client:
debian:
stretch: [ros-kinetic-rosserial-client]
rosserial_msgs:
debian:
stretch: [ros-kinetic-rosserial-msgs]
rosserial_python:
debian:
stretch: [ros-kinetic-rosserial-python]
rosservice:
debian:
stretch: [ros-kinetic-rosservice]
rostest:
debian:
stretch: [ros-kinetic-rostest]
rostime:
debian:
stretch: [ros-kinetic-rostime]
rostopic:
debian:
stretch: [ros-kinetic-rostopic]
rosunit:
debian:
stretch: [ros-kinetic-rosunit]
roswtf:
debian:
stretch: [ros-kinetic-roswtf]
sensor_msgs:
debian:
stretch: [ros-kinetic-sensor-msgs]
smclib:
debian:
stretch: [ros-kinetic-smclib]
std_msgs:
debian:
stretch: [ros-kinetic-std-msgs]
std_srvs:
debian:
stretch: [ros-kinetic-std-srvs]
stereo_msgs:
debian:
stretch: [ros-kinetic-stereo-msgs]
tf2:
debian:
stretch: [ros-kinetic-tf2]
tf2_bullet:
debian:
stretch: [ros-kinetic-tf2-bullet]
tf2_eigen:
debian:
stretch: [ros-kinetic-tf2-eigen]
tf2_geometry_msgs:
debian:
stretch: [ros-kinetic-tf2-geometry-msgs]
tf2_kdl:
debian:
stretch: [ros-kinetic-tf2-kdl]
tf2_msgs:
debian:
stretch: [ros-kinetic-tf2-msgs]
tf2_py:
debian:
stretch: [ros-kinetic-tf2-py]
tf2_ros:
debian:
stretch: [ros-kinetic-tf2-ros]
tf2_sensor_msgs:
debian:
stretch: [ros-kinetic-tf2-sensor-msgs]
tf2_tools:
debian:
stretch: [ros-kinetic-tf2-tools]
tf:
debian:
stretch: [ros-kinetic-tf]
topic_tools:
debian:
stretch: [ros-kinetic-topic-tools]
trajectory_msgs:
debian:
stretch: [ros-kinetic-trajectory-msgs]
urdf:
debian:
stretch: [ros-kinetic-urdf]
urdf_parser_plugin:
debian:
stretch: [ros-kinetic-urdf-parser-plugin]
uuid_msgs:
debian:
stretch: [ros-kinetic-uuid-msgs]
visualization_msgs:
debian:
stretch: [ros-kinetic-visualization-msgs]
xmlrpcpp:
debian:
stretch: [ros-kinetic-xmlrpcpp]
boost:
debian:
stretch: [libboost-all-dev]
bullet:
debian:
stretch: [libbullet-dev]
bzip2:
debian:
stretch: [libbz2-dev]
cmake:
debian:
stretch: [cmake]
cppunit:
debian:
stretch: [libcppunit-dev]
eigen:
debian:
stretch: [libeigen3-dev]
geographiclib-tools:
debian:
stretch: [geographiclib-tools]
geographiclib:
debian:
stretch: [libgeographic-dev]
google-mock:
debian:
stretch: [google-mock]
graphviz:
debian:
stretch: [graphviz]
gtest:
debian:
stretch: [libgtest-dev]
libconsole-bridge-dev:
debian:
stretch: [libconsole-bridge-dev]
libjpeg:
debian:
stretch: [libjpeg-dev]
libpng-dev:
debian:
stretch: [libpng-dev]
libpoco-dev:
debian:
stretch: [libpoco-dev]
libssl-dev:
debian:
stretch: [libssl-dev]
libtiff-dev:
debian:
stretch: [libtiff5-dev]
liburdfdom-dev:
debian:
stretch: [liburdfdom-dev]
liburdfdom-headers-dev:
debian:
stretch: [liburdfdom-headers-dev]
libv4l-dev:
debian:
stretch: [libv4l-dev]
libvtk-qt:
debian:
stretch: [libvtk6-qt-dev]
libwebp-dev:
debian:
stretch: [libwebp-dev]
log4cxx:
debian:
stretch: [liblog4cxx-dev]
lz4:
debian:
stretch: [liblz4-dev]
pkg-config:
debian:
stretch: [pkg-config]
protobuf:
debian:
stretch: [libprotobuf10]
python-bson:
debian:
stretch: [python-bson]
python-catkin-pkg:
debian:
stretch: [python-catkin-pkg]
python-coverage:
debian:
stretch: [python-coverage]
python-defusedxml:
debian:
stretch: [python-defusedxml]
python-empy:
debian:
stretch: [python-empy]
python-future:
debian:
stretch: [python-future]
python-imaging:
debian:
stretch: [python-imaging]
python-lxml:
debian:
stretch: [python-lxml]
python-mock:
debian:
stretch: [python-mock]
python-netifaces:
debian:
stretch: [python-netifaces]
python-nose:
debian:
stretch: [python-nose]
python-numpy:
debian:
stretch: [python-numpy]
python-paramiko:
debian:
stretch: [python-paramiko]
python-rosdep:
debian:
stretch: [python-rosdep]
python-rospkg:
debian:
stretch: [python-rospkg]
python-serial:
debian:
stretch: [python-serial]
python-setuptools:
debian:
stretch: [python-setuptools]
python-sip:
debian:
stretch: [python-sip-dev]
python-tornado:
debian:
stretch: [python-tornado]
python-twisted-core:
debian:
stretch: [python-twisted-core]
python-websocket:
debian:
stretch: [python-websocket]
python-wxtools:
debian:
stretch: [python-wxtools]
python-yaml:
debian:
stretch: [python-yaml]
python:
debian:
stretch: [python-dev]
sbcl:
debian:
stretch: [sbcl]
tinyxml2:
debian:
stretch: [libtinyxml2-dev]
tinyxml:
debian:
stretch: [libtinyxml-dev]
uuid:
debian:
stretch: [uuid-dev]
web_video_server:
debian:
stretch: [ros-kinetic-web-video-server]
v4l-utils:
debian:
stretch: [v4l-utils]
yaml-cpp:
debian:
stretch: [libyaml-cpp-dev]
zlib:
debian:
stretch: [zlib1g-dev]
compressed_depth_image_transport:
debian:
stretch: [ros-kinetic-compressed-depth-image-transport]
compressed_image_transport:
debian:
stretch: [ros-kinetic-compressed-image-transport]
dynamic_reconfigure:
debian:
stretch: [ros-kinetic-dynamic-reconfigure]
theora_image_transport:
debian:
stretch: [ros-kinetic-theora-image-transport]
libogg:
debian:
stretch: [libtheora0=1.1.1+dfsg.1-14]

View File

@@ -0,0 +1,57 @@
# Default Host - Configuration
# ============================
# Here the variable principals of the program are defined in respect
# to the configuration of the different types of directives.
[HOST]
# ServerName:
# -----------
# Allow you to set a host and domain name (e.g monkey.linuxchile.cl). If
# you are working in a local network just set your IP address or if you
# are working like localhost set your loopback address (127.0.0.1).
ServerName 0.0.0.0
# DocumentRoot:
# -------------
# This variable corresponds to the location of the main server directory
# of the web pages, where the files of your site are located.
#
# Example:
# DocumentRoot /home/krypton/htdocs
DocumentRoot /usr/share/monkey-static
# Redirect:
# ---------
# Under specific conditions, you may want the server performs a HTTP
# redirect when this Virtual Host is reach. If that is the case, append
# to the Redirect key the value of the address where to redirect the
# HTTP client.
#
# Redirect http://monkey-project.com
[LOGGER]
# AccessLog:
# ----------
# Registration file of correct request.
AccessLog /var/log/monkey-clever/access.log
# ErrorLog:
# ---------
# Registration file of incorrect request.
ErrorLog /var/log/monkey-clever/error.log
[ERROR_PAGES]
404 404.html
[HANDLERS]
# FastCGI
# =======
# Match /.*\.php fastcgi
# CGI
# ===
# Match /cgi-bin/.*\.cgi cgi

View File

@@ -0,0 +1,9 @@
[Unit]
Description=Monkey web-server
[Service]
ExecStart=/usr/sbin/monkey --port 80 --workers 1
Restart=on-abort
[Install]
WantedBy=multi-user.target

View File

@@ -3,7 +3,7 @@ Description=Launcher for the ROS master, parameter server and rosout logging nod
After=network.target
[Service]
EnvironmentFile=/home/pi/catkin_ws/src/clever/deploy/roscore.env
EnvironmentFile=/lib/systemd/system/roscore.env
ExecStart=/opt/ros/kinetic/bin/roscore
Restart=on-abort

115
builder/image-build.sh Executable file
View File

@@ -0,0 +1,115 @@
#! /usr/bin/env bash
#
# Script for build the image. Used builder script of the target repo
# For build: docker run --privileged -it --rm -v /dev:/dev -v $(pwd):/builder/repo smirart/builder
#
# Copyright (C) 2018 Copter Express Technologies
#
# Author: Artem Smirnov <urpylka@gmail.com>
#
set -e # Exit immidiately on non-zero result
SOURCE_IMAGE="http://repo.coex.space/2018-06-27-raspbian-stretch-lite.zip"
export DEBIAN_FRONTEND=${DEBIAN_FRONTEND:='noninteractive'}
export LANG=${LANG:='C.UTF-8'}
export LC_ALL=${LC_ALL:='C.UTF-8'}
echo_stamp() {
# TEMPLATE: echo_stamp <TEXT> <TYPE>
# TYPE: SUCCESS, ERROR, INFO
# More info there https://www.shellhacks.com/ru/bash-colors/
TEXT="$(date '+[%Y-%m-%d %H:%M:%S]') $1"
TEXT="\e[1m$TEXT\e[0m" # BOLD
case "$2" in
SUCCESS)
TEXT="\e[32m${TEXT}\e[0m";; # GREEN
ERROR)
TEXT="\e[31m${TEXT}\e[0m";; # RED
*)
TEXT="\e[34m${TEXT}\e[0m";; # BLUE
esac
echo -e ${TEXT}
}
BUILDER_DIR="/builder"
REPO_DIR="${BUILDER_DIR}/repo"
SCRIPTS_DIR="${REPO_DIR}/builder"
IMAGES_DIR="${REPO_DIR}/images"
[[ ! -d ${SCRIPTS_DIR} ]] && (echo_stamp "Directory ${SCRIPTS_DIR} doesn't exist" "ERROR"; exit 1)
[[ ! -d ${IMAGES_DIR} ]] && mkdir ${IMAGES_DIR} && echo_stamp "Directory ${IMAGES_DIR} was created successful" "SUCCESS"
if [[ -z ${TRAVIS_TAG} ]]; then IMAGE_VERSION="$(cd ${REPO_DIR}; git log --format=%h -1)"; else IMAGE_VERSION="${TRAVIS_TAG}"; fi
# IMAGE_VERSION="${TRAVIS_TAG:=$(cd ${REPO_DIR}; git log --format=%h -1)}"
REPO_URL="$(cd ${REPO_DIR}; git remote --verbose | grep origin | grep fetch | cut -f2 | cut -d' ' -f1 | sed 's/git@github\.com\:/https\:\/\/github.com\//')"
REPO_NAME="$(basename -s '.git' ${REPO_URL})"
IMAGE_NAME="${REPO_NAME}_${IMAGE_VERSION}.img"
IMAGE_PATH="${IMAGES_DIR}/${IMAGE_NAME}"
get_image() {
# TEMPLATE: get_image <IMAGE_PATH> <RPI_DONWLOAD_URL>
local BUILD_DIR=$(dirname $1)
local RPI_ZIP_NAME=$(basename $2)
local RPI_IMAGE_NAME=$(echo ${RPI_ZIP_NAME} | sed 's/zip/img/')
if [ ! -e "${BUILD_DIR}/${RPI_ZIP_NAME}" ]; then
echo_stamp "Downloading original Linux distribution" \
&& wget -nv -O ${BUILD_DIR}/${RPI_ZIP_NAME} $2 \
&& echo_stamp "Downloading complete" "SUCCESS" \
|| (echo_stamp "Downloading was failed!" "ERROR"; exit 1)
else echo_stamp "Linux distribution already donwloaded"; fi
echo_stamp "Unzipping Linux distribution image" \
&& unzip -p ${BUILD_DIR}/${RPI_ZIP_NAME} ${RPI_IMAGE_NAME} > $1 \
&& echo_stamp "Unzipping complete" "SUCCESS" \
|| (echo_stamp "Unzipping was failed!" "ERROR"; exit 1)
}
get_image ${IMAGE_PATH} ${SOURCE_IMAGE}
# Make free space
${BUILDER_DIR}/image-resize.sh ${IMAGE_PATH} max '7G'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/init_rpi.sh' '/root/'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/hardware_setup.sh' '/root/'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-init.sh' ${IMAGE_VERSION} ${SOURCE_IMAGE}
# Monkey
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/monkey-clever' '/root/'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/index.html' '/usr/share/monkey-static/'
# Gitbook
apt-get install -y curl gnupg
curl -sL https://deb.nodesource.com/setup_11.x | bash -
apt-get install -y nodejs
npm install gitbook-cli -g
gitbook build ${REPO_DIR}'/docs'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${REPO_DIR}'/docs/_book/' '/usr/share/monkey-static/docs/'
# Butterfly
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/butterfly.service' '/lib/systemd/system/'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/butterfly.socket' '/lib/systemd/system/'
${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'
# network setup
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-network.sh'
# If RPi then use a one thread to build a ROS package on RPi, else use all
[[ $(arch) == 'armv7l' ]] && NUMBER_THREADS=1 || NUMBER_THREADS=$(nproc --all)
# Clever
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/clever.service' '/lib/systemd/system/'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/roscore.env' '/lib/systemd/system/'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/roscore.service' '/lib/systemd/system/'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/kinetic-rosdep-clever.yaml' '/etc/ros/rosdep/'
# ${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/kinetic-ros-clever.rosinstall' '/home/pi/ros_catkin_ws/'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-ros.sh' ${REPO_URL} ${IMAGE_VERSION} false false ${NUMBER_THREADS}
${BUILDER_DIR}/image-resize.sh ${IMAGE_PATH}

54
builder/image-init.sh Executable file
View File

@@ -0,0 +1,54 @@
#! /usr/bin/env bash
#
# Script for initialisation image
#
# Copyright (C) 2018 Copter Express Technologies
#
# Author: Artem Smirnov <urpylka@gmail.com>
#
set -e # Exit immidiately on non-zero result
echo_stamp() {
# TEMPLATE: echo_stamp <TEXT> <TYPE>
# TYPE: SUCCESS, ERROR, INFO
# More info there https://www.shellhacks.com/ru/bash-colors/
TEXT="$(date '+[%Y-%m-%d %H:%M:%S]') $1"
TEXT="\e[1m$TEXT\e[0m" # BOLD
case "$2" in
SUCCESS)
TEXT="\e[32m${TEXT}\e[0m";; # GREEN
ERROR)
TEXT="\e[31m${TEXT}\e[0m";; # RED
*)
TEXT="\e[34m${TEXT}\e[0m";; # BLUE
esac
echo -e ${TEXT}
}
echo_stamp "Write CLEVER information"
# Clever image version
echo "$1" >> /etc/clever_version
# Origin image file name
echo "${2%.*}" >> /etc/clever_origin
echo_stamp "Write magic script to /etc/rc.local"
MAGIC_SCRIPT="sudo /root/init_rpi.sh; sudo sed -i '/sudo \\\/root\\\/init_rpi.sh/d' /etc/rc.local && sudo reboot"
sed -i "19a${MAGIC_SCRIPT}" /etc/rc.local
# It needs for autosizer.sh & maybe that is correct
echo_stamp "Change boot partition"
sed -i 's/root=[^ ]*/root=\/dev\/mmcblk0p2/' /boot/cmdline.txt
sed -i 's/.* \/boot vfat defaults 0 2$/\/dev\/mmcblk0p1 \/boot vfat defaults 0 2/' /etc/fstab
sed -i 's/.* \/ ext4 defaults,noatime 0 1$/\/dev\/mmcblk0p2 \/ ext4 defaults,noatime 0 1/' /etc/fstab
echo_stamp "Set max space for syslogs"
# https://unix.stackexchange.com/questions/139513/how-to-clear-journalctl
sed -i 's/#SystemMaxUse=/SystemMaxUse=200M/' /etc/systemd/journald.conf
echo_stamp "End of init image"

73
builder/image-network.sh Executable file
View File

@@ -0,0 +1,73 @@
#! /usr/bin/env bash
#
# Script for network configure
#
# Copyright (C) 2018 Copter Express Technologies
#
# Author: Artem Smirnov <urpylka@gmail.com>
#
set -e # Exit immidiately on non-zero result
echo_stamp() {
# TEMPLATE: echo_stamp <TEXT> <TYPE>
# TYPE: SUCCESS, ERROR, INFO
# More info there https://www.shellhacks.com/ru/bash-colors/
TEXT="$(date '+[%Y-%m-%d %H:%M:%S]') $1"
TEXT="\e[1m$TEXT\e[0m" # BOLD
case "$2" in
SUCCESS)
TEXT="\e[32m${TEXT}\e[0m";; # GREEN
ERROR)
TEXT="\e[31m${TEXT}\e[0m";; # RED
*)
TEXT="\e[34m${TEXT}\e[0m";; # BLUE
esac
echo -e ${TEXT}
}
echo_stamp "#1 Write to /etc/wpa_supplicant/wpa_supplicant.conf"
# TODO: Use wpa_cli insted direct file edit
cat << EOF >> /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="CLEVER"
psk="cleverwifi"
mode=2
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP
auth_alg=OPEN
}
EOF
echo_stamp "#2 Write STATIC to /etc/dhcpcd.conf"
cat << EOF >> /etc/dhcpcd.conf
interface wlan0
static ip_address=192.168.11.1/24
EOF
echo_stamp "#3 Write dhcp-config to /etc/dnsmasq.conf"
cat << EOF >> /etc/dnsmasq.conf
interface=wlan0
address=/clever/coex/192.168.11.1
dhcp-range=192.168.11.100,192.168.11.200,12h
no-hosts
filterwin2k
bogus-priv
domain-needed
quiet-dhcp6
EOF
#echo_stamp "#4 Write magic script for rename SSID to /etc/rc.local"
#RENAME_SSID="sudo sed -i.OLD \"s/CLEVER/CLEVER-\$(head -c 100 /dev/urandom | xxd -ps -c 100 | sed -e 's/[^0-9]//g' | cut -c 1-4)/g\" /etc/wpa_supplicant/wpa_supplicant.conf && sudo sed -i '/sudo sed/d' /etc/rc.local && sudo reboot"
#sed -i "19a$RENAME_SSID" /etc/rc.local
echo_stamp "#5 End of network installation"

176
builder/image-ros.sh Executable file
View File

@@ -0,0 +1,176 @@
#! /usr/bin/env bash
#
# Script for build the image. Used builder script of the target repo
# For build: docker run --privileged -it --rm -v /dev:/dev -v $(pwd):/builder/repo smirart/builder
#
# Copyright (C) 2018 Copter Express Technologies
#
# Author: Artem Smirnov <urpylka@gmail.com>
#
set -e # Exit immidiately on non-zero result
REPO=$1
REF=$2
INSTALL_ROS_PACK_SOURCES=$3
DISCOVER_ROS_PACK=$4
NUMBER_THREADS=$5
echo_stamp() {
# TEMPLATE: echo_stamp <TEXT> <TYPE>
# TYPE: SUCCESS, ERROR, INFO
# More info there https://www.shellhacks.com/ru/bash-colors/
TEXT="$(date '+[%Y-%m-%d %H:%M:%S]') $1"
TEXT="\e[1m$TEXT\e[0m" # BOLD
case "$2" in
SUCCESS)
TEXT="\e[32m${TEXT}\e[0m";; # GREEN
ERROR)
TEXT="\e[31m${TEXT}\e[0m";; # RED
*)
TEXT="\e[34m${TEXT}\e[0m";; # BLUE
esac
echo -e ${TEXT}
}
# https://gist.github.com/letmaik/caa0f6cc4375cbfcc1ff26bd4530c2a3
# https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/templates/header.sh
my_travis_retry() {
local result=0
local count=1
while [ $count -le 3 ]; do
[ $result -ne 0 ] && {
echo -e "\n${ANSI_RED}The command \"$@\" failed. Retrying, $count of 3.${ANSI_RESET}\n" >&2
}
# ! { } ignores set -e, see https://stackoverflow.com/a/4073372
! { "$@"; result=$?; }
[ $result -eq 0 ] && break
count=$(($count + 1))
sleep 1
done
[ $count -gt 3 ] && {
echo -e "\n${ANSI_RED}The command \"$@\" failed 3 times.${ANSI_RESET}\n" >&2
}
return $result
}
# TODO: 'kinetic-rosdep-clever.yaml' should add only if we use our repo?
echo_stamp "Init rosdep" \
&& rosdep init \
&& echo "yaml file:///etc/ros/rosdep/kinetic-rosdep-clever.yaml" >> /etc/ros/rosdep/sources.list.d/20-default.list \
&& rosdep update
resolve_rosdep() {
# TEMPLATE: resolve_rosdep <CATKIN_PATH> <ROS_DISTRO> <OS_DISTRO> <OS_VERSION>
CATKIN_PATH=$1
ROS_DISTRO='kinetic'
OS_DISTRO='debian'
OS_VERSION='stretch'
echo_stamp "Installing dependencies apps with rosdep in ${CATKIN_PATH}"
cd ${CATKIN_PATH}
my_travis_retry rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -r --os=${OS_DISTRO}:${OS_VERSION}
}
INSTALL_ROS_PACK_SOURCES=${INSTALL_ROS_PACK_SOURCES:='false'}
if [ "${INSTALL_ROS_PACK_SOURCES}" = "true" ]; then
DISCOVER_ROS_PACK=${DISCOVER_ROS_PACK:='true'}
if [ "${DISCOVER_ROS_PACK}" = "false" ]; then
echo_stamp "Preparing ros_comm packages to kinetic-ros_comm-wet.rosinstall" \
&& mkdir -p /home/pi/ros_catkin_ws && cd /home/pi/ros_catkin_ws \
&& rosinstall_generator ros_comm --rosdistro kinetic --deps --wet-only --tar > kinetic-ros_comm-wet.rosinstall \
&& wstool init -j${NUMBER_THREADS} src kinetic-ros_comm-wet.rosinstall \
&& echo_stamp "All roscomm sources was installed!" "SUCCESS" \
|| (echo_stamp "Some roscomm sources installation was failed!" "ERROR"; exit 1)
echo_stamp "Preparing other ROS-packages to kinetic-custom_ros.rosinstall" \
&& cd /home/pi/ros_catkin_ws \
&& rosinstall_generator \
actionlib actionlib_msgs angles async_web_server_cpp bond bond_core bondcpp bondpy camera_calibration_parsers camera_info_manager catkin class_loader cmake_modules cpp_common cv_bridge cv_camera diagnostic_msgs diagnostic_updater dynamic_reconfigure eigen_conversions gencpp geneus genlisp genmsg gennodejs genpy geographic_msgs geometry_msgs geometry2 image_transport compressed_image_transport libmavconn mavlink mavros_msgs message_filters message_generation message_runtime mk nav_msgs nodelet orocos_kdl pluginlib python_orocos_kdl ros ros_comm rosapi rosauth rosbag rosbag_migration_rule rosbag_storage rosbash rosboost_cfg rosbridge_library rosbridge_server rosbridge_suite rosbuild rosclean rosconsole rosconsole_bridge roscpp roscpp_serialization roscpp_traits roscreate rosgraph rosgraph_msgs roslang roslaunch roslib roslint roslisp roslz4 rosmake rosmaster rosmsg rosnode rosout rospack rosparam rospy rospy_tutorials rosserial rosserial_client rosserial_msgs rosserial_python rosservice rostest rostime rostopic rosunit roswtf sensor_msgs smclib std_msgs std_srvs stereo_msgs tf tf2 tf2_bullet tf2_eigen tf2_geometry_msgs tf2_kdl tf2_msgs tf2_py tf2_ros tf2_sensor_msgs tf2_tools topic_tools trajectory_msgs urdf urdf_parser_plugin usb_cam uuid_msgs visualization_msgs web_video_server xmlrpcpp mavros opencv3 mavros_extras interactive_markers tf2_web_republisher interactive_marker_proxy \
--rosdistro kinetic --deps --wet-only --tar > kinetic-custom_ros.rosinstall \
&& wstool merge -j${NUMBER_THREADS} -t src kinetic-custom_ros.rosinstall \
&& wstool update -j${NUMBER_THREADS} -t src \
&& echo_stamp "All custom sources was installed!" "SUCCESS" \
|| (echo_stamp "Some custom sources installation was failed!" "ERROR"; exit 1)
else
echo_stamp "Creating ros_catkin_ws & getting all sources using wstool" \
&& mkdir -p /home/pi/ros_catkin_ws && cd /home/pi/ros_catkin_ws \
&& wstool init -j${NUMBER_THREADS} src kinetic-ros-clever.rosinstall \
> /dev/null \
&& echo_stamp "All CLEVER sources was installed!" "SUCCESS" \
|| (echo_stamp "Some CLEVER sources installation was failed!" "ERROR"; exit 1)
fi
resolve_rosdep '/home/pi/ros_catkin_ws'
# TODO: Add refactor to origin repo
#echo_stamp "Refactoring usb_cam in SRC"
#sed -i '/#define __STDC_CONSTANT_MACROS/a\#define PIX_FMT_RGB24 AV_PIX_FMT_RGB24\n#define PIX_FMT_YUV422P AV_PIX_FMT_YUV422P' /home/pi/ros_catkin_ws/src/usb_cam/src/usb_cam.cpp
echo_stamp "Building ros_catkin_ws packages"
cd /home/pi/ros_catkin_ws && ./src/catkin/bin/catkin_make_isolated --install -j${NUMBER_THREADS} -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/kinetic
#echo_stamp "#11 Building light packages on 2 threads"
#cd /home/pi/ros_catkin_ws && ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release -j2 --install-space /opt/ros/kinetic --pkg actionlib actionlib_msgs angles async_web_server_cpp bond bond_core bondcpp bondpy camera_calibration_parsers camera_info_manager catkin class_loader cmake_modules cpp_common diagnostic_msgs diagnostic_updater dynamic_reconfigure eigen_conversions gencpp geneus genlisp genmsg gennodejs genpy geographic_msgs geometry_msgs geometry2 image_transport libmavconn mavlink mavros_msgs message_filters message_generation message_runtime mk nav_msgs nodelet orocos_kdl pluginlib python_orocos_kdl ros ros_comm rosapi rosauth rosbag rosbag_migration_rule rosbag_storage rosbash rosboost_cfg rosbridge_library rosbridge_server rosbridge_suite rosbuild rosclean rosconsole rosconsole_bridge roscpp roscpp_serialization roscpp_traits roscreate rosgraph rosgraph_msgs roslang roslaunch roslib roslint roslisp roslz4 rosmake rosmaster rosmsg rosnode rosout rospack rosparam rospy rospy_tutorials rosserial rosserial_client rosserial_msgs rosserial_python rosservice rostest rostime rostopic rosunit roswtf sensor_msgs smclib std_msgs std_srvs stereo_msgs tf tf2 tf2_bullet tf2_eigen tf2_geometry_msgs tf2_kdl tf2_msgs tf2_py tf2_ros tf2_sensor_msgs tf2_tools topic_tools trajectory_msgs urdf urdf_parser_plugin usb_cam uuid_msgs visualization_msgs xmlrpcpp
#echo_stamp "#12 Building heavy packages"
# This command uses less threads to avoid Raspberry Pi freeze
#cd /home/pi/ros_catkin_ws && ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release -j1 --install-space /opt/ros/kinetic --pkg mavros opencv3 cv_bridge cv_camera mavros_extras web_video_server
# Install builded packages
# WARNING: A major bug was found when using --pkg option (catkin_make_isolated doesn't install environment files)
# TODO: Can we increase threads number with HDD swap?
echo_stamp "Remove build_isolated & devel_isolated from ros_catkin_ws"
rm -rf /home/pi/ros_catkin_ws/build_isolated /home/pi/ros_catkin_ws/devel_isolated
chown -Rf pi:pi /home/pi/ros_catkin_ws
fi
echo_stamp "Installing CLEVER" \
&& git clone ${REPO} /home/pi/catkin_ws/src/clever \
&& cd /home/pi/catkin_ws/src/clever \
&& echo "REF: ${REF}" \
&& git checkout ${REF} \
&& cd /home/pi/catkin_ws \
&& resolve_rosdep $(pwd) \
&& my_travis_retry pip install wheel \
&& my_travis_retry pip install -r /home/pi/catkin_ws/src/clever/clever/requirements.txt \
&& source /opt/ros/kinetic/setup.bash \
&& catkin_make -j${NUMBER_THREADS} -DCMAKE_BUILD_TYPE=Release \
&& systemctl enable roscore \
&& systemctl enable clever \
&& echo_stamp "All CLEVER was installed!" "SUCCESS" \
|| (echo_stamp "CLEVER installation was failed!" "ERROR"; exit 1)
# TODO move GeographicLib datasets to Mavros debian package
echo_stamp "Install GeographicLib datasets (needs for mavros)" \
&& wget -qO- https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh | bash
echo_stamp "Change permissions for catkin_ws"
chown -Rf pi:pi /home/pi/catkin_ws
echo_stamp "Setup ROS environment"
cat << EOF >> /home/pi/.bashrc
LANG='C.UTF-8'
LC_ALL='C.UTF-8'
ROS_DISTRO='kinetic'
export ROS_IP='192.168.11.1'
source /opt/ros/kinetic/setup.bash
source /home/pi/catkin_ws/devel/setup.bash
EOF
#echo_stamp "Removing local apt mirror"
# Restore original sources.list
#mv /var/sources.list.bak /etc/apt/sources.list
# Clean apt cache
apt-get clean -qq > /dev/null
# Remove local mirror repository key
#apt-key del COEX-MIRROR
echo_stamp "END of ROS INSTALLATION"

140
builder/image-software.sh Executable file
View File

@@ -0,0 +1,140 @@
#! /usr/bin/env bash
#
# Script for install software to the image.
#
# Copyright (C) 2018 Copter Express Technologies
#
# Author: Artem Smirnov <urpylka@gmail.com>
#
set -e # Exit immidiately on non-zero result
echo_stamp() {
# TEMPLATE: echo_stamp <TEXT> <TYPE>
# TYPE: SUCCESS, ERROR, INFO
# More info there https://www.shellhacks.com/ru/bash-colors/
TEXT="$(date '+[%Y-%m-%d %H:%M:%S]') $1"
TEXT="\e[1m${TEXT}\e[0m" # BOLD
case "$2" in
SUCCESS)
TEXT="\e[32m${TEXT}\e[0m";; # GREEN
ERROR)
TEXT="\e[31m${TEXT}\e[0m";; # RED
*)
TEXT="\e[34m${TEXT}\e[0m";; # BLUE
esac
echo -e ${TEXT}
}
# https://gist.github.com/letmaik/caa0f6cc4375cbfcc1ff26bd4530c2a3
# https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/templates/header.sh
my_travis_retry() {
local result=0
local count=1
while [ $count -le 3 ]; do
[ $result -ne 0 ] && {
echo -e "\n${ANSI_RED}The command \"$@\" failed. Retrying, $count of 3.${ANSI_RESET}\n" >&2
}
# ! { } ignores set -e, see https://stackoverflow.com/a/4073372
! { "$@"; result=$?; }
[ $result -eq 0 ] && break
count=$(($count + 1))
sleep 1
done
[ $count -gt 3 ] && {
echo -e "\n${ANSI_RED}The command \"$@\" failed 3 times.${ANSI_RESET}\n" >&2
}
return $result
}
echo_stamp "Install apt keys & repos"
# TODO: This STDOUT consist 'OK'
curl http://repo.coex.space/aptly_repo_signing.key 2> /dev/null | apt-key add -
apt-get update \
&& apt-get install --no-install-recommends -y -qq dirmngr=2.1.18-8~deb9u3 > /dev/null \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
echo "deb http://packages.ros.org/ros/ubuntu stretch main" > /etc/apt/sources.list.d/ros-latest.list
echo "deb http://repo.coex.space/rpi-ros-kinetic stretch main" > /etc/apt/sources.list.d/rpi-ros-kinetic.list
echo "deb http://repo.coex.space/clever stretch main" > /etc/apt/sources.list.d/clever.list
echo_stamp "Update apt cache"
# TODO: FIX ERROR: /usr/bin/apt-key: 596: /usr/bin/apt-key: cannot create /dev/null: Permission denied
apt-get update -qq
# && apt upgrade -y
echo_stamp "Software installing"
apt-get install --no-install-recommends -y \
unzip=6.0-21 \
zip=3.0-11 \
ipython=5.1.0-3 \
ipython3=5.1.0-3 \
screen=4.5.0-6 \
byobu=5.112-1 \
nmap=7.40-1 \
lsof=4.89+dfsg-0.1 \
git \
dnsmasq=2.76-5+rpt1+deb9u1 \
tmux=2.3-4 \
vim=2:8.0.0197-4+deb9u1 \
cmake=3.7.2-1 \
python-pip=9.0.1-2+rpt2 \
python3-pip=9.0.1-2+rpt2 \
libjpeg8-dev=8d1-2 \
tcpdump \
ltrace \
libpoco-dev=1.7.6+dfsg1-5+deb9u1 \
python-rosdep=0.13.0-1 \
python-rosinstall-generator=0.1.14-1 \
python-wstool=0.1.17-1 \
python-rosinstall=0.7.8-1 \
build-essential=12.3 \
libffi-dev \
monkey=1.6.9-1 \
pigpio python-pigpio python3-pigpio \
&& echo_stamp "Everything was installed!" "SUCCESS" \
|| (echo_stamp "Some packages wasn't installed!" "ERROR"; exit 1)
# Deny byobu to check available updates
sed -i "s/updates_available//" /usr/share/byobu/status/status
# sed -i "s/updates_available//" /home/pi/.byobu/status
#echo_stamp "Upgrade pip"
#my_travis_retry pip install --upgrade pip
#my_travis_retry pip3 install --upgrade pip
echo_stamp "Not upgrading system pip due to https://github.com/pypa/pip/issues/5599"
echo_stamp "Make sure both pip and pip3 are installed"
pip --version
pip3 --version
echo_stamp "Install and enable Butterfly (web terminal)"
my_travis_retry pip3 install butterfly
my_travis_retry pip3 install butterfly[systemd]
systemctl enable butterfly.socket
echo_stamp "Install ws281x library"
my_travis_retry pip install rpi_ws281x
echo_stamp "Setup Monkey"
mv /etc/monkey/sites/default /etc/monkey/sites/default.orig
mv /root/monkey-clever /etc/monkey/sites/default
systemctl enable monkey.service
echo_stamp "Add .vimrc"
cat << EOF > /home/pi/.vimrc
set mouse-=a
syntax on
autocmd BufNewFile,BufRead *.launch set syntax=xml
EOF
echo_stamp "End of software installation"

View File

@@ -21,6 +21,9 @@ find_package(catkin REQUIRED COMPONENTS
tf
tf2
tf2_geometry_msgs
tf2_ros
image_transport
cv_bridge
)
@@ -121,7 +124,7 @@ generate_messages(
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES clever
LIBRARIES clever
# CATKIN_DEPENDS other_catkin_pkg
# DEPENDS system_lib
)
@@ -137,7 +140,11 @@ include_directories(
${catkin_INCLUDE_DIRS}
)
## Declare a C++ library
# Declare a C++ library
add_library(clever
src/optical_flow.cpp
)
add_library(fcu_horiz
src/fcu_horiz.cpp
)
@@ -156,8 +163,16 @@ add_library(aruco_vpe
## The recommended prefix ensures that target names across packages don't collide
add_executable(rc src/rc.cpp)
add_executable(camera_markers src/camera_markers.cpp)
add_executable(frames src/frames.cpp)
target_link_libraries(rc ${catkin_LIBRARIES})
target_link_libraries(camera_markers ${catkin_LIBRARIES})
target_link_libraries(frames ${catkin_LIBRARIES})
## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the
## target back to the shorter version for ease of user use
@@ -169,6 +184,10 @@ target_link_libraries(rc ${catkin_LIBRARIES})
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
## Specify libraries to link a library or executable target against
target_link_libraries(clever
${catkin_LIBRARIES}
)
target_link_libraries(fcu_horiz
${catkin_LIBRARIES}
"/opt/ros/kinetic/lib/libtf2_ros.so"

View File

@@ -2,34 +2,35 @@
<arg name="fcu_conn" default="usb"/>
<arg name="fcu_ip" default="127.0.0.1"/>
<arg name="gcs_bridge" default="tcp"/>
<arg name="viz" default="true"/>
<arg name="web_server" default="false"/>
<arg name="web_video_server" default="true"/>
<arg name="rosbridge" default="true"/>
<arg name="main_camera" default="true"/>
<arg name="optical_flow" default="false"/>
<arg name="aruco" default="false"/>
<arg name="rc" value="true"/>
<arg name="fpv_camera" default="false"/>
<arg name="fpv_camera_device" default="/dev/v4l/by-id/usb-HD_Camera_Manufacturer_USB_2.0_Camera-video-index0"/>
<arg name="rc" default="true"/>
<arg name="arduino" default="false"/>
<arg name="vl53l1x" default="false"/>
<!-- mavros -->
<include file="$(find clever)/launch/mavros.launch">
<arg name="fcu_conn" value="$(arg fcu_conn)"/>
<arg name="fcu_ip" value="$(arg fcu_ip)"/>
<arg name="gcs_bridge" value="$(arg gcs_bridge)"/>
<arg name="viz" value="$(arg viz)"/>
<arg name="viz" value="true"/>
</include>
<!-- web server -->
<include file="$(find clever)/launch/web_server.launch" if="$(arg web_server)"/>
<!-- web video server -->
<node name="web_video_server" pkg="web_video_server" type="web_video_server" if="$(arg web_video_server)" required="false" respawn="true" respawn_delay="5"/>
<!-- aruco vpe -->
<include file="$(find clever)/launch/aruco.launch" if="$(arg aruco)"/>
<!-- optical flow -->
<node pkg="nodelet" type="nodelet" name="optical_flow" args="load clever/optical_flow nodelet_manager" if="$(arg optical_flow)" clear_params="true">
<remap from="image" to="main_camera/image_raw"/>
<remap from="camera_info" to="main_camera/camera_info"/>
</node>
<!-- main nodelet manager -->
<node pkg="nodelet" type="nodelet" name="nodelet_manager" args="manager" output="screen" clear_params="true">
<param name="num_worker_threads" value="2"/>
@@ -37,11 +38,14 @@
<node pkg="tf2_ros" type="static_transform_publisher" name="local_origin_upside_down_frame" args="0 0 0 3.1415926 3.1415926 0 local_origin local_origin_upside_down"/>
<!-- fcu_horiz frame -->
<node pkg="nodelet" type="nodelet" name="fcu_horiz" args="standalone clever/fcu_horiz" output="screen" clear_params="true"/>
<!-- simplified offboard control -->
<node name="simple_offboard" pkg="clever" type="simple_offboard.py" output="screen"/>
<!-- Auxiliary frames -->
<node name="frames" pkg="clever" type="frames" output="screen">
<param name="body/frame_id" value="fcu_horiz"/>
</node>
<!-- main camera -->
<include file="$(find clever)/launch/main_camera.launch" if="$(arg main_camera)"/>
@@ -49,14 +53,15 @@
<!-- rosbridge -->
<include file="$(find rosbridge_server)/launch/rosbridge_websocket.launch" if="$(eval rosbridge or rc)"/>
<!-- vl53l1x ToF rangefinder -->
<node name="vl53l1x" pkg="clever" type="vl53l1x.py" output="screen" if="$(arg vl53l1x)">
<param name="z_shift" value="-0.05"/>
<!-- <remap from="~range" to="mavros/distance_sensor/rangefinder_3_sub"/> -->
</node>
<!-- rc backend -->
<node name="rc" pkg="clever" type="rc" output="screen" if="$(arg rc)"/>
<!-- FPV video streaming -->
<include file="$(find clever)/launch/fpv_camera.launch" if="$(arg fpv_camera)">
<arg name="device" value="$(arg fpv_camera_device)"/>
</include>
<!-- Arduino bridge -->
<include file="$(find clever)/launch/arduino.launch" if="$(arg arduino)"/>
</launch>

View File

@@ -1,12 +0,0 @@
<launch>
<remap to="mavros/local_position/pose" from="local_position"/>
<remap to="mavros/setpoint_position/local" from="local_setpoint"/>
<node name="copter_visualization" pkg="mavros_extras" type="copter_visualization"/>
<param name="copter_visualization/fixed_frame_id" value="local_origin"/>
<param name="copter_visualization/child_frame_id" value="fcu"/>
<param name="copter_visualization/marker_scale" value="1"/>
<param name="copter_visualization/max_track_size" value="500"/>
<param name="copter_visualization/num_rotors" value="4"/>
</launch>

24
clever/launch/main_camera.launch Normal file → Executable file
View File

@@ -1,11 +1,19 @@
<launch>
<!-- clever 2 -->
<!--<node pkg="tf2_ros" type="static_transform_publisher" name="main_camera_frame" args="0 0 -0.07 -1.5707963 0 3.1415926 fcu main_camera_optical"/>-->
<!-- Camera position and orientation are represented by fcu -> main_camera_optical transform -->
<!-- static_transform_publisher arguments: x y z yaw pitch roll frame_id child_frame_id -->
<!-- clever 3 -->
<node pkg="tf2_ros" type="static_transform_publisher" name="main_camera_frame" args="0.05 0 -0.07 1.5707963 0 3.1415926 fcu main_camera_optical"/>
<!-- article about camera setup: https://clever.copterexpress.com/camera_frame.html -->
<!-- clever 3, upwards -->
<!-- camera is oriented downward, camera cable goes backward [option 1] -->
<node pkg="tf2_ros" type="static_transform_publisher" name="main_camera_frame" args="0.05 0 -0.07 -1.5707963 0 3.1415926 fcu main_camera_optical"/>
<!-- camera is oriented downward, camera cable goes forward [option 2] -->
<!--<node pkg="tf2_ros" type="static_transform_publisher" name="main_camera_frame" args="0.05 0 -0.07 1.5707963 0 3.1415926 fcu main_camera_optical"/>-->
<!-- camera is oriented upward, camera cable goes backward [option 3] -->
<!--<node pkg="tf2_ros" type="static_transform_publisher" name="main_camera_frame" args="0.05 0 0.07 1.5707963 0 0 fcu main_camera_optical"/>-->
<!-- camera is oriented upward, camera cable goes forward [option 4] -->
<!--<node pkg="tf2_ros" type="static_transform_publisher" name="main_camera_frame" args="0.05 0 0.07 -1.5707963 0 0 fcu main_camera_optical"/>-->
<!-- camera node -->
@@ -16,8 +24,14 @@
<!-- setting camera FPS -->
<param name="rate" value="100"/>
<param name="cv_cap_prop_fps" value="40"/>
<param name="capture_delay" value="0.02"/>
<param name="image_width" value="320"/>
<param name="image_height" value="240"/>
</node>
<!-- camera visualization markers -->
<node pkg="clever" type="camera_markers" ns="main_camera" name="main_camera_markers">
<param name="scale" value="3.0"/>
</node>
</launch>

View File

@@ -1,58 +1,96 @@
<launch>
<arg name="fcu_conn" default="uart"/>
<arg name="fcu_conn" default="usb"/>
<arg name="fcu_ip" default="127.0.0.1"/>
<arg name="gcs_bridge" default="tcp"/>
<arg name="viz" default="true"/>
<arg name="respawn" default="true"/>
<node pkg="mavros" type="mavros_node" name="mavros" required="false" clear_params="true" respawn="$(arg respawn)" respawn_delay="5" output="screen">
<!-- UART connection -->
<param name="fcu_url" value="/dev/ttyAMA0:921600" if="$(eval fcu_conn is None or fcu_conn == 'uart')"/>
<!-- 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="/dev/ttyACM0" if="$(eval fcu_conn == 'usb')"/>
<!-- USB connection -->
<param name="fcu_url" value="/dev/ttyACM0" if="$(eval fcu_conn == 'usb')"/>
<!-- sitl -->
<param name="fcu_url" value="udp://@$(arg fcu_ip):14557" if="$(eval fcu_conn == 'udp')"/>
<!-- sitl -->
<param name="fcu_url" value="udp://@$(arg fcu_ip):14557" if="$(eval fcu_conn == 'udp')"/>
<!-- gcs bridge -->
<param name="gcs_url" value="tcp-l://0.0.0.0:5760" if="$(eval gcs_bridge == 'tcp')"/>
<param name="gcs_url" value="udp://0.0.0.0:14550@14550" if="$(eval gcs_bridge == 'udp')"/>
<param name="gcs_url" value="udp-b://$(env ROS_IP):14550@14550" if="$(eval gcs_bridge == 'udp-b')"/>
<param name="gcs_url" value="udp-pb://$(env ROS_IP):14550@14550" if="$(eval gcs_bridge == 'udp-pb')"/>
<param name="gcs_url" value="" if="$(eval not gcs_bridge)"/>
<param name="gcs_quiet_mode" value="true"/>
<param name="conn/timeout" value="8"/>
<!-- gcs bridge -->
<param name="gcs_url" value="tcp-l://0.0.0.0:5760" if="$(eval gcs_bridge == 'tcp')"/>
<param name="gcs_url" value="udp://0.0.0.0:14550@14550" if="$(eval gcs_bridge == 'udp')"/>
<param name="gcs_url" value="udp-b://$(env ROS_IP):14550@14550" if="$(eval gcs_bridge == 'udp-b')"/>
<param name="gcs_url" value="udp-pb://$(env ROS_IP):14550@14550" if="$(eval gcs_bridge == 'udp-pb')"/>
<param name="gcs_url" value="" if="$(eval not gcs_bridge)"/>
<param name="gcs_quiet_mode" value="true"/>
<param name="conn/timeout" value="8"/>
<!-- default px4 params -->
<rosparam command="load" file="$(find mavros)/launch/px4_config.yaml"/>
<!-- default px4 params -->
<rosparam command="load" file="$(find mavros)/launch/px4_config.yaml"/>
<!-- additional params -->
<param name="local_position/frame_id" value="local_origin"/>
<param name="local_position/tf/send" value="true"/>
<param name="local_position/tf/frame_id" value="local_origin"/>
<param name="local_position/tf/child_frame_id" value="fcu"/>
<param name="global_position/tf/send" value="false"/>
<param name="imu/frame_id" value="fcu"/>
<rosparam param="plugin_blacklist">
- safety_area
- image_pub
- vibration
- distance_sensor
- rangefinder
- 3dr_radio
- actuator_control
- hil_controls
- vfr_hud
- px4flow
- vision_speed_estimate
- fake_gps
- cam_imu_sync
- hil
- adsb
</rosparam>
<!-- rangefinders -->
<rosparam>
distance_sensor:
rangefinder_0:
id: 0
frame_id: "rangefinder"
orientation: PITCH_270
field_of_view: 0.5
rangefinder_1:
id: 1
frame_id: "rangefinder"
orientation: PITCH_270
field_of_view: 0.5
rangefinder_2_sub:
subscriber: true
id: 2
orientation: PITCH_270
rangefinder_3_sub:
subscriber: true
id: 3
orientation: PITCH_270
</rosparam>
<!-- additional params -->
<param name="local_position/frame_id" value="local_origin"/>
<param name="local_position/tf/send" value="true"/>
<param name="local_position/tf/frame_id" value="local_origin"/>
<param name="local_position/tf/child_frame_id" value="fcu"/>
<param name="global_position/tf/send" value="false"/>
<param name="imu/frame_id" value="fcu"/>
<rosparam param="plugin_blacklist">
- safety_area
- image_pub
- vibration
- rangefinder
- 3dr_radio
- actuator_control
- hil_controls
- vfr_hud
- vision_speed_estimate
- fake_gps
- cam_imu_sync
- hil
- adsb
- waypoint
- obstacle_distance
- setpoint_accel
- trajectory
- wind_estimation
- home_position
</rosparam>
</node>
<!-- Rangefinders frame -->
<node pkg="tf2_ros" type="static_transform_publisher" name="rangefinder_frame" args="0 0 -0.05 0 1.5707963268 0 fcu rangefinder"/>
<!-- Copter visualization -->
<include file="$(find clever)/launch/copter_visualization.launch" if="$(arg viz)"/>
<node name="copter_visualization" pkg="mavros_extras" type="copter_visualization" if="$(arg viz)">
<remap to="mavros/local_position/pose" from="local_position"/>
<remap to="mavros/setpoint_position/local" from="local_setpoint"/>
<param name="fixed_frame_id" value="local_origin"/>
<param name="child_frame_id" value="fcu"/>
<param name="marker_scale" value="1"/>
<param name="max_track_size" value="20"/>
<param name="num_rotors" value="4"/>
</node>
</launch>

View File

@@ -1,17 +1,19 @@
<launch>
<!-- Clever configuration for testing in sitl -->
<arg name="ip" default="127.0.0.1"/>
<arg name="rosbridge" default="true"/>
<arg name="rosbridge" default="false"/>
<include file="$(find clever)/launch/clever.launch">
<arg name="fcu_conn" value="udp"/>
<arg name="fcu_ip" value="$(arg ip)"/>
<arg name="gcs_bridge" value="false"/>
<arg name="optical_flow" value="false"/>
<arg name="web_server" default="false"/>
<arg name="web_video_server" default="false"/>
<arg name="main_camera" default="false"/>
<arg name="fpv_camera" default="false"/>
<arg name="rosbridge" value="$(arg rosbridge)"/>
<arg name="web_server" default="false"/>
<arg name="aruco" default="false"/>
<arg name="vl53l1x" default="false"/>
<arg name="rc" default="false"/>
</include>
</launch>

View File

@@ -1,5 +0,0 @@
<launch>
<node name="web_server" pkg="clever" type="web_server.py" output="screen">
<param name="path" value="$(find clever)/static"/>
</node>
</launch>

View File

@@ -1,3 +1,8 @@
<library path="lib/libclever">
<class name="clever/optical_flow" type="OpticalFlow" base_class_type="nodelet::Nodelet">
<description/>
</class>
</library>
<library path="lib/libfcu_horiz">
<class name="clever/fcu_horiz" type="FcuHoriz" base_class_type="nodelet::Nodelet">
<description/>

View File

@@ -2,55 +2,40 @@
<package>
<name>clever</name>
<version>0.0.1</version>
<description>The clever package</description>
<description>The CLEVER package</description>
<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
<maintainer email="okalachev@gmail.com">Oleg Kalachev</maintainer>
<license>MIT</license>
<!--url type="website">http://wiki.ros.org/clever</url-->
<author email="okalachev@gmail.com">Oleg Kalachev</author>
<author email="urpylka@gmail.com">Artem Smirnov</author>
<!-- One license tag required, multiple allowed, one license per tag -->
<!-- Commonly used license strings: -->
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>TODO</license>
<!-- Url tags are optional, but multiple are allowed, one per tag -->
<!-- Optional attribute type can be: website, bugtracker, or repository -->
<!-- Example: -->
<!-- <url type="website">http://wiki.ros.org/clever</url> -->
<!-- Author tags are optional, multiple are allowed, one per tag -->
<!-- Authors do not have to be maintainers, but could be -->
<!-- Example: -->
<!-- <author email="jane.doe@example.com">Jane Doe</author> -->
<!-- The *_depend tags are used to specify dependencies -->
<!-- Dependencies can be catkin packages or system dependencies -->
<!-- Examples: -->
<!-- Use build_depend for packages you need at compile time: -->
<!-- <build_depend>message_generation</build_depend> -->
<!-- Use buildtool_depend for build tool packages: -->
<!-- <buildtool_depend>catkin</buildtool_depend> -->
<!-- Use run_depend for packages you need at runtime: -->
<!-- <run_depend>message_runtime</run_depend> -->
<!-- Use test_depend for packages you need only for testing: -->
<!-- <test_depend>gtest</test_depend> -->
<buildtool_depend>catkin</buildtool_depend>
<build_depend>nodelet</build_depend>
<build_depend>roscpp</build_depend>
<run_depend>nodelet</run_depend>
<build_depend>visualization_msgs</build_depend>
<build_depend>tf2_geometry_msgs</build_depend>
<!-- Use buildtool_depend for build tool packages: -->
<buildtool_depend>catkin</buildtool_depend>
<!-- Use run_depend for packages you need at runtime: -->
<run_depend>catkin</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>nodelet</run_depend>
<run_depend>mavros</run_depend>
<run_depend>mavros_extras</run_depend>
<run_depend>lxml</run_depend>
<run_depend>cv_camera</run_depend>
<run_depend>mjpg-streamer</run_depend>
<run_depend>rosbridge_server</run_depend>
<run_depend>web_video_server</run_depend>
<run_depend>ros_comm</run_depend>r
<!-- Use test_depend for packages you need only for testing: -->
<!-- <test_depend>gtest</test_depend> -->
<!-- The export tag contains other, unspecified, tags -->
<export>
<nodelet plugin="${prefix}/nodelet_plugins.xml" />
<nodelet plugin="${prefix}/nodelet_plugins.xml" />
<!-- Other tools can request additional information be placed here -->
</export>
</package>

View File

@@ -1,3 +1,5 @@
flask==0.12.2
flask==0.12.3
geopy==1.11.0
pymavlink==2.2.10
smbus2==0.2.1
VL53L1X==0.0.2

View File

@@ -0,0 +1,101 @@
/*
* Visualization marker for camera alignment
* Copyright (C) 2018 Copter Express Technologies
*
* Author: Oleg Kalachev <okalachev@gmail.com>
*
* Distributed under MIT License (available at https://opensource.org/licenses/MIT).
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*/
#include <string>
#include <ros/ros.h>
#include <sensor_msgs/CameraInfo.h>
#include <visualization_msgs/Marker.h>
#include <visualization_msgs/MarkerArray.h>
using namespace visualization_msgs;
double markers_scale;
std::string camera_frame;
MarkerArray createMarkers() {
MarkerArray markers;
Marker lens;
lens.header.frame_id = camera_frame;
lens.ns = "camera_markers";
lens.id = 0;
lens.action = Marker::ADD;
lens.type = visualization_msgs::Marker::CYLINDER;
lens.frame_locked = true;
lens.scale.x = 0.013 * markers_scale;
lens.scale.y = 0.013 * markers_scale;
lens.scale.z = 0.015 * markers_scale;
lens.color.r = 0.3;
lens.color.g = 0.3;
lens.color.b = 0.3;
lens.color.a = 0.9;
lens.pose.position.z = 0.0075 * markers_scale;
lens.pose.orientation.w = 1;
Marker board;
board.header.frame_id = camera_frame;
board.ns = "camera_markers";
board.id = 1;
board.action = Marker::ADD;
board.type = Marker::CUBE;
board.frame_locked = true;
board.scale.x = 0.024 * markers_scale;
board.scale.y = 0.024 * markers_scale;
board.scale.z = 0.001 * markers_scale;
board.color.r = 0.0;
board.color.g = 0.8;
board.color.b = 0.0;
board.color.a = 0.9;
board.pose.orientation.w = 1;
Marker wire;
wire.header.frame_id = camera_frame;
wire.ns = "camera_markers";
wire.id = 2;
wire.action = Marker::ADD;
wire.type = Marker::CUBE;
wire.frame_locked = true;
wire.scale.x = 0.014 * markers_scale;
wire.scale.y = 0.04 * markers_scale;
wire.scale.z = 0.001 * markers_scale;
wire.color.r = 0.9;
wire.color.g = 0.9;
wire.color.b = 1.0;
wire.color.a = 0.8;
wire.pose.position.x = 0;
wire.pose.position.y = (0.01 + 0.02) * markers_scale;
wire.pose.position.z = 0.002 * markers_scale;
wire.pose.orientation.w = 1;
markers.markers.push_back(lens);
markers.markers.push_back(board);
markers.markers.push_back(wire);
return markers;
}
int main(int argc, char **argv)
{
ros::init(argc, argv, "camera_markers", ros::init_options::AnonymousName);
ros::NodeHandle nh, nh_priv("~");
nh_priv.param("scale", markers_scale, 1.0);
// wait for camera info
auto camera_info = ros::topic::waitForMessage<sensor_msgs::CameraInfo>("camera_info", nh);
camera_frame = camera_info->header.frame_id;
ros::Publisher markers_pub = nh.advertise<visualization_msgs::MarkerArray>("camera_markers", 1, true);
markers_pub.publish(createMarkers());
ROS_INFO("Camera markers initialized");
ros::spin();
}

View File

@@ -4,5 +4,4 @@
# fpv_camera <video_device> <http port>
echo "Starting FPV camera $1 on :$2"
cd /home/pi/mjpg-streamer/mjpg-streamer-experimental
./mjpg_streamer -i "./input_uvc.so -d $1 -r 320x240 -f 30" -o "./output_http.so -w ./www -p $2"
mjpg_streamer -i "/usr/lib/input_uvc.so -d $1 -r 320x240 -f 30" -o "/usr/lib/output_http.so -w /usr/share/mjpg_streamer/www -p $2"

63
clever/src/frames.cpp Normal file
View File

@@ -0,0 +1,63 @@
/*
* Auxiliary TF frames for CLEVER drone kit:
* - Body frame (drone body with zero pitch and roll).
* - TODO: REP-0105 `odom` frame emulation: continuous frame without discrete jumps.
* - TODO: Terrain frame (base on ALTITUDE message).
* - TODO: map_upside_down frame
* - TODO: home frame?
*
* Copyright (C) 2018 Copter Express Technologies
*
* Author: Oleg Kalachev <okalachev@gmail.com>
*
* Distributed under MIT License (available at https://opensource.org/licenses/MIT).
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*/
// TODO: consider implementing as a mavros plugin
#include <string>
#include <memory>
#include <ros/ros.h>
#include <tf/transform_datatypes.h>
#include <tf2_ros/transform_broadcaster.h>
#include <geometry_msgs/TransformStamped.h>
#include <geometry_msgs/PoseStamped.h>
using std::string;
static std::shared_ptr<tf2_ros::TransformBroadcaster> br;
static geometry_msgs::TransformStamped body;
inline void publishBody(const geometry_msgs::PoseStamped& pose)
{
// Get only yaw from pose
tf::Quaternion q;
q.setRPY(0, 0, tf::getYaw(pose.pose.orientation));
tf::quaternionTFToMsg(q, body.transform.rotation);
body.transform.translation.x = pose.pose.position.x;
body.transform.translation.y = pose.pose.position.y;
body.transform.translation.z = pose.pose.position.z;
body.header.frame_id = pose.header.frame_id;
body.header.stamp = pose.header.stamp;
br->sendTransform(body);
}
void poseCallback(const geometry_msgs::PoseStamped& pose)
{
publishBody(pose);
}
int main(int argc, char **argv) {
ros::init(argc, argv, "frames");
ros::NodeHandle nh, nh_priv("~");
nh_priv.param<string>("body/frame_id", body.child_frame_id, "body");
br = std::make_shared<tf2_ros::TransformBroadcaster>();
ros::Subscriber pose_sub = nh.subscribe("mavros/local_position/pose", 1, &poseCallback);
ROS_INFO("frames: ready");
ros::spin();
}

85
clever/src/interactive.py Executable file
View File

@@ -0,0 +1,85 @@
#!/usr/bin/env python
import copy
import rospy
import tf.transformations as t
from interactive_markers.interactive_marker_server import InteractiveMarkerServer
from visualization_msgs.msg import Marker, InteractiveMarker, InteractiveMarkerControl, InteractiveMarkerFeedback
from clever import srv
def make_box(msg):
marker = Marker()
marker.type = Marker.CUBE
marker.scale.x = msg.scale * 0.3
marker.scale.y = msg.scale * 0.3
marker.scale.z = msg.scale * 0.3
marker.color.r = 0.5
marker.color.g = 0.5
marker.color.b = 0.5
marker.color.a = 1.0
marker.pose.orientation.w = 1
return marker
def make_box_control(msg):
control = InteractiveMarkerControl()
control.always_visible = True
control.orientation.w = 1
control.markers.append(make_box(msg))
msg.controls.append(control)
return control
def make_quadcopter_marker():
marker = InteractiveMarker()
marker.header.frame_id = 'fcu'
marker.header.stamp = rospy.get_rostime()
marker.scale = 1
marker.pose.orientation.w = 1
marker.name = 'quadcopter'
marker.description = 'Quadcopter'
make_box_control(marker)
control = InteractiveMarkerControl()
control.orientation.w = 1
control.orientation.x = 0
control.orientation.y = 1
control.orientation.z = 0
control.interaction_mode = InteractiveMarkerControl.MOVE_ROTATE
marker.controls.append(copy.deepcopy(control))
control.interaction_mode = InteractiveMarkerControl.MOVE_AXIS
marker.controls.append(control)
return marker
navigate = rospy.ServiceProxy('navigate', srv.Navigate)
def process_feedback(feedback):
if feedback.event_type != InteractiveMarkerFeedback.MOUSE_UP:
return
p = feedback.pose.position
o = feedback.pose.orientation
yaw = t.euler_from_quaternion((o.x, o.y, o.z, o.w), axes='rzyx')[0]
rospy.loginfo('Navigate to %s', p)
rospy.loginfo(navigate(x=p.x, y=p.y, z=p.z, yaw=yaw, speed=2,
frame_id=feedback.header.frame_id, auto_arm=True))
rospy.init_node('quadcopter_im')
server = InteractiveMarkerServer('quadcopter_im')
int_marker = make_quadcopter_marker()
server.insert(int_marker, process_feedback)
server.applyChanges()
rospy.loginfo('Interactive quadcopter marker initialized')
rospy.spin()

200
clever/src/optical_flow.cpp Normal file
View File

@@ -0,0 +1,200 @@
/*
* Optical Flow node for PX4
* Copyright (C) 2018 Copter Express Technologies
*
* Author: Oleg Kalachev <okalachev@gmail.com>
*
* Distributed under MIT License (available at https://opensource.org/licenses/MIT).
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*/
#include <vector>
#include <cmath>
#include <nodelet/nodelet.h>
#include <pluginlib/class_list_macros.h>
#include <image_transport/image_transport.h>
#include <cv_bridge/cv_bridge.h>
#include <opencv2/opencv.hpp>
#include <tf/transform_datatypes.h>
#include <tf2/exceptions.h>
#include <tf2/convert.h>
#include <tf2_ros/transform_listener.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#include <mavros_msgs/OpticalFlowRad.h>
#include <sensor_msgs/Imu.h>
#include <geometry_msgs/Vector3Stamped.h>
#include <geometry_msgs/PointStamped.h>
#include <geometry_msgs/TwistStamped.h>
using cv::Mat;
class OpticalFlow : public nodelet::Nodelet
{
public:
OpticalFlow():
camera_matrix_(3, 3, CV_64F),
dist_coeffs_(8, 1, CV_64F),
tf_listener_(tf_buffer_)
{}
private:
ros::Publisher flow_pub_, velo_pub_, shift_pub_;
ros::Time prev_stamp_;
std::string fcu_frame_id_;
image_transport::CameraSubscriber img_sub_;
image_transport::Publisher img_pub_;
mavros_msgs::OpticalFlowRad flow_;
int roi_, roi_2_;
Mat hann_;
Mat prev_, curr_;
Mat camera_matrix_, dist_coeffs_;
tf2_ros::Buffer tf_buffer_;
tf2_ros::TransformListener tf_listener_;
void onInit()
{
ros::NodeHandle& nh = getNodeHandle();
ros::NodeHandle& nh_priv = getPrivateNodeHandle();
image_transport::ImageTransport it(nh);
image_transport::ImageTransport it_priv(nh_priv);
nh_priv.param<std::string>("mavros/local_position/tf/child_frame_id", fcu_frame_id_, "fcu");
nh_priv.param("roi", roi_, 128);
roi_2_ = roi_ / 2;
img_sub_ = it.subscribeCamera("image", 1, &OpticalFlow::flow, this);
img_pub_ = it_priv.advertise("debug", 1);
flow_pub_ = nh.advertise<mavros_msgs::OpticalFlowRad>("mavros/px4flow/raw/send", 1);
velo_pub_ = nh_priv.advertise<geometry_msgs::TwistStamped>("angular_velocity", 1);
shift_pub_ = nh_priv.advertise<geometry_msgs::Vector3Stamped>("shift", 1);
flow_.integrated_xgyro = NAN; // no IMU available
flow_.integrated_ygyro = NAN;
flow_.integrated_zgyro = NAN;
flow_.time_delta_distance_us = 0;
flow_.distance = -1; // no distance sensor available
flow_.temperature = 0;
ROS_INFO("Optical Flow initialized");
}
void parseCameraInfo(const sensor_msgs::CameraInfoConstPtr &cinfo) {
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
camera_matrix_.at<double>(i, j) = cinfo->K[3 * i + j];
}
}
for (int k = 0; k < cinfo->D.size(); k++) {
dist_coeffs_.at<double>(k) = cinfo->D[k];
}
}
void drawFlow(Mat& frame, double x, double y, double quality) const
{
double brightness = (1 - quality) * 25;;
cv::Scalar color(brightness, brightness, brightness);
double radius = std::sqrt(x * x + y * y);
// draw a circle and line indicating the shift direction...
cv::Point center(frame.cols >> 1, frame.rows >> 1);
cv::circle(frame, center, (int)(radius*5), color, 3, cv::LINE_AA);
cv::line(frame, center, cv::Point(center.x + (int)(x*5), center.y + (int)(y*5)), color, 3, cv::LINE_AA);
}
void flow(const sensor_msgs::ImageConstPtr& msg, const sensor_msgs::CameraInfoConstPtr& cinfo)
{
parseCameraInfo(cinfo);
auto img = cv_bridge::toCvShare(msg, "mono8")->image;
// Apply ROI
if (roi_ != 0) {
img = img(cv::Rect((msg->width / 2 - roi_2_), (msg->height / 2 - roi_2_), roi_, roi_));
}
img.convertTo(curr_, CV_64F);
if (prev_.empty()) {
prev_ = curr_.clone();
prev_stamp_ = msg->header.stamp;
cv::createHanningWindow(hann_, curr_.size(), CV_64F);
} else {
double response;
cv::Point2d shift = cv::phaseCorrelate(prev_, curr_, hann_, &response);
// Publish raw shift in pixels
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;
shift_vec.vector.y = shift.y;
shift_pub_.publish(shift_vec);
// Undistort flow in pixels
uint32_t flow_center_x = msg->width / 2;
uint32_t flow_center_y = msg->height / 2;
shift.x += flow_center_x;
shift.y += flow_center_y;
std::vector<cv::Point2d> points_dist = { shift };
std::vector<cv::Point2d> points_undist(1);
cv::undistortPoints(points_dist, points_undist, camera_matrix_, dist_coeffs_, cv::noArray(), camera_matrix_);
points_undist[0].x -= flow_center_x;
points_undist[0].y -= flow_center_y;
// Calculate flow in radians
double focal_length_x = camera_matrix_.at<double>(0, 0);
double focal_length_y = camera_matrix_.at<double>(1, 1);
double flow_x = atan2(points_undist[0].x, focal_length_x);
double flow_y = atan2(points_undist[0].y, focal_length_y);
// // Convert to FCU frame
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
flow_camera.vector.y = -flow_x; // +x means clockwise rotation around X axis
tf_buffer_.transform(flow_camera, flow_fcu, fcu_frame_id_);
// Calculate integration time
ros::Duration integration_time = msg->header.stamp - prev_stamp_;
uint32_t integration_time_us = integration_time.toSec() * 1.0e6;
// Publish flow in fcu frame
flow_.header.stamp = /*prev_stamp_*/ msg->header.stamp;
flow_.integration_time_us = integration_time_us;
flow_.integrated_x = flow_fcu.vector.x;
flow_.integrated_y = flow_fcu.vector.y;
flow_.quality = (uint8_t)(response * 255);
flow_pub_.publish(flow_);
// Publish debug image
if (img_pub_.getNumSubscribers() > 0) {
// publish debug image
drawFlow(img, shift_vec.vector.x, shift_vec.vector.y, response);
cv_bridge::CvImage out_msg;
out_msg.header.frame_id = msg->header.frame_id;
out_msg.header.stamp = msg->header.stamp;
out_msg.encoding = sensor_msgs::image_encodings::MONO8;
out_msg.image = img;
img_pub_.publish(out_msg.toImageMsg());
}
// Publish estimated angular velocity
static geometry_msgs::TwistStamped velo;
velo.header.stamp = msg->header.stamp;
velo.header.frame_id = fcu_frame_id_;
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;
}
}
};
PLUGINLIB_EXPORT_CLASS(OpticalFlow, nodelet::Nodelet)

View File

@@ -1,107 +1,260 @@
#!/usr/bin/env python
import math
from subprocess import Popen, PIPE
import re
import traceback
import rospy
from std_srvs.srv import Trigger
from sensor_msgs.msg import Image, CameraInfo, NavSatFix, Imu
from mavros_msgs.msg import State
from sensor_msgs.msg import Image, CameraInfo, NavSatFix, Imu, Range
from mavros_msgs.msg import State, OpticalFlowRad
from geometry_msgs.msg import PoseStamped, TwistStamped
import tf.transformations as t
# TODO: roscore is running
# TODO: clever.service is running
# TODO: check attitude is present
# TODO: disk free space
# TODO: local_origin, fcu, fcu_horiz
# TODO: rc service
# TODO: perform commander check in PX4
# TODO: perform commander check, ekf2 status on PX4
# TODO: check if FCU params setter succeed
# TODO: selfcheck ROS service (with blacklists for checks)
rospy.init_node('selfcheck')
failures = []
def failure(text, *args):
failures.append(text % args)
def check(name):
def inner(fn):
def wrapper(*args, **kwargs):
failures[:] = []
try:
fn(*args, **kwargs)
for f in failures:
rospy.logwarn('%s: %s', name, f)
except Exception as e:
traceback.print_exc()
rospy.logwarn('%s: exception occured', name)
return
if not failures:
rospy.loginfo('%s: OK', name)
return wrapper
return inner
@check('FCU')
def check_fcu():
try:
state = rospy.wait_for_message('mavros/state', State, timeout=3)
if not state.connected:
raise Exception('No connection to the FCU')
failure('no connection to the FCU (check wiring)')
except rospy.ROSException:
raise Exception('No MAVROS state')
failure('no MAVROS state (check wiring)')
@check('Camera')
def check_camera(name):
try:
rospy.wait_for_message(name + '/image_raw', Image, timeout=3)
img = rospy.wait_for_message(name + '/image_raw', Image, timeout=1)
except rospy.ROSException:
raise Exception('No %s camera images' % name)
failure('%s: no images (is the camera connected properly?)', name)
return
try:
rospy.wait_for_message(name + '/camera_info', CameraInfo, timeout=3)
info = rospy.wait_for_message(name + '/camera_info', CameraInfo, timeout=1)
except rospy.ROSException:
raise Exception('No %s camera camera info' % name)
failure('%s: no calibration info', name)
return
if img.width != info.width:
failure('%s: calibration width doesn\'t match image width (%d != %d)', name, info.width, img.width)
if img.height != info.height:
failure('%s: calibration height doesn\'t match image height (%d != %d))', name, info.height, img.height)
@check('Aruco detector')
def check_aruco():
try:
rospy.wait_for_message('aruco_pose/debug', Image, timeout=3)
rospy.wait_for_message('aruco_pose/debug', Image, timeout=1)
except rospy.ROSException:
raise Exception('No aruco_pose/debug topic')
failure('no aruco_pose/debug messages')
@check('Vision position estimate')
def check_vpe():
try:
vis = rospy.wait_for_message('mavros/vision_pose/pose', PoseStamped, timeout=1)
except rospy.ROSException:
try:
vis = rospy.wait_for_message('mavros/mocap/pose', PoseStamped, timeout=1)
except rospy.ROSException:
failure('no VPE or MoCap messages')
return
# check vision pose and estimated pose inconsistency
try:
pose = rospy.wait_for_message('mavros/local_position/pose', PoseStamped, timeout=1)
except:
return
horiz = math.hypot(vis.pose.position.x - pose.pose.position.x, vis.pose.position.y - pose.pose.position.y)
if horiz > 0.5:
failure('horizontal position inconsistency: %.2f m', horiz)
vert = vis.pose.position.z - pose.pose.position.z
if abs(vert) > 0.5:
failure('vertical position inconsistency: %.2f m', vert)
op = pose.pose.orientation
ov = vis.pose.orientation
yawp, _, _ = t.euler_from_quaternion((op.x, op.y, op.z, op.w), axes='rzyx')
yawv, _, _ = t.euler_from_quaternion((ov.x, ov.y, ov.z, ov.w), axes='rzyx')
yawdiff = yawp - yawv
yawdiff = math.degrees((yawdiff + 180) % 360 - 180)
if abs(yawdiff) > 8:
failure('yaw inconsistency: %.2f deg', yawdiff)
@check('Simple offboard node')
def check_simpleoffboard():
try:
rospy.wait_for_service('navigate', timeout=3)
rospy.wait_for_service('get_telemetry', timeout=3)
rospy.wait_for_service('land', timeout=3)
except rospy.ROSException:
raise Exception('No simple_offboard services')
failure('no simple_offboard services')
@check('IMU')
def check_imu():
try:
rospy.wait_for_message('mavros/imu/data', Imu, timeout=3)
rospy.wait_for_message('mavros/imu/data', Imu, timeout=1)
except rospy.ROSException:
raise Exception('No IMU data')
failure('no IMU data (check flight controller calibration)')
@check('Local position')
def check_local_position():
try:
rospy.wait_for_message('mavros/local_position/pose', PoseStamped, timeout=3)
pose = rospy.wait_for_message('mavros/local_position/pose', PoseStamped, timeout=1)
o = pose.pose.orientation
_, pitch, roll = t.euler_from_quaternion((o.x, o.y, o.z, o.w), axes='rzyx')
MAX_ANGLE = math.radians(2)
if abs(pitch) > MAX_ANGLE:
failure('pitch is %.2f deg; place copter horizontally or redo level horizon calib',
math.degrees(pitch))
if abs(roll) > MAX_ANGLE:
failure('roll is %.2f deg; place copter horizontally or redo level horizon calib',
math.degrees(roll))
except rospy.ROSException:
raise Exception('No local position')
failure('no local position')
@check('Velocity estimation')
def check_velocity():
try:
velocity = rospy.wait_for_message('mavros/local_position/velocity', TwistStamped, timeout=3)
velocity = rospy.wait_for_message('mavros/local_position/velocity', TwistStamped, timeout=1)
horiz = math.hypot(velocity.twist.linear.x, velocity.twist.linear.y)
vert = velocity.twist.linear.z
if abs(horiz) > 0.1:
raise Exception('Horizontal velocity estimation is %s m/s; is the copter staying still?' % horiz)
failure('horizontal velocity estimation is %.2f m/s; is copter staying still?' % horiz)
if abs(vert) > 0.1:
raise Exception('Vertical velocity estimation is %s m/s; is the copter staying still?' % vert)
failure('vertical velocity estimation is %.2f m/s; is copter staying still?' % vert)
angular = velocity.twist.angular
ANGULAR_VELOCITY_LIMIT = 0.01
if abs(angular.x) > ANGULAR_VELOCITY_LIMIT:
failure('pitch rate estimation is %.2f rad/s (%.2f deg/s); is copter staying still?',
angular.x, math.degrees(angular.x))
if abs(angular.y) > ANGULAR_VELOCITY_LIMIT:
failure('pitch rate estimation is %.2f rad/s (%.2f deg/s); is copter staying still?',
angular.y, math.degrees(angular.y))
if abs(angular.z) > ANGULAR_VELOCITY_LIMIT:
failure('pitch rate estimation is %.2f rad/s (%.2f deg/s); is copter staying still?',
angular.z, math.degrees(angular.z))
except rospy.ROSException:
raise Exception('No velocity estimation')
failure('no velocity estimation')
@check('Global position (GPS)')
def check_global_position():
try:
rospy.wait_for_message('mavros/global_position/global', PoseStamped, timeout=3)
rospy.wait_for_message('mavros/global_position/global', NavSatFix, timeout=1)
except rospy.ROSException:
raise Exception('No global position')
failure('no global position')
def check(name, fn):
@check('Optical flow')
def check_optical_flow():
# TODO:check FPS!
try:
fn()
rospy.loginfo('%s: OK', name)
except BaseException as e:
rospy.logwarn('%s: %s', name, str(e))
rospy.wait_for_message('mavros/px4flow/raw/send', OpticalFlowRad, timeout=0.5)
except rospy.ROSException:
failure('no optical flow data (from Raspberry)')
@check('Rangefinder')
def check_rangefinder():
# TODO: check FPS!
try:
rospy.wait_for_message('mavros/distance_sensor/rangefinder_3_sub', Range, timeout=0.5)
except rospy.ROSException:
failure('no randefinder data from Raspberry')
try:
rospy.wait_for_message('mavros/distance_sensor/rangefinder_0', Range, timeout=0.5)
except rospy.ROSException:
failure('no rangefinder data from PX4')
@check('Boot duration')
def check_boot_duration():
proc = Popen('systemd-analyze', stdout=PIPE)
proc.wait()
output = proc.communicate()[0]
r = re.compile(r'([\d\.]+)s$')
duration = float(r.search(output).groups()[0])
if duration > 15:
failure('long Raspbian boot duration: %ss (systemd-analyze for analyzing)', duration)
@check('CPU usage')
def check_cpu_usage():
WHITELIST = 'nodelet',
CMD = "top -n 1 -b -i | tail -n +8 | awk '{ printf(\"%-8s\\t%-8s\\t%-8s\\n\", $1, $9, $12); }'"
proc = Popen(CMD, stdout=PIPE, shell=True)
proc.wait()
output = proc.communicate()[0]
processes = output.split('\n')
for process in processes:
if not process:
continue
pid, cpu, cmd = process.split('\t')
if cmd.strip() not in WHITELIST and float(cpu) > 30:
failure('high CPU usage (%s%%) detected: %s (PID %s)',
cpu.strip(), cmd.strip(), pid.strip())
def selfcheck():
check('FCU', check_fcu)
check('Simple offboard node', check_simpleoffboard)
check('Main camera node', lambda: check_camera('main_camera'))
check('aruco_pose/debug topic', check_aruco)
check('IMU data', check_imu)
check('Local position', check_local_position)
check('Velocity estimation', check_velocity)
check('Global position (GPS)', check_global_position)
check_fcu()
check_imu()
check_local_position()
check_velocity()
check_global_position()
check_camera('main_camera')
check_aruco()
check_simpleoffboard()
check_optical_flow()
check_vpe()
check_rangefinder()
check_cpu_usage()
check_boot_duration()
if __name__ == '__main__':

View File

@@ -83,12 +83,13 @@ AUTO_ARM = AUTO_OFFBOARD and rospy.get_param('~auto_arm', True)
OFFBOARD_TIMEOUT = rospy.Duration(rospy.get_param('~offboard_timeout', 3))
ARM_TIMEOUT = rospy.Duration(rospy.get_param('~arm_timeout', 5))
LOCAL_POSITION_TIMEOUT = rospy.Duration(rospy.get_param('~local_position_timeout', 0.5))
NAVIGATE_AFTER_ARMED = rospy.Duration(rospy.get_param('~navigate_after_armed', False))
NAVIGATE_AFTER_ARMED = rospy.Duration(rospy.get_param('~navigate_after_armed', True))
TRANSFORM_TIMEOUT = rospy.Duration(rospy.get_param('~transform_timeout', 3))
SETPOINT_RATE = rospy.get_param('~setpoint_rate', 30)
LOCAL_FRAME = rospy.get_param('~local_frame', 'local_origin')
LOCAL_FRAME = rospy.get_param('mavros/local_position/frame_id', 'local_origin')
LAND_MODE = rospy.get_param('~land_mode', 'AUTO.LAND')
LAND_TIMEOUT = rospy.Duration(rospy.get_param('~land_timeout', 2))
DEFAULT_SPEED = rospy.get_param('~default_speed', 0.5)
def offboard_and_arm():
@@ -120,6 +121,8 @@ def offboard_and_arm():
ps = PoseStamped()
vs = Vector3Stamped()
pt = PositionTarget()
at = AttitudeTarget()
BRAKE_TIME = rospy.Duration(0)
@@ -128,7 +131,10 @@ BRAKE_TIME = rospy.Duration(0)
def get_navigate_setpoint(stamp, start, finish, start_stamp, speed):
distance = math.sqrt((finish.z - start.z)**2 + (finish.x - start.x)**2 + (finish.y - start.y)**2)
time = rospy.Duration(distance / speed)
k = (stamp - start_stamp) / time
if time == rospy.Duration(0):
k = 0
else:
k = (stamp - start_stamp) / time
time_left = start_stamp + time - stamp
if BRAKE_TIME and time_left < BRAKE_TIME:
@@ -158,14 +164,17 @@ def get_publisher_and_message(req, stamp, continued=True, update_frame=True):
ps.header.stamp = stamp
vs.header.stamp = stamp
# don't block on setpoints publishing
transform_timeout = rospy.Duration(0.1) if continued else TRANSFORM_TIMEOUT
if isinstance(req, (srv.NavigateRequest, srv.NavigateGlobalRequest)):
global current_nav_start, current_nav_start_stamp, current_nav_finish
if update_frame:
ps.header.frame_id = req.frame_id or LOCAL_FRAME
ps.pose.position = Point(getattr(req, 'x', 0), getattr(req, 'y', 0), req.z)
ps.pose.orientation = orientation_from_euler(0, 0, req.yaw)
current_nav_finish = tf_buffer.transform(ps, LOCAL_FRAME, TRANSFORM_TIMEOUT)
ps.pose.orientation = orientation_from_euler(0, 0, req.yaw, axes='sxyz')
current_nav_finish = tf_buffer.transform(ps, LOCAL_FRAME, transform_timeout)
if isinstance(req, srv.NavigateGlobalRequest):
# Recalculate x and y from lat and lon
@@ -183,32 +192,34 @@ def get_publisher_and_message(req, stamp, continued=True, update_frame=True):
current_nav_start_stamp, req.speed)
yaw_rate_flag = math.isnan(req.yaw)
msg = PositionTarget(coordinate_frame=PT.FRAME_LOCAL_NED,
type_mask=PT.IGNORE_VX + PT.IGNORE_VY + PT.IGNORE_VZ +
PT.IGNORE_AFX + PT.IGNORE_AFY + PT.IGNORE_AFZ +
(PT.IGNORE_YAW if yaw_rate_flag else PT.IGNORE_YAW_RATE),
position=setpoint,
yaw=euler_from_orientation(current_nav_finish.pose.orientation, 'szyx')[2] - math.pi / 2,
yaw_rate=req.yaw_rate)
msg = pt
msg.coordinate_frame = PT.FRAME_LOCAL_NED
msg.type_mask = PT.IGNORE_VX + PT.IGNORE_VY + PT.IGNORE_VZ + \
PT.IGNORE_AFX + PT.IGNORE_AFY + PT.IGNORE_AFZ + \
(PT.IGNORE_YAW if yaw_rate_flag else PT.IGNORE_YAW_RATE)
msg.position = setpoint
msg.yaw = euler_from_orientation(current_nav_finish.pose.orientation, 'sxyz')[2]
msg.yaw_rate = req.yaw_rate
return position_pub, msg
elif isinstance(req, (srv.SetPositionRequest, srv.SetPositionGlobalRequest)):
ps.header.frame_id = req.frame_id or LOCAL_FRAME
ps.pose.position = Point(getattr(req, 'x', 0), getattr(req, 'y', 0), req.z)
ps.pose.orientation = orientation_from_euler(0, 0, req.yaw)
pose_local = tf_buffer.transform(ps, LOCAL_FRAME, TRANSFORM_TIMEOUT)
pose_local = tf_buffer.transform(ps, LOCAL_FRAME, transform_timeout)
if isinstance(req, srv.SetPositionGlobalRequest):
pose_local.pose.position.x, pose_local.pose.position.y = global_to_local(req.lat, req.lon)
yaw_rate_flag = math.isnan(req.yaw)
msg = PositionTarget(coordinate_frame=PT.FRAME_LOCAL_NED,
type_mask=PT.IGNORE_VX + PT.IGNORE_VY + PT.IGNORE_VZ +
PT.IGNORE_AFX + PT.IGNORE_AFY + PT.IGNORE_AFZ +
(PT.IGNORE_YAW if yaw_rate_flag else PT.IGNORE_YAW_RATE),
position=pose_local.pose.position,
yaw=euler_from_orientation(pose_local.pose.orientation, 'szyx')[2] - math.pi / 2,
yaw_rate=req.yaw_rate)
msg = pt
msg.coordinate_frame = PT.FRAME_LOCAL_NED
msg.type_mask = PT.IGNORE_VX + PT.IGNORE_VY + PT.IGNORE_VZ + \
PT.IGNORE_AFX + PT.IGNORE_AFY + PT.IGNORE_AFZ + \
(PT.IGNORE_YAW if yaw_rate_flag else PT.IGNORE_YAW_RATE)
msg.position = pose_local.pose.position
msg.yaw = euler_from_orientation(pose_local.pose.orientation, 'sxyz')[2]
msg.yaw_rate = req.yaw_rate
return position_pub, msg
elif isinstance(req, srv.SetVelocityRequest):
@@ -216,32 +227,37 @@ def get_publisher_and_message(req, stamp, continued=True, update_frame=True):
vs.header.frame_id = req.frame_id or LOCAL_FRAME
ps.header.frame_id = req.frame_id or LOCAL_FRAME
ps.pose.orientation = orientation_from_euler(0, 0, req.yaw)
pose_local = tf_buffer.transform(ps, LOCAL_FRAME, TRANSFORM_TIMEOUT)
vector_local = tf_buffer.transform(vs, LOCAL_FRAME, TRANSFORM_TIMEOUT)
pose_local = tf_buffer.transform(ps, LOCAL_FRAME, transform_timeout)
vector_local = tf_buffer.transform(vs, LOCAL_FRAME, transform_timeout)
yaw_rate_flag = math.isnan(req.yaw)
msg = PositionTarget(coordinate_frame=PT.FRAME_LOCAL_NED,
type_mask=PT.IGNORE_PX + PT.IGNORE_PY + PT.IGNORE_PZ +
PT.IGNORE_AFX + PT.IGNORE_AFY + PT.IGNORE_AFZ +
(PT.IGNORE_YAW if yaw_rate_flag else PT.IGNORE_YAW_RATE),
velocity=vector_local.vector,
yaw=euler_from_orientation(pose_local.pose.orientation, 'szyx')[2] - math.pi / 2,
yaw_rate=req.yaw_rate)
msg = pt
msg.coordinate_frame = PT.FRAME_LOCAL_NED
msg.type_mask = PT.IGNORE_PX + PT.IGNORE_PY + PT.IGNORE_PZ + \
PT.IGNORE_AFX + PT.IGNORE_AFY + PT.IGNORE_AFZ + \
(PT.IGNORE_YAW if yaw_rate_flag else PT.IGNORE_YAW_RATE)
msg.velocity = vector_local.vector
msg.yaw = euler_from_orientation(pose_local.pose.orientation, 'sxyz')[2]
msg.yaw_rate = req.yaw_rate
return position_pub, msg
elif isinstance(req, srv.SetAttitudeRequest):
ps.header.frame_id = req.frame_id or LOCAL_FRAME
ps.pose.orientation = orientation_from_euler(req.roll, req.pitch, req.yaw)
pose_local = tf_buffer.transform(ps, LOCAL_FRAME, TRANSFORM_TIMEOUT)
msg = AttitudeTarget(orientation=pose_local.pose.orientation,
thrust=req.thrust,
type_mask=AT.IGNORE_YAW_RATE + AT.IGNORE_PITCH_RATE + AT.IGNORE_ROLL_RATE)
pose_local = tf_buffer.transform(ps, LOCAL_FRAME, transform_timeout)
msg = at
msg.orientation = pose_local.pose.orientation
msg.thrust = req.thrust
msg.type_mask = AT.IGNORE_YAW_RATE + AT.IGNORE_PITCH_RATE + AT.IGNORE_ROLL_RATE
return attitude_pub, msg
elif isinstance(req, srv.SetRatesRequest):
msg = AttitudeTarget(thrust=req.thrust,
type_mask=AttitudeTarget.IGNORE_ATTITUDE,
body_rate=Vector3(req.roll_rate, req.pitch_rate, req.yaw_rate))
msg = at
msg.thrust = req.thrust
msg.type_mask = AT.IGNORE_ATTITUDE
msg.body_rate.x = req.roll_rate
msg.body_rate.y = req.pitch_rate
msg.body_rate.z = req.yaw_rate
return attitude_pub, msg
@@ -261,9 +277,12 @@ def handle(req):
rospy.logwarn('No connection to the FCU')
return {'message': 'No connection to the FCU'}
if isinstance(req, (srv.NavigateRequest, srv.NavigateGlobalRequest)) and req.speed <= 0:
rospy.logwarn('Navigate speed must be greater than zero, %s passed')
return {'message': 'Navigate speed must be greater than zero, %s passed' % req.speed}
if isinstance(req, (srv.NavigateRequest, srv.NavigateGlobalRequest)):
if req.speed < 0:
rospy.logwarn('Navigate speed must be positive, %s passed')
return {'message': 'Navigate speed must be positive, %s passed' % req.speed}
elif req.speed == 0:
req.speed = DEFAULT_SPEED
if isinstance(req, (srv.NavigateRequest, srv.NavigateGlobalRequest)) and \
(pose is None or rospy.get_rostime() - pose.header.stamp > LOCAL_POSITION_TIMEOUT):
@@ -279,14 +298,19 @@ def handle(req):
return {'message': 'Both yaw and yaw_rate cannot be NaN'}
try:
with handle_lock:
stamp = rospy.get_rostime()
current_req = req
current_pub, current_msg = get_publisher_and_message(req, stamp, False)
rospy.loginfo('Topic: %s, message: %s', current_pub.name, current_msg)
# check frame_id existance
# (for non-blocking setpoint's publishing in get_publisher_and_message)
stamp = rospy.get_rostime()
if hasattr(req, 'frame_id'):
tf_buffer.lookup_transform(req.frame_id or LOCAL_FRAME, LOCAL_FRAME, stamp, TRANSFORM_TIMEOUT)
current_msg.header.stamp = stamp
current_pub.publish(current_msg)
with handle_lock:
current_req = req
current_pub, current_msg = get_publisher_and_message(req, stamp, False)
rospy.loginfo('Topic: %s, message: %s', current_pub.name, current_msg)
current_msg.header.stamp = stamp
current_pub.publish(current_msg)
if req.auto_arm:
offboard_and_arm()
@@ -364,24 +388,31 @@ def get_telemetry(req):
frame_id = req.frame_id or LOCAL_FRAME
stamp = rospy.get_rostime()
if pose:
p = tf_buffer.transform(pose, frame_id, TRANSFORM_TIMEOUT)
res['x'] = p.pose.position.x
res['y'] = p.pose.position.y
res['z'] = p.pose.position.z
transform_timeout = rospy.Duration(0.4)
try:
if pose:
p = tf_buffer.transform(pose, frame_id, transform_timeout)
res['x'] = p.pose.position.x
res['y'] = p.pose.position.y
res['z'] = p.pose.position.z
# Calculate roll pitch and yaw as Tait-Bryan angles, order z-y-x
res['yaw'], res['pitch'], res['roll'] = euler_from_orientation(p.pose.orientation, axes='rzyx')
# Calculate roll pitch and yaw as Tait-Bryan angles, order z-y-x
res['yaw'], res['pitch'], res['roll'] = euler_from_orientation(p.pose.orientation, axes='rzyx')
except:
pass
if velocity:
v = Vector3Stamped()
v.header.stamp = velocity.header.stamp
v.header.frame_id = velocity.header.frame_id
v.vector = velocity.twist.linear
linear = tf_buffer.transform(v, frame_id, TRANSFORM_TIMEOUT)
res['vx'] = linear.vector.x
res['vy'] = linear.vector.y
res['vz'] = linear.vector.z
try:
v = Vector3Stamped()
v.header.stamp = velocity.header.stamp
v.header.frame_id = velocity.header.frame_id
v.vector = velocity.twist.linear
linear = tf_buffer.transform(v, frame_id, transform_timeout)
res['vx'] = linear.vector.x
res['vy'] = linear.vector.y
res['vz'] = linear.vector.z
except:
pass
res['yaw_rate'] = velocity.twist.angular.z
res['pitch_rate'] = velocity.twist.angular.y
@@ -428,21 +459,21 @@ def start_loop():
current_pub, current_msg = get_publisher_and_message(current_req, stamp, True,
getattr(current_req, 'update_frame', False))
current_msg.header.stamp = stamp
current_pub.publish(current_msg)
# For monitoring
if isinstance(current_msg, PositionTarget):
p = PoseStamped()
p.header.frame_id = LOCAL_FRAME
p.header.stamp = stamp
p.pose.position = current_msg.position
p.pose.orientation = orientation_from_euler(0, 0, current_msg.yaw + math.pi / 2)
target_pub.publish(p)
except Exception as e:
rospy.logwarn_throttle(10, str(e))
current_msg.header.stamp = stamp
current_pub.publish(current_msg)
# For monitoring
if isinstance(current_msg, PositionTarget):
p = PoseStamped()
p.header.frame_id = LOCAL_FRAME
p.header.stamp = stamp
p.pose.position = current_msg.position
p.pose.orientation = orientation_from_euler(0, 0, current_msg.yaw)
target_pub.publish(p)
r.sleep()

38
clever/src/vl53l1x.py Executable file
View File

@@ -0,0 +1,38 @@
#!/usr/bin/env python
# TODO: rewrite, as Python version eats 20% CPU
from __future__ import division
import rospy
import VL53L1X
from sensor_msgs.msg import Range
rospy.init_node('vl53l1x')
# range_pub = rospy.Publisher('~range', Range, queue_size=5)
# TODO: why remmaping is not working?
range_pub = rospy.Publisher('mavros/distance_sensor/rangefinder_3_sub', Range, queue_size=10)
z_shift = rospy.get_param("z_shift", 0) # TODO: move to mavros (use frame)
msg = Range()
msg.radiation_type = Range.INFRARED
msg.field_of_view = 0.471239
msg.min_range = 0
msg.max_range = 4
msg.header.frame_id = 'rangefinder'
tof = VL53L1X.VL53L1X(i2c_bus=1, i2c_address=0x29)
tof.open() # Initialise the i2c bus and configure the sensor
tof.start_ranging(3) # Start ranging, 1 = Short Range, 2 = Medium Range, 3 = Long Range
rospy.loginfo('vl53l1x: start ranging')
r = rospy.Rate(14)
while not rospy.is_shutdown():
msg.header.stamp = rospy.get_rostime()
msg.range = tof.get_distance() / 1000 + z_shift
range_pub.publish(msg)
r.sleep()
tof.stop_ranging() # Stop ranging

View File

@@ -1,60 +0,0 @@
#!/usr/bin/env python
import rospy
import subprocess
import re
from flask import Flask, send_from_directory, send_file, request, jsonify
rospy.init_node('web_server', disable_signals=True)
port = rospy.get_param('~port', 7070)
host = rospy.get_param('~host', '0.0.0.0')
serve_path = rospy.get_param('~path')
app = Flask(__name__)
@app.route('/')
def serve_index():
return send_from_directory(serve_path, 'index.html')
@app.route('/<path:path>')
def serve_static(path):
print serve_path, path
return send_from_directory(serve_path, path)
@app.route('/wifi_data/')
def get_wifi_data():
cur_ip = request.remote_addr
ip_signal = get_ip_signal()
return jsonify({'ip': cur_ip, 'signal': ip_signal[cur_ip]}), 200
def get_ip_signal():
wlan_interface = 'wlan0'
# Getting info about wifi client connected to access point. From here we know MAC and signal level
iwl = subprocess.check_output(['sudo', 'iw', 'dev', 'wlan0', 'station', 'dump']).splitlines()
mac_signal = {}
cur_client = ''
for line in iwl:
if line.find('Station') != -1:
cur_client = re.search(r'([0-9A-F]{2}[:-]){5}([0-9A-F]{2})', line, re.I).group()
if line.find('signal') != -1:
sg = re.search(r'(\[-?\d*\])', line, re.I).group()
mac_signal[cur_client] = re.sub(r'[\[\]]', '', sg)
ip_signal = {}
# Getting ip-mac mapping
ip_mac = subprocess.check_output(['arp', '-i', wlan_interface]).splitlines()
for line in ip_mac:
mac = re.search(r'([0-9A-F]{2}[:-]){5}([0-9A-F]{2})', line, re.I)
if mac is not None:
mac = mac.group()
if mac in mac_signal:
ips = re.search(r'((2[0-5]|1[0-9]|[0-9])?[0-9]\.){3}((2[0-5]|1[0-9]|[0-9])?[0-9])', line, re.I).group()
ip_signal[ips] = mac_signal[mac]
return ip_signal
rospy.loginfo('Serving on %s:%s', host, port)
app.run(host=host, port=port, threaded=True)

Binary file not shown.

View File

@@ -1,9 +0,0 @@
#!/usr/bin/env bash
# This script generates ros_lib library for Arduino for using with rosseial_arduino:
# http://wiki.ros.org/rosserial_arduino/Tutorials
# https://copterexpress.gitbooks.io/clever/content/docs/arduino.html
rm -rf ros_lib
rosrun rosserial_arduino make_libraries.py .
tar czf clever_arudino.tar.gz ros_lib

4
docs/LANGS.md Normal file
View File

@@ -0,0 +1,4 @@
# Languages
* [Русский](ru/)
* [English](en/)

View File

@@ -1,49 +0,0 @@
# Summary
* [Введение](README.md)
* [Глоссарий](glossary.md)
* [Сборка](assemble.md)
* [Первоначальная настройка](setup.md)
* [Полетные режимы](modes.md)
* [Raspberry Pi](raspberry.md)
* [Образ операционной системы на RPi](microsd_images.md)
* [Подключение Raspberry Pi к PixHawk](connection.md)
* [Подключение по Wi-Fi](wifi.md)
* [Работа с QGroundControl через Wi-Fi](gcs_bridge.md)
* [Прошивка PixHawk/PixRacer](firmware.md)
* [Пилотирование со смартфона](rc.md)
* [SSH-доступ](ssh.md)
* [Неисправности радиоаппаратуры](radioerrors.md)
* [Безопасность](safety.md)
* [Техника безопасности по пайке](tb.md)
* [Просмотр видеострима с камер](web_video_server.md)
* [Работа с ROS](ros.md)
* [MAVROS](mavros.md)
* [Автономный полет в OFFBOARD](simple_offboard.md)
* [Примеры программ](snippets.md)
* [Навигация по ArUco-маркерам](aruco.md)
* [Взаимодействие с Arduino](arduino.md)
* [Системы координат](frames.md)
* [Работа с камерой \(компьютерное зрение\)](camera.md)
* [Ориентация камеры](camera_frame.md)
* [Визуализация с помощью rviz](rviz.md)
* [Работа с SITL](sitl.md)
* [Подключение GPS](gps.md)
* [Автозапуск ПО](autolaunch.md)
* [Использование 3G-модема](3g.md)
* [Устройство сети RPi](network.md)
* [Работа с логами PX4](flight_logs.md)
* [Протокол MAVLink](mavlink.md)
* [Типы силовых разъемов](connectortypes.md)
* [Ошибки радиоаппаратуры](radioerrors1.md)
* [Настройка PID](calibratePID.md)
* Учебник
* [Теория и видеоуроки](lessons.md)
* [Учебно-методическое пособие](metod.md)
* [Контрольные и проверочные материалы](tests.md)
* [Другое](drugoe.md)
* [CopterHack-2017](copterhack2017.md)
* [Прошивка ESC контроллеров с помощью Arduino](esc_firmware.md)
* [Работа со светодиодной лентой](leds.md)
* [Проекты на базе коптера "Клевер"](projects.md)
* [Полезные ссылки](links.md)

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
docs/assets/alcopter.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 751 KiB

After

Width:  |  Height:  |  Size: 230 KiB

BIN
docs/assets/brrc2205on.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
docs/assets/butterfly.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 KiB

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