Author: Job van Dieten < job.1994@gmail.com >

Maintainer: Sara Cooper < sara.cooper@pal-robotics.com >

Source: https://github.com/pal-robotics/ari_tutorials.git

(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

ArUco marker detection (C++)

Description: This tutorial shows how to detect fiducial markers using the ArUco library and to get its 3D pose.

Keywords: OpenCV

Tutorial Level: BEGINNER

Next Tutorial: Person detection

aruco_tutorial.jpg

Purpose

This tutorial shows how to run fiducial marker detection with ARI using the OpenCV-based library ArUco. Fiducial markers is an example of robust model-based object detection. The ArUco markers are planar square binary markers that, provided the length of its square side, its 6 DoF pose can be estimated precisely from monocular vision.

Pre-Requisites

First, make sure that the tutorials are properly installed along with the ARI simulation, as shown in the Tutorials Installation Section.

Execution

Open a four consoles and source the catkin workspace as follows in each one:

  • cd ~/ari_public_ws
    source ./devel/setup.bash

Now run the simulation in the first console as follows

  • $ roslaunch ari_gazebo ari_gazebo.launch public_sim:=true world:=tutorial_office gzpose:="-x -3.5 -y -0.85 -z 0 -R 0 -P 0 -Y -3.0"

This will spawn ARI in front of a board composed of multiple ArUco markers

aruco_simulation.jpg

In the second console run the marker detector with the appropriate remappings and parameters:

  • $ rosrun aruco_ros single /camera_info:=/head_front_camera/camera_info /image:=/head_front_camera/image_raw _marker_id:=584  _marker_size:=0.10 _marker_frame:=/aruco_frame _camera_frame:=/head_front_camera_optical_frame _image_is_rectified:=false _reference_frame:=/base_footprint

In the above instruction we are telling the node to identify the marker with ID 584 and that the length of the square side is 10 cm.

Running rviz it is possible to see aruco_frame tf published.

  • $ rosrun rviz rviz

aruco_tf.jpg

Wiki: Robots/ARI/Tutorials/ArucoBoard (last edited 2020-02-07 17:02:36 by SaraCooper)