In this example, we will use ar_track_alvar package for detecting individual markers.
In this example, we will use ar_track_alvar package for detecting individual markers.
An AR-tag is a fiduciary marker system that can help with robot perception challenges, serving as a point of reference for autonomous tasks.
In this example, we will use ar_track_alvar 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.
If all goes well, you should end up with something like this:
The detected AR Tags are also published to /ar_pose_marker topic, so you could use the output in your custom nodes.
Start by
Create a workspace in your home directory if you don't have one yet:
Create a new package that depends on ar_track_alvar:
Run rosdep to install dependent packages:
Now, add launch/ and config/ directories inside your package:
Inside launch/ directory add alvar.launch file with the following content:
Inside config/ directory add alvar.yaml file:
And build the package:
To start the Alvar tracking, type:
If you want to start the node when the rover boots, add this line to robot.launch file:
Now, we need to create some markers, so go back to your computer.
Install the ar_track_alvar package:
And run the createMarker script:
This will create MarkerData_0.png file that stores a 10cm x 10cm marker with id 0. Print this file on a sheet of paper.
Now to visualize detected AR Tags, you just need to:
With this tutorial completed you may be wondering what to do next. Our pick would be the ARTag follower. However, you can check out other examples from leo_examples repository (like line follower and object detection). You can also check out other integrations from our site.