## For instruction on writing tutorials ## http://www.ros.org/wiki/WritingTutorials #################################### ##FILL ME IN #################################### ## for a custom note with links: ## note = ## for the canned note of "This tutorial assumes that you have completed the previous tutorials:" just add the links ## note.0= ## descriptive title for the tutorial ## title = ArUco marker detection (C++) ## multi-line description to be displayed in search ## description = This tutorial shows how to detect fiducial markers using the [[http://www.uco.es/investiga/grupos/ava/node/26|ArUco]] library and to get its 3D pose. ## the next tutorial description (optional) ## next = ## links to next tutorial (optional) ## next.0.link=[[Robots/TIAGo/Tutorials/PersonDetection|Person detection]] ## next.1.link= ## what level user is this tutorial for ## level= BeginnerCategory ## keywords = OpenCV #################################### Author: Job van Dieten Maintainer: Jordi Pages < jordi.pages@pal-robotics.com >, Thomas Peyrucain < thomas.peyrucain@pal-robotics.com > Source: https://github.com/pal-robotics/tiago_tutorials.git <> {{attachment:aruco_tutorial.jpg||align="right",width="250"}} <> == Purpose == This tutorial shows how to run fiducial marker detection with TIAGo using the OpenCV-based library [[http://www.uco.es/investiga/grupos/ava/node/26|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 TIAGo simulation, as shown in the [[Robots/TIAGo/Tutorials#Tutorials_Installation|Tutorials Installation]] Section. == Execution == Open two consoles and source the catkin workspace as follows in each one: {{{ cd ~/tiago_public_ws source ./devel/setup.bash }}} Now run the simulation in the first console as follows {{{ roslaunch tiago_gazebo tiago_gazebo.launch public_sim:=true end_effector:=pal-gripper world:=tutorial_office gzpose:="-x -3.5 -y -0.85 -z 0 -R 0 -P 0 -Y -3.0" }}} This will spawn TIAGo in front of a board composed of multiple ArUco markers {{attachment:aruco_simulation.jpg||align="center",width="600"}} In the second console launch the aruco detector: {{{ roslaunch tiago_aruco_demo detector.launch }}} In the launchfile above we are telling the node to identify the marker with ID 584 (default) and that the length of the square side is 10 cm (default). It is possible to choose the aruco tag detected by replacing with wanted ID tag: {{{ roslaunch tiago_aruco_demo detector.launch markerId:= }}} An rviz window will appear with the position of the marker {{attachment:rviz_aruco.jpg||align="center",width="600"}} If the marker is not detected, the look_to_point demo is also launched and permit to move the head around (For more information, see :[[http://wiki.ros.org/Robots/TIAGo/Tutorials/motions/head_action]]) ## AUTOGENERATED DO NOT DELETE ## TutorialCategory ## FILL IN THE STACK TUTORIAL CATEGORY HERE