How to use the python script to generate Apriltag board with more tagSpacing(>1)

475 views
Skip to first unread message

kongw...@gmail.com

unread,
Apr 19, 2015, 11:27:29 AM4/19/15
to kalibr...@googlegroups.com
Hi,
I just tried to generate Apriltag board with more space between each tag, such as tagSpacing(>1). I tested the cde package, but failed because of the large tagSpacing. Then, compile all the source code under catkin workspace, but did no know how to execute the python script correctly.

- I found this file, kalibr/aslam_offline_calibration/kalibr/python/kalibr_create_target_pdf which relates to tagSpacing, could I simply change it ?
- How to execute this file, or other related files ?


Best,
Weiwei

Thomas Schneider

unread,
Apr 20, 2015, 7:27:21 AM4/20/15
to kalibr...@googlegroups.com
Hi,

The script has a hardcoded max. for the tagSpacing argument of 1.0. If you are using the cde-package you can change this limit in the file 'cde-root/var/kalibr-build/src/kalibr/aslam_offline_calibration/kalibr/python/kalibr_create_target_pdf' on line 92 to any value. You can run the script from the cde-package root directory using e.g. the following command:
./kalibr_create_target_pdf --type apriltag --tspace 1.5
This should create a PDF of the target in the same directory.

Hope this helps.

Best,
Thomas

Thomas Schneider

unread,
Apr 20, 2015, 7:28:16 AM4/20/15
to kalibr...@googlegroups.com
I forgot to add that you will also need to specify these values to the calibration tool in a yaml-file. You can find the format definition here:
https://github.com/ethz-asl/kalibr/wiki/calibration-targets#a-aprilgrid

kongw...@gmail.com

unread,
Apr 20, 2015, 9:25:42 AM4/20/15
to kalibr...@googlegroups.com
Hi Thomas Schneider ,
thank you for your quick reply!
just test it and worked fine. Also, I git the source code and run it under Python 2.7 (Ubuntu 14.04) with python-evince and python-pxy packages.
Thank you so much!

Best,
Weiwei

Reply all
Reply to author
Forward
0 new messages