By the way, notice the white (yes, posts are white, I just reduced illumination) border around aruco markers. If you tile two markers without such a border, recognition quality drops dramatically.
Markers are just images, and we can create different sets of them, depending what we need. We do it by using dictionaries.
The most common 5x5 dictionaries are:
DICT_5X5_50 (50 unique markers) DICT_5X5_100 (100 unique markers) DICT_5X5_250 (250 unique markers) DICT_5X5_1000 (1000 unique markers)
As I am not going to create anything like a large warehouse where lots of markers are required, I am going to use a 100 ids dictionary. The following script will produce an image with code "42" and with size 5x5.
create_aruco_marker.py
Now, we need to somehow create 100 markers. Gazebo (I use classic)... doesn't cooperate, so I have to a. create image (all 100 of them) and b. create material (again, 100). And I wasn't able to make any kind of a template, so yes, 200 files are added to a project:
create_aruco_materials.py
Now, in a "models" folder, we have files we can refer to from Gazebo's sdf world.