diff --git a/docs/en/camera.md b/docs/en/camera.md index 16b68c9c..2620facd 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,41 @@ 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. + +## 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 -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 +96,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 +130,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 + + +``` + ## Компьютерное зрение Для реализации алгоритмов компьютерного зрения рекомендуется использовать предустановленную на [образ SD-карты](image.md) библиотеку [OpenCV](https://opencv.org). 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.