From 975b348b90523e9ba0ffcb15902f7f05ed0581f2 Mon Sep 17 00:00:00 2001 From: Alexey Rogachevskiy Date: Mon, 7 Oct 2019 15:29:42 +0300 Subject: [PATCH 1/3] docs: Update camera EN article --- docs/en/camera.md | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/docs/en/camera.md b/docs/en/camera.md index 16b68c9c..b8dc5684 100644 --- a/docs/en/camera.md +++ b/docs/en/camera.md @@ -1,12 +1,12 @@ # Working with the camera -To work with the main camera, make sure it is enabled in file `~/catkin_ws/src/clever/clever/launch/clever.launch`: +Make sure the camera is enabled in the `~/catkin_ws/src/clever/clever/launch/clever.launch` file: ```xml ``` -Also make sure that [correct position and orientation are indicated] for the camera (camera_frame.md). +Also make sure that [position and orientation of the camera](camera_frame.md) is correct. The `clever` package must be restarted after the launch-file has been edited: @@ -14,11 +14,29 @@ The `clever` package must be restarted after the launch-file has been edited: sudo systemctl restart clever ``` -For monitoring images from the camera, you may use rqt or [web_video_server](web_video_server.md). +You may use rqt or [web_video_server](web_video_server.md) to view the camera stream. + +## Troubleshooting + +If the camera stream is missing, try using the [`raspistill`](https://www.raspberrypi.org/documentation/usage/camera/raspicam/raspistill.md) utility to check whether the camera works. + +First, stop the Clever service: + +```bash +sudo systemctl stop clever +``` + +Then use `raspistill` to capture an image from the camera: + +```bash +raspistill -o test-image.jpeg +``` + +If it doesn't work, check the camera cable connections and the cable itself. Replace the cable if it is damaged. Also, make sure the camera screws don't touch any components on the camera board. ## Computer vision -For implementation of the computer vision algorithms, it is recommended to use the [OpenCV] library that is pre-installed in [the SD card image] (image.md) (https://opencv.org). +The [SD card image](image.md) comes with a preinstalled [OpenCV](https://opencv.org) library, which is commonly used for various comupter vision-related tasks. Additional libraries for converting from ROS messages to OpenCV images and back are preinstalled as well. ### Python @@ -66,11 +84,11 @@ The obtained images can be viewed using [web_video_server](web_video_server.md). To program actions of the copter upon detection of [QR codes](https://en.wikipedia.org/wiki/QR_code) you can use the [ZBar] library (http://zbar.sourceforge.net). It should be installed using pip: -```(bash) +```bash sudo pip install zbar ``` -Recognizing QR codes in Python: +QR codes recognition in Python: ```python import cv2 @@ -100,7 +118,7 @@ def image_callback(data): image_sub = rospy.Subscriber('main_camera/image_raw', Image, image_callback, queue_size=1) ``` -The script will take up to 100% CPU capacity. To slow down the script artificially, you can run [throttling](http://wiki.ros.org/topic_tools/throttle) of frames from the camera, for example, at 5 Hz (`main_camera.launch`): +The script will take up to 100% CPU capacity. To slow down the script artificially, you can use [throttling](http://wiki.ros.org/topic_tools/throttle) of frames from the camera, for example, at 5 Hz (`main_camera.launch`): ```xml Date: Mon, 7 Oct 2019 16:46:48 +0300 Subject: [PATCH 2/3] docs: Add manual exposure parameters (en/ru) --- docs/en/camera.md | 12 ++++++++++++ docs/ru/camera.md | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/docs/en/camera.md b/docs/en/camera.md index b8dc5684..2620facd 100644 --- a/docs/en/camera.md +++ b/docs/en/camera.md @@ -34,6 +34,18 @@ raspistill -o test-image.jpeg If it doesn't work, check the camera cable connections and the cable itself. Replace the cable if it is damaged. Also, make sure the camera screws don't touch any components on the camera board. +## Camera parameters + +Some camera parameters, such as image size, FPS cap, and exposure, may be configured in the `main_camera.launch` file. The list of supported parameters can be found [in the cv_camera repository](https://github.com/OTL/cv_camera#parameters). + +Additionally you can specify an arbitrary capture parameter using its [OpenCV code](https://docs.opencv.org/3.3.1/d4/d15/group__videoio__flags__base.html). For example, add the following parameters to the camera node to set exposition manually: + +```xml + + + +``` + ## Computer vision The [SD card image](image.md) comes with a preinstalled [OpenCV](https://opencv.org) library, which is commonly used for various comupter vision-related tasks. Additional libraries for converting from ROS messages to OpenCV images and back are preinstalled as well. diff --git a/docs/ru/camera.md b/docs/ru/camera.md index 24bd3946..830e6019 100644 --- a/docs/ru/camera.md +++ b/docs/ru/camera.md @@ -36,6 +36,18 @@ raspistill -o test-image.jpg Если команда завершается с ошибкой, проверьте качество подключения шлейфа камеры к Raspberry Pi или замените его. +## Настройки камеры + +Ряд параметров камеры - размер изображения, максимальную частоту кадров, экспозицию - можно настроить в файле `main_camera.launch`. Список настраиваемых параметров можно [посмотреть в репозитории cv_camera](https://github.com/OTL/cv_camera#parameters). + +Параметры, не указанные в этом списке, можно указывать через [код параметра OpenCV](https://docs.opencv.org/3.3.1/d4/d15/group__videoio__flags__base.html). Например, для установки фиксированной экспозиции добавьте следующие параметры в ноду камеры: + +```xml + + + +``` + ## Компьютерное зрение Для реализации алгоритмов компьютерного зрения рекомендуется использовать предустановленную на [образ SD-карты](image.md) библиотеку [OpenCV](https://opencv.org). From 98bfb6eb81cfb40829da24cc2a24e8ab9374c145 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Thu, 10 Oct 2019 18:20:04 +0300 Subject: [PATCH 3/3] docs: create Copter Hack 2019 page --- docs/ru/SUMMARY.md | 1 + docs/ru/copterhack2019.md | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 docs/ru/copterhack2019.md diff --git a/docs/ru/SUMMARY.md b/docs/ru/SUMMARY.md index 43e4a184..183b231c 100644 --- a/docs/ru/SUMMARY.md +++ b/docs/ru/SUMMARY.md @@ -74,6 +74,7 @@ * [Светодиодная лента (legacy)](leds_old.md) * [Вклад в Клевер](contributing.md) * Мероприятия + * [CopterHack-2019](copterhack2019.md) * [Олимпиада НТИ 2019](nti2019.md) * [CopterHack-2018](copterhack2018.md) * [CopterHack-2017](copterhack2017.md) diff --git a/docs/ru/copterhack2019.md b/docs/ru/copterhack2019.md new file mode 100644 index 00000000..6e96e0bf --- /dev/null +++ b/docs/ru/copterhack2019.md @@ -0,0 +1,19 @@ +# Copter Hack 2019 + +Хакатон [Copter Hack 2018](https://copterexpress.timepad.ru/event/768108/) проходит 11–13 октября в Технополисе "Москва". + +Официальный сайт: https://ru.coex.tech/copterhack. + +Чат хакатона: https://t.me/CopterHack. + +Timepad: https://copterexpress.timepad.ru/event/1017592/. + +## Информация для участников + +## Лекции + +Лекция 1: введение – https://www.youtube.com/watch?v=cjtmZNuq7z0. + +Лекция 2: настройка полетного контроллера – https://www.youtube.com/watch?v=PJNDYFPZQms. + +Лекция 3: архитектура полетного контроллера PX4 – https://www.youtube.com/watch?v=_jl7FImq3jk.