Coder Social home page Coder Social logo

ipa_pitag_generator's Introduction

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.

ipa_pitag_generator's People

Contributors

raultron avatar volse01 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.