Skip to content

pitag fiducial marker genaerator with automatic xml writer

License

Notifications You must be signed in to change notification settings

volse01/ipa_PiTag_generator

Repository files navigation

Pi-Tag generator

Pi-Tag fiducial marker generator.

this repo is developed out of a fork of raultrons repository Pi-Tag_generator. the code was pushed into a new repo due to extensive changes, especially regarding the automatic .xml file generation.

PiTag stands for Projective Invariant Tag, due to the detection algorithm which is based on projective invariants. More information on Pi-Tag can be found on the original publication. If you want to detect this markers I suggest to use the ROS package cob_fiducials.

This script generates Pi-Tag fiducial markers in an SVG file with the following format:

Reference PiTag Marker

SVG stands for Scalable Vector Graphics, this files can be easily edited with open source tools like Inkscape.

Installation and execution

The script is based on svgwrite and python. The following installation instructions apply for Ubuntu 20.04 with a python version >=3.9:

Install dependencies on a new terminal:

sudo apt-get install python-pip python-argparse python-cairosvg
sudo pip install svgwrite

Then clone this repository

git clone https://github.com/raultron/PiTag-generator.git

Inside the PiTag-generator folder execute:

python pi-tag_gen.py 0.40 0.60 0.30 0.70

This command will generate a generic marker of 10cm wide with circles of 0.9cm Radius in a file named pitag_marker.svg in the same folder of the script.

Example with all the implemented options:

 python pi-tag_gen.py 0.40 0.60 0.30 0.70 --output_file pitag_marker.svg --A4 --pdf --show_info --marker_size 10.0 --circle_radius 0.9 --circle_clearance 0.2 --tool --xml

Positional arguments

  1. AB0

Cross relation AB in top and left sides

  1. AC0

Cross relation AC in top and left sides

  1. AB1

Cross relation AB in bottom and right sides

  1. AC1

Cross relation AC in bottom and right sides

Optional arguments

  1. marker_size

Size of the marker in centimeters, measured from Top-Left circle center to Top-Right circle center. Default = 10.0 cm 2. circle_radius

Radius of the circle in centimeters. Default = 0.9 cm 3. circle_clearance

Minimum white space surrounding the black circles. Default = 0.2 cm 4. output_file

Name of the output file. Default = "pitag_marker.svg"

  1. --A4

The marker will be centered in A4 sheet dimensions. Useful for printing. Other sheet sizes not currently available (make a pull request!). Defaults to False.

  1. --pdf

The script will generate a PDF from the SVG file. Defaults to False (only SVG).

  1. --show_info

Print additional information inside the marker. Useful when doing tests or comparing markers. Defaults to False.

  1. --tool

prints dots to punch holes for a display stand with 20x20 cm hole distances. defaults to false.

  1. --xml

creates the fitting .xml file, after naming conventions, and asks the user for additional information abut the pi-tag. defaults to false.

About

pitag fiducial marker genaerator with automatic xml writer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages