orjano-max / ORJANOS_MASTER_REPO

This is the github repo for orjano's master thesis
1 stars 0 forks source link

Creating Apriltag tags #4

Closed orjano-max closed 1 year ago

orjano-max commented 1 year ago

Tags are found in AprilRobotics own git: https://github.com/AprilRobotics/apriltag-imgs

The normal tag family is: tag36h11

The images has to be resized since they are really small

orjano-max commented 1 year ago

Rescaling images:

Install imagemagic:

sudo apt-get install imagemagick

Resize image with precent:

convert  -scale 2000% source.png dest.png

Example

convert  -scale 5000% /home/xavier2/Downloads/apriltag-imgs-master/tagStandard52h13/tag52_13_00000.png /home/xavier2/git/husky-master/Tags/tag52_13_00000.png
orjano-max commented 1 year ago

Measure size of printed tag

Once the tag is printed, measure its size according to: https://github.com/AprilRobotics/apriltag_ros#tag-size-definition

The measurements in meters is set as a parameter in the config file at: ros2_ws/src/apriltag_ros/apriltag_ros/cfg

Example of config file

The contents og the config file "tags_36h11_all.yaml" is shown below. The "size" parameter is where the measured size is put.

#
# ComposableNode should not be nested with node name and namespace
#
image_transport: 'raw'    # image format
family: '36h11'           # tag family name
size: 0.05
threads: 2
max_hamming: 0          # maximum allowed hamming distance (corrected bits)
z_up: true              # rotate about x-axis to have Z pointing upwards

# see "apriltag.h" for more documentation on these optional parameters
decimate: 1.0           # decimate resolution for quad detection
blur: 1.0               # sigma of Gaussian blur for quad detection
refine-edges: 1         # snap to strong gradients
debug: 0                # write additional debugging images to current working directory