This is a simple package that helps the creation of a custom Aruco code marker with the desired ID that can be spawned in a custom gazebo simulation but can also be loaded into a ROS parameter and viewed from rviz.
The source code is released under a BSD 3-Clause license.
Author: Valerio Magnago
Maintainer: Valerio Magnago, valerio.magnago@hotmail.it
The PACKAGE Aruco Description package has been tested under [ROS] Melodic and Ubuntu 18.04.
- Robot Operating System (ROS) (middleware for robotics),
 
To build from source, clone the latest version from this repository into your catkin workspace and compile the package using
cd catkin_workspace/src
git clone https://github.com/ValerioMa/aruco_description
cd ../
rosdep install --from-paths . --ignore-src
catkin_make
source devel/setup.bashSuppose that you want to use the description of the Aruco code with id=1 from the DICT_4X4_50 dictionary. The first step is to generate the mesh of that specific code:
roslaunch aruco_description generate_aruco.launch aruco_dictionary:="DICT_4X4_50" aruco_ids:="1"The launch file accepts as parameters the dictionary and the ids to generate. See the launch parameters description below to have more details on them.
Once the aruco is generate we can:
- 
spawn the code in a running gazebo world. For this a commodity launch file is provided:
roslaunch aruco_description spawn_aruco.launch aruco_dictionary:="DICT_4X4_50" aruco_id:="1"
In this launch file we are also loading the aruco code definition in the parameter server as
DICT_4X4_50_id1 - 
load the aruco urdf inside
my_aruco_descriptionparameter in the ROS parameters serverroslaunch aruco_description spawn_aruco.launch aruco_dictionary:="DICT_4X4_50" aruco_id:="1" aruco_description_name:="my_aruco_description"
 - 
include the macro in my custom xacro. Here we attach the aruco marker to the
my_awesome_linkofmy_awesome_model<link <?xml version='1.0' encoding='utf-8'?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="my_awesome_model"> <xacro:arg name="aruco_dictionary" default="DICT_4X4_50"/> <xacro:arg name="aruco_id" default="0"/> <xacro:arg name="aruco_name" default="DICT_4X4_50_id0"/> <xacro:arg name="aruco_l" default="0.2"/> <xacro:arg name="white_border" default="0.1"/> <xacro:include filename="$(find aruco_description)/urdf/general_aruco.xacro"/> <link name="my_awesome_link"/> <xacro:generic_aruco aruco_dictionary="$(arg aruco_dictionary)" aruco_id="$(arg aruco_id)" aruco_l="$(arg aruco_l)" aruco_name="$(arg aruco_name)" white_border="$(arg white_border)" connected_to="my_awesome_link"> <origin xyz="0 0 0" rpy="0 0 0" /> </xacro:generic_aruco> </robot>
It is possible to specify a custom size of the aruco code, a custom id and dictionary. Also the dimension of the white border and the name of the model.
 
- 
generate_aruco.launch: generate the required aruco code meshes
Arguments:
- 
aruco_dictionaryAruco dictionary to use. Available Check here for the available list of dictionaries. - 
aruco_idsAruco ids to generate. Ifaruco_ids:=-1all Aruco of the dictionary are generated. This can be a single value e.g.aruco_ids:=1or also an array of valuesaruco_ids:=1,2,3,4 
 - 
 - 
load_aruco_description.launch load the aruco description as a parameter in the ROS parameter server Arguments:
aruco_dictionarydictionary where to take the aruco codearuco_idid of the aruco to store in the parameteraruco_description_namename of the parameter that will be used to store the aruco description in the ROS parameter server
 - 
spawn_aruco.launch load the aruco code description in the parameter server and spawn the code in gazebo Arguments:
xspawn position of the aruco code along x axisyspawn position of the aruco code along y axiszspawn position of the aruco code along z axisrollspawn roll angle of the aruco codepitchspawn pitch angle of the aruco codeyawspawn yaw angle of the aruco codearuco_dictionarydictionary where to take the aruco codearuco_idid of the aruco to store in the parameter
 
These are all the strings that can be used as aruco_dictionary
- DICT_4X4_50
 - DICT_4X4_100
 - DICT_4X4_250
 - DICT_4X4_1000
 - DICT_5X5_50
 - DICT_5X5_100
 - DICT_5X5_250
 - DICT_5X5_1000
 - DICT_6X6_50
 - DICT_6X6_100
 - DICT_6X6_250
 - DICT_6X6_1000
 - DICT_7X7_50
 - DICT_7X7_100
 - DICT_7X7_250
 - DICT_7X7_1000
 
- The script to generate the png images of the Aruco code is based on Adrian Rosebrock work that can be found at this link
 - The dae template and the xacro definition is extracted from RDaneelOlivav work and can be found here
 - The README template is taken from ethz-asl