mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 21:19:35 +00:00
aruco.launch: add placement, length and map arguments
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
<arg name="aruco_detect" default="true"/>
|
||||
<arg name="aruco_map" default="false"/>
|
||||
<arg name="aruco_vpe" default="false"/>
|
||||
<arg name="placement" default="floor"/> <!-- markers placement: floor, ceiling, unknown -->
|
||||
<arg name="length" default="0.33"/> <!-- not-in-map markers length, m -->
|
||||
<arg name="map" default="map.txt"/> <!-- markers map file name -->
|
||||
|
||||
<!-- For additional help go to https://clover.coex.tech/aruco -->
|
||||
|
||||
@@ -12,11 +15,14 @@
|
||||
<remap from="map_markers" to="aruco_map/markers" if="$(arg aruco_map)"/>
|
||||
<param name="estimate_poses" value="true"/>
|
||||
<param name="send_tf" value="true"/>
|
||||
<param name="known_tilt" value="map"/>
|
||||
<param name="length" value="0.33"/>
|
||||
<param name="known_tilt" value="map" if="$(eval placement == 'floor')"/>
|
||||
<param name="known_tilt" value="map_flipped" if="$(eval position == 'ceiling')"/>
|
||||
<param name="length" value="$(arg length)"/>
|
||||
<!-- aruco detector parameters -->
|
||||
<param name="cornerRefinementMethod" value="2"/> <!-- contour refinement -->
|
||||
<param name="minMarkerPerimeterRate" value="0.075"/> <!-- 0.075 for 320x240, 0.0375 for 640x480 -->
|
||||
<!-- length override example: -->
|
||||
<!-- <param name="length_override/3" value="0.1"/> -->
|
||||
</node>
|
||||
|
||||
<!-- aruco_map: estimate aruco map pose -->
|
||||
@@ -24,8 +30,9 @@
|
||||
<remap from="image_raw" to="main_camera/image_raw"/>
|
||||
<remap from="camera_info" to="main_camera/camera_info"/>
|
||||
<remap from="markers" to="aruco_detect/markers"/>
|
||||
<param name="map" value="$(find aruco_pose)/map/map.txt"/>
|
||||
<param name="known_tilt" value="map"/>
|
||||
<param name="map" value="$(find aruco_pose)/map/$(arg map)"/>
|
||||
<param name="known_tilt" value="map" if="$(eval placement == 'floor')"/>
|
||||
<param name="known_tilt" value="map_flipped" if="$(eval placement == 'ceiling')"/>
|
||||
<param name="image_axis" value="true"/>
|
||||
<param name="frame_id" value="aruco_map_detected" if="$(arg aruco_vpe)"/>
|
||||
<param name="frame_id" value="aruco_map" unless="$(arg aruco_vpe)"/>
|
||||
|
||||
@@ -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
|
||||
<param name="map" value="$(find aruco_pose)/map/map.txt"/>
|
||||
<arg name="map" default="map.txt"/>
|
||||
```
|
||||
|
||||
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
|
||||
<param name="known_tilt" value="map_flipped"/>
|
||||
<arg name="placement" default="ceiling"/>
|
||||
```
|
||||
|
||||
This will flip the `aruco_map` frame (making its **<font color=blue>z</font>** axis point downward). Thus, in order to fly 2 metres below ceiling, the `z` argument for the `navigate` service should be set to 2:
|
||||
|
||||
@@ -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
|
||||
<arg name="aruco_detect" default="true"/>
|
||||
```
|
||||
|
||||
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
|
||||
<param name="length" value="0.32"/> <!-- length of a single marker, in meters (excluding the white border) -->
|
||||
<param name="estimate_poses" value="true"/> <!-- position estimation for single markers -->
|
||||
<param name="send_tf" value="true"/> <!-- TF frame creation for markers -->
|
||||
<param name="known_tilt" value="map"/> <!-- Marker tilt, explained below -->
|
||||
<arg name="placement" default="floor"/> <!-- markers' placement, explained below -->
|
||||
<arg name="length" default="0.33"/> <!-- length of a single marker, in meters (excluding the white border) -->
|
||||
```
|
||||
|
||||
`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
|
||||
<param name="length_override/3" value="0.1"/> <!-- marker with id=3 has a side of 0.1m -->
|
||||
|
||||
@@ -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
|
||||
<param name="map" value="$(find aruco_pose)/map/map.txt"/>
|
||||
<arg name="map" default="map.txt"/>
|
||||
```
|
||||
|
||||
Смотрите примеры карт маркеров в каталоге [`~/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
|
||||
<param name="known_tilt" value="map_flipped"/>
|
||||
<arg name="placement" default="ceiling"/>
|
||||
```
|
||||
|
||||
При такой конфигурации фрейм `aruco_map` также окажется перевернутым. Таким образом, для полета на высоту 2 метра ниже потолка, аргумент `z` нужно устанавливать в 2:
|
||||
|
||||
@@ -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 @@
|
||||
<arg name="aruco_detect" default="true"/>
|
||||
```
|
||||
|
||||
Для правильной работы в этом же файле в секции `aruco_detect` должны быть выставлены параметры:
|
||||
Для правильной работы в этом же файле также должны быть выставлены аргументы:
|
||||
|
||||
```xml
|
||||
<param name="length" value="0.32"/> <!-- размер маркеров в метрах (не включая белую рамку) -->
|
||||
<param name="estimate_poses" value="true"/> <!-- включение вычисления позиций маркеров -->
|
||||
<param name="send_tf" value="true"/> <!-- отправлять позиции маркеров в виде TF-фреймов -->
|
||||
<param name="known_tilt" value="map"/> <!-- наклон маркеров, см. далее -->
|
||||
<arg name="placement" default="floor"/> <!-- расположение маркеров, см. далее -->
|
||||
<arg name="length" default="0.33"/> <!-- размер маркеров в метрах (не включая белую рамку) -->
|
||||
```
|
||||
|
||||
Значение параметра `known_tilt` следует выставлять следующим образом:
|
||||
Значение аргумента `placement` следует выставлять следующим образом:
|
||||
|
||||
* если *все* маркеры наклеены на полу (земле), выставить значение `map`;
|
||||
* если *все* маркеры наклеены на потолке, выставить значение `map_flipped`;
|
||||
* если *все* маркеры наклеены на полу (земле), выставить значение `floor`;
|
||||
* если *все* маркеры наклеены на потолке, выставить значение `ceiling`;
|
||||
* в противном случае удалить строку с параметром.
|
||||
|
||||
Если некоторые маркеры имеют размер, отличный значения `length`, их размер может быть переопределен с помощью параметра `length_override`:
|
||||
Если некоторые маркеры имеют размер, отличный значения `length`, их размер может быть переопределен с помощью параметра `length_override` ноды `aruco_detect`:
|
||||
|
||||
```xml
|
||||
<param name="length_override/3" value="0.1"/> <!-- маркер c id 3 имеет размер 10 см -->
|
||||
|
||||
Reference in New Issue
Block a user