Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
16776ac
refactor: restructure the integration, remove obsolete description of…
fszkudlarek Jun 15, 2026
3807c16
feat: add description of new way of starting aruco tracking
fszkudlarek Jun 15, 2026
61629a2
refactor: adjust description of aruco config file
fszkudlarek Jun 15, 2026
9b930fe
fix: change launch file path to the absolute one
fszkudlarek Jun 22, 2026
7eb34ef
style: fix the formatting
fszkudlarek Jun 22, 2026
d15aac0
fix: add guide to update the 'apt' before trying to install package
fszkudlarek Jun 22, 2026
d02a37d
fix: add missing slashes before 'etc'
fszkudlarek Jun 22, 2026
967464c
fix: move sourcing after building the package
fszkudlarek Jun 26, 2026
6653fc7
feat: add an information that ArUco tracking has to be enabled accord…
fszkudlarek Jun 26, 2026
f2e9169
fix: guide to use the LeoOS alias to restart the nodes to start tracker
fszkudlarek Jun 26, 2026
60dae66
feat: add information about possibility of adding a follower config file
fszkudlarek Jun 26, 2026
58c6ac2
feature: add alternative way of running the tracker and explain the d…
fszkudlarek Jun 26, 2026
e9e78ce
refactor: update images to the newer ones
fszkudlarek Jun 29, 2026
9a6ec2e
style: rephrase tip and warning
fszkudlarek Jun 29, 2026
bea153d
Merge branch 'development' into content/aruco-marker-update
bjsowa Jun 29, 2026
62ab22e
Fix inconsistent ROS capitalization
fszkudlarek Jun 29, 2026
0aea99a
Fix typo
fszkudlarek Jun 29, 2026
1cc3b89
fix follower/tracker typo
fszkudlarek Jun 29, 2026
c584fe3
Make the sentence smoother
fszkudlarek Jun 29, 2026
7c155de
Change Aruco to ArUco, add setup block title
fszkudlarek Jun 29, 2026
00dae12
Fix links and titles of 'What's next' sections
fszkudlarek Jun 29, 2026
ff3701f
Polish 'What to expect' sentence
fszkudlarek Jun 29, 2026
33ad7a7
Preface starting tracking with a preface, that it is installed in LeoOS
fszkudlarek Jun 29, 2026
3c73940
Remove unnecessary mention
fszkudlarek Jun 29, 2026
7fd73e9
Update docs/integrations/software/aruco-tracking.mdx
fszkudlarek Jun 29, 2026
c53c494
Update docs/integrations/software/aruco-tracking.mdx
fszkudlarek Jun 29, 2026
d57baa1
Remove em-dash
fszkudlarek Jun 29, 2026
9e256b5
Describe following more precisely
fszkudlarek Jun 29, 2026
eb717fa
Fix formatting
fszkudlarek Jun 29, 2026
83626e4
Language change
fszkudlarek Jun 29, 2026
c530aea
Polish 'What's next'
fszkudlarek Jun 29, 2026
b47f2f9
Remove separate block with 'sudo apt update'
fszkudlarek Jun 29, 2026
a8e065b
Revert changes in 'package.json' and 'package-lock.json', minor lagua…
fszkudlarek Jun 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 44 additions & 88 deletions docs/integrations/software/aruco-tracking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ vision to support tasks such as localization, mapping, and navigation. These
visual markers provide a reliable, easily detectable point of reference that
helps robots perceive and interpret their environment with precision.

In this example, we will use
[ros_aruco_opencv](https://github.com/fictionlab/ros_aruco_opencv/tree/jazzy)
package for detecting individual markers.

As sending raw images from the camera via wireless network may be insufficient,
we will relay all the processing to the Raspberry Pi.

Expand All @@ -42,7 +38,8 @@ we will relay all the processing to the Raspberry Pi.

## What to expect?

After this tutorial is completed, you should end up with something like this:
After this tutorial is completed, you will be able to detect and visualize ArUco
tags like this:

<div className="video-container">
<LiteYouTubeEmbed
Expand Down Expand Up @@ -74,7 +71,10 @@ could use the output in your custom nodes.

## Software integration

### Installing the packages
### Starting the ArUco tracking

LeoOS comes with the ArUco tag detection packages preinstalled, so you don't
need to install anything - they just need to be enabled.

Start by logging in into your rover via SSH:

Expand All @@ -85,86 +85,40 @@ Start by logging in into your rover via SSH:
terminal using Putty or OpenSSH."
/>

Install `aruco-opencv` package:
Start ArUco tracking by setting the corresponding environment variable to `true`
in `/etc/ros/setup.bash`:

```bash
sudo apt install ros-${ROS_DISTRO}-aruco-opencv
```bash title="/etc/ros/setup.bash"
export START_ARUCO_TRACKING=true
```

### Creating launch and configuration files

To launch the tracker, you can use the launch file from the installed
`aruco-opencv` package or you can create your own. In this guide, we will show
you how to create a launch file which provides basic config for detecting single
markers.

In `/etc/ros`, create a `yaml` configuration file. This simple example sets the
basic parameters for the node.

```yaml title="/etc/ros/tracker.yaml"
/**:
ros__parameters:
cam_base_topic: camera/image_color
output_frame: 'base_link'
And restart the ROS nodes:

marker_dict: 4X4_50

publish_tf: true
marker_size: 0.15

aruco:
adaptiveThreshWinSizeMin: 3
adaptiveThreshWinSizeMax: 23
adaptiveThreshWinSizeStep: 10
```bash
ros-nodes-restart
```

:::info

You will most likely need to change marker_size parameter depending on the
actual size of your printed ArUco tag.
ArUco tracker configuration can be found in `/etc/ros/aruco_tracker.yaml`. By
default it is configured to track markers from `4X4_50` ArUco dictionary with
marker side size of 15cm. If you plan to use different sizes or dictionaries for
your ArUco markers, `/etc/ros/aruco_tracker.yaml` has to be adjusted
appropriately.

The parameters in `aruco` namespace are dynamic reconfigure parameters - which
means you can change them as the node is working using `rqt` (in
`dynamic reconfigure` plugin). You can play with their values and then add
chosen parameters to the `yaml` file.
The parameters in the `aruco` namespace can be changed at runtime while the node
is working - either with `ros2 param set` or using the `rqt_reconfigure` GUI
tool. Feel free to play around with different configurations and then add the
chosen parameters to the `/etc/ros/aruco_tracker.yaml` file.

You can find a detailed description of each parameter in the `aruco` namespace
[here](https://docs.opencv.org/4.6.0/d5/dae/tutorial_aruco_detection.html).

:::

Next, also in `/etc/ros`, create a launch file that will use the previously
added configuration with the tracker node.

```xml title="/etc/ros/tracker.launch.xml"
<launch version="0.1.1">
<node pkg="aruco_opencv" exec="aruco_tracker_autostart">
<param from="/etc/ros/tracker.yaml" />
</node>
</launch>
```

Now you can run the tracker with this command:

```bash
ros2 launch /etc/ros/tracker.launch.xml
```

or you can include your launch file in the `robot.launch.xml` file so that the
node will start at boot. To do so, put this line somewhere before the closing
`</launch>` tag.

```xml title="/etc/ros/robot.launch.xml"
<include file="/etc/ros/tracker.launch.xml"/>
```

Now you need to reboot the rover, or restart the ros nodes

```bash
ros-nodes-restart
```
## Example usage

## Generate ArUco markers
### Generating ArUco markers

Now, we need to create some markers, so go back to your computer.

Expand Down Expand Up @@ -247,17 +201,17 @@ Open RViz by typing `rviz2` in the terminal and set Fixed Frame to `base_link`.
<ImageZoom
src="/img/robots/leo/integrations/aruco-tracking/rviz-fixed-frame.webp"
alt="Setting base_link in RViz"
width="1365"
height="728"
width="1854"
height="1010"
/>

Now on the Displays panel click **Add** -> **By display type** and search for
`TF` and click **Ok**.
`TF` and click **OK**.

<ImageZoom
src="/img/robots/leo/integrations/aruco-tracking/rviz-add-tf.webp"
width="1362"
height="727"
width="1853"
height="1012"
/>

As there are many TF frames for the rover itself, to make it easier to
Expand All @@ -268,8 +222,8 @@ check their boxes to make them appear in RViz.

<ImageZoom
src="/img/robots/leo/integrations/aruco-tracking/rviz-tf-instructions.webp"
width="1364"
height="730"
width="1854"
height="1012"
/>

:::tip
Expand All @@ -287,24 +241,26 @@ choose `Image` display. Click it and confirm with **Ok**.

<ImageZoom
src="/img/robots/leo/integrations/aruco-tracking/rviz-aruco-image.webp"
width="1365"
height="729"
width="1853"
height="1006"
/>

Your final setup should look more or less like this:

<ImageZoom
src="/img/robots/leo/integrations/aruco-tracking/rviz-setup-final.webp"
alt="Adding Marker topic to visualization marker in RViz"
width="1365"
height="729"
width="1853"
height="1006"
/>

## What next?
## What's next?

With this tutorial completed you may be wondering what to do next. Our pick
would be the [ARTag follower](/leo-rover/1.8/leo-examples/follow-artag).
However, you can check out other examples from leo_examples repository (like
[line follower](/leo-rover/1.8/leo-examples/line-follower) and
[object detection](/leo-rover/1.8/leo-examples/object-detection)). You can also
check out other integrations from our [Integrations site](/integrations).
After adding ArUco tag detection capabilities to your robot, you might be
interested in making the Leo Rover follow the markers. For that, you can check
out the [follow ArUco marker example](/leo-rover/leo-examples/follow-marker).
You can also check out other examples from leo_examples repository (like
[line follower](/leo-rover/leo-examples/line-follower) and
[object detection](/leo-rover/leo-examples/object-detection)). If you are
looking to add more sensors to your Leo Rover, take a look at our
[integrations](/integrations).
Loading