This commit is contained in:
Oleg Kalachev
2020-12-08 01:12:25 +03:00
parent 873befdba9
commit 7831992d6a
2 changed files with 11 additions and 11 deletions

View File

@@ -1,20 +1,20 @@
# Navigation through ArUco-markers
The algorithm of the navigation through visual ArUco-markers, that was realized in the image of Clever, supports the flexible configuration of the markers in area. It allows you to place them on any surface, at any angle.
The algorithm of the navigation through visual ArUco-markers, that was implemented in the Clever image, supports the flexible configuration of the markers in area. It allows you to place them on any surface, at any angle.
## Installing the vertical camera mount
For a better recognition of the markers, you need to set the camera vertically so that the lens is pointed parallel to the horizon.
<**Note** The configuration file allows you to configure the location of the camera in area relative to the copter in any way. For your convenience, we will review the option of installing the camera at an angle of 90 degrees to the horizon in the direction of the copter's nose.
> **Note** The configuration file allows you to configure the location of the camera in area relative to the copter in any way. For your convenience, we will review the option of installing the camera at an angle of 90 degrees to the horizon in the direction of the copter's nose.
### Camera mount, 3D printing
Print the [camera mount](models.md#clover-3)
Print the [camera mount](models.md#clover-3).
Instal the mount in a convenient location, so that the camera has a minimum number of unnecessary objects (protection, legs, propellers, beams) — all of it will negatively affect the recognition of the markers.
Install the mount in a convenient location, so that the camera has a minimum number of unnecessary objects (protection, legs, propellers, beams) — all of it will negatively affect the recognition of the markers.
## Setting the camera location
## Setting the camera transform
To set the camera position at the desired angle, open the file `main_camera.launch`, located in `~/catkin_ws/src/clover/clover/launch/`.
@@ -31,11 +31,11 @@ sed -i "/direction_y/s/default=\".*\"/default=\"\"/" /home/pi/catkin_ws/src/clov
Edit one of the configuration lines or add the line shown bellow:
```
```xml
<node pkg="tf2_ros" type="static_transform_publisher" name="main_camera_frame" args="0.05 0 0.05 -1.5707963 0 -1.5707963 base_link main_camera_optical"/>
```
<**Note**. Only one camera configuration can be used at a time. If you insert the line above, don't forget to comment the currently active one. The syntax highlighting system will help you determine that — the active line will be highlighted in a different color than the comments. To comment, add the *<!-- и -->* symbols at the beginning and the end respectively.
> **Note**. Only one camera configuration can be used at a time. If you insert the line above, don't forget to comment the currently active one. The syntax highlighting system will help you determine that — the active line will be highlighted in a different color than the comments. To comment, add the `<!--` and `-->` symbols at the beginning and the end respectively.
If you are using the marker map, where the markers have equal distances along the x and y axes, you can use [script for creating markers map `gen_map.py`](aruco_map.md#marker-map-definition). Otherwise, you will need to set them manually. To do this, go to the directory `map_name.txt` and create a map file. Fill out your map according to the [map syntax](aruco_map.md#marker-map-definition). Here is an example of a marker map with a random marker location:
@@ -55,4 +55,4 @@ If you are using markers that are not linked to horizontal surfaces (floor, ceil
sed -i "/known_tilt/s/value=\".*\"/value=\"\"/" /home/pi/catkin_ws/src/clover/clover/launch/aruco.launch
```
After all the settings, call `sudo systemctl restart clover` to restart the `clover`.
After all the settings, call `sudo systemctl restart clover` to restart the `clover` service.

View File

@@ -22,7 +22,7 @@
nano ~/catkin_ws/src/clover/clover/launch/main_camera.launch
```
### Версии 0.20>
### Версии 0.20+
В параметрах `direction_x`, `direction_y` установите пустые значения вручную или введите строки:
@@ -33,11 +33,11 @@ sed -i "/direction_y/s/default=\".*\"/default=\"\"/" /home/pi/catkin_ws/src/clov
Отредактируйте одну из конфигурационных строк или добавьте строку, представленную ниже:
```
```xml
<node pkg="tf2_ros" type="static_transform_publisher" name="main_camera_frame" args="0.05 0 0.05 -1.5707963 0 -1.5707963 base_link main_camera_optical"/>
```
> **Note** Одновременно может использоваться только одна конфигурация камеры — если вы вставляете представленную выше строку, не забудьте закомментировать активную на данный момент. Для определения этого вам поможет подсветка синтаксиса — активная строка будет подсвечена отличным от комментариев цветом. Для комментирования в начало и конец строки добавьте символы *<!-- и -->* соответственно.
> **Note** Одновременно может использоваться только одна конфигурация камеры — если вы вставляете представленную выше строку, не забудьте закомментировать активную на данный момент. Для определения этого вам поможет подсветка синтаксиса — активная строка будет подсвечена отличным от комментариев цветом. Для комментирования в начало и конец строки добавьте символы `<!--` и `-->` соответственно.
Если на используемой вами карте, маркеры имеют равное расстояние по осям *X* и *Y*, можете воспользоваться [утилитой для создания карт `gen_map.py`](aruco_map.md#настройка-карты-маркеров). В ином случае, вам потребуется задать их вручную — для этого перейдите в директорию `~/catkin_ws/src/clover/aruco_map/map` и создайте файл карты `map_name.txt`. Заполните вашу карту в соответствии с [синтаксисом карт](aruco_map.md#настройка-карты-маркеров). Пример карты маркеров со случайным расположением маркеров: