From d6590e9a8d0a35ae08256b0bac11ab7d74b97e18 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Tue, 20 Oct 2020 13:22:55 +0300 Subject: [PATCH] aruco.launch: add placement, length and map arguments --- clover/launch/aruco.launch | 15 +++++++++++---- docs/en/aruco_map.md | 15 ++++++++++----- docs/en/aruco_marker.md | 20 +++++++++++--------- docs/ru/aruco_map.md | 14 +++++++++----- docs/ru/aruco_marker.md | 20 +++++++++++--------- 5 files changed, 52 insertions(+), 32 deletions(-) diff --git a/clover/launch/aruco.launch b/clover/launch/aruco.launch index c4ce5781..a5a727b0 100644 --- a/clover/launch/aruco.launch +++ b/clover/launch/aruco.launch @@ -2,6 +2,9 @@ + + + @@ -12,11 +15,14 @@ - - + + + + + @@ -24,8 +30,9 @@ - - + + + diff --git a/docs/en/aruco_map.md b/docs/en/aruco_map.md index a873b27e..f4e3af4c 100644 --- a/docs/en/aruco_map.md +++ b/docs/en/aruco_map.md @@ -1,5 +1,9 @@ # Map-based navigation with ArUco markers +> **Note** The following applies to [image versions](image.md) **0.22** and up. Older documentation is still available for [for version **0.20**](https://github.com/CopterExpress/clover/blob/v0.20/docs/en/aruco_map.md). + + + > **Info** Marker detection requires the camera module to be correctly plugged in and [configured](camera_setup.md). @@ -39,13 +43,14 @@ marker_id marker_size x y z z_angle y_angle x_angle `N_angle` is the angle of rotation along the `N` axis in radians. -Map path is defined in the `map` parameter: +Файлы карт располагаются в каталоге `~/catkin_ws/src/clover/aruco_pose/map`. Название файла с картой задается в аргументе `map`: +Map files are located at the `~/catkin_ws/src/clover/aruco_pose/map` directory. Map file name is defined in the `map` argument: ```xml - + ``` -Some map examples are provided in [`~/catkin_ws/src/clover/aruco_pose/map`](https://github.com/CopterExpress/clover/tree/master/aruco_pose/map). +Some map examples are provided in [the directory](https://github.com/CopterExpress/clover/tree/master/aruco_pose/map). Grid maps may be generated using the `genmap.py` script: @@ -152,10 +157,10 @@ If the drone's altitude is not stable, try increasing the `MPC_Z_VEL_P` paramete In order to navigate using markers on the ceiling, mount the onboard camera so that it points up and [adjust the camera frame accordingly](camera_setup.md). -You should also set the `known_tilt` parameter to `map_flipped` in both `aruco_detect` and `aruco_map` sections of `~/catkin_ws/src/clover/clover/launch/aruco.launch`: +You should also set the `placement` parameter to `ceilin` in `~/catkin_ws/src/clover/clover/launch/aruco.launch`: ```xml - + ``` This will flip the `aruco_map` frame (making its **z** axis point downward). Thus, in order to fly 2 metres below ceiling, the `z` argument for the `navigate` service should be set to 2: diff --git a/docs/en/aruco_marker.md b/docs/en/aruco_marker.md index 7c1c218b..f2208f25 100644 --- a/docs/en/aruco_marker.md +++ b/docs/en/aruco_marker.md @@ -1,5 +1,9 @@ # ArUco marker detection +> **Note** The following applies to [image versions](image.md) **0.22** and up. Older documentation is still available for [for version **0.20**](https://github.com/CopterExpress/clover/blob/v0.20/docs/en/aruco_marker.md). + + + > **Info** Marker detection requires the camera module to be correctly plugged in and [configured](camera.md). `aruco_detect` module detects ArUco markers and publishes their positions in ROS topics and as [TF frames](frames.md). @@ -22,22 +26,20 @@ For enabling detection set the `aruco_detect` argument in `~/catkin_ws/src/clove ``` -For the module to work correctly the following parameters should be set: +For the module to work correctly the following arguments should also be set: ```xml - - - - + + ``` -`known_tilt` should be set to: +`placement` argument should be set to: -* `map` if *all* markers are on the ground; -* `map_flipped` if *all* markers are on the ceiling; +* `floor` if *all* markers are on the ground; +* `ceiling` if *all* markers are on the ceiling; * an empty string otherwise. -You may specify length for each marker individually by using the `length_override` parameter: +You may specify length for each marker individually by using the `length_override` parameter of the node `aruco_detect`: ```xml diff --git a/docs/ru/aruco_map.md b/docs/ru/aruco_map.md index f43a5621..4e8d7764 100644 --- a/docs/ru/aruco_map.md +++ b/docs/ru/aruco_map.md @@ -1,5 +1,9 @@ # Навигация по картам ArUco-маркеров +> **Note** Документация для версий [образа](image.md), начиная с версии **0.22**. Для более ранних версий см. [документацию для версии **0.20**](https://github.com/CopterExpress/clover/blob/v0.20/docs/ru/aruco_map.md). + + + > **Info** Для распознавания маркеров модуль камеры должен быть корректно подключен и [сконфигурирован](camera.md). @@ -39,13 +43,13 @@ id_маркера размер_маркера x y z угол_z угол_y уго Где `угол_N` – это угол поворота маркера вокруг оси N в радианах. -Путь к файлу с картой задается в параметре `map`: +Файлы карт располагаются в каталоге `~/catkin_ws/src/clover/aruco_pose/map`. Название файла с картой задается в аргументе `map`: ```xml - + ``` -Смотрите примеры карт маркеров в каталоге [`~/catkin_ws/src/clover/aruco_pose/map`](https://github.com/CopterExpress/clover/tree/master/aruco_pose/map). +Смотрите примеры карт маркеров в [`вышеуказанном каталоге`](https://github.com/CopterExpress/clover/tree/master/aruco_pose/map). Файл карты может быть сгенерирован с помощью инструмента `genmap.py`: @@ -154,10 +158,10 @@ navigate(frame_id='aruco_5', x=0, y=0, z=1) Для навигации по маркерам, расположенным на потолке, необходимо поставить основную камеру так, чтобы она смотрела вверх и [установить соответствующий фрейм камеры](camera_setup.md#frame). -Также в файле `~/catkin_ws/src/clover/clover/launch/aruco.launch` необходимо установить параметр `known_tilt` в секциях `aruco_detect` и `aruco_map` в значение `map_flipped`: +Также в файле `~/catkin_ws/src/clover/clover/launch/aruco.launch` необходимо выставить аргумент `placement` в значение `ceiling`: ```xml - + ``` При такой конфигурации фрейм `aruco_map` также окажется перевернутым. Таким образом, для полета на высоту 2 метра ниже потолка, аргумент `z` нужно устанавливать в 2: diff --git a/docs/ru/aruco_marker.md b/docs/ru/aruco_marker.md index bddda97d..d7599544 100644 --- a/docs/ru/aruco_marker.md +++ b/docs/ru/aruco_marker.md @@ -1,5 +1,9 @@ # Распознавание ArUco-маркеров +> **Note** Документация для версий [образа](image.md), начиная с версии **0.22**. Для более ранних версий см. [документацию для версии **0.20**](https://github.com/CopterExpress/clover/blob/v0.20/docs/ru/aruco_marker.md). + + + > **Info** Для распознавания маркеров модуль камеры должен быть корректно подключен и [сконфигурирован](camera_setup.md). Модуль `aruco_detect` распознает ArUco-маркеры и публикует их позиции в ROS-топики и в [TF](frames.md). @@ -22,22 +26,20 @@ ``` -Для правильной работы в этом же файле в секции `aruco_detect` должны быть выставлены параметры: +Для правильной работы в этом же файле также должны быть выставлены аргументы: ```xml - - - - + + ``` -Значение параметра `known_tilt` следует выставлять следующим образом: +Значение аргумента `placement` следует выставлять следующим образом: -* если *все* маркеры наклеены на полу (земле), выставить значение `map`; -* если *все* маркеры наклеены на потолке, выставить значение `map_flipped`; +* если *все* маркеры наклеены на полу (земле), выставить значение `floor`; +* если *все* маркеры наклеены на потолке, выставить значение `ceiling`; * в противном случае удалить строку с параметром. -Если некоторые маркеры имеют размер, отличный значения `length`, их размер может быть переопределен с помощью параметра `length_override`: +Если некоторые маркеры имеют размер, отличный значения `length`, их размер может быть переопределен с помощью параметра `length_override` ноды `aruco_detect`: ```xml