https://uloz.to/file/zF5w5Tw4WbGz/test-avi
The latest version of the system is here.
WhyCon is a version of a vision-based localization system that can be used with low-cost web cameras, and achieves millimiter precision with very high performance. The system is capable of efficient real-time detection and precise position estimation of several circular markers in a video stream. It can be used both off-line, as a source of ground-truth for robotics experiments, or on-line as a component of robotic systems that require real-time, precise position estimation. WhyCon is meant as an alternative to widely used and expensive localization systems. It is fully open-source. WhyCon-orig is WhyCon's original, minimalistic version that was supposed to be ROS and openCV independent.
The WhyCon system was developed as a joint project between the University of Buenos Aires, Czech Technical University and University of Lincoln, UK. The main contributors were Matias Nitsche, Tom Krajnik, Peter Lightbody and Jan Faigl. Each of these contributors maintains a slightly different version of WhyCon. Later contributions were made by Jiri Ulrich and Kristi Zampachu.
WhyCon version | Application | Main features | Maintainer |
---|---|---|---|
WhyCon/WhyCode | general | actively maintained, ROS | Jiri Ulrich |
WhyCon-orig | general | 2D, 3D, ROS, lightweight, autocalibration | Tom Krajnik |
WhyCon-ROS | general | 2D, ROS | Matias Nitsche |
SwarmCon | μ-swarms | 2D, individual IDs, autocalibration | Tom Krajnik |
Caspa-WhyCon | UAVs | embedded, open HW-SW solution | Jan Faigl |
Social-card | HRI | ROS, allows to command a robot | Tom Krajnik |
WhyCon was first presented on International Conference on Advanced Robotics 2013 [2], later in the Journal of Intelligent and Robotics Systems [1] and finally at the Workshop on Open Source Aerial Robotics during the International Conference on Intelligent Robotic Systems, 2015 [3]. Its early version was also presented at the International Conference of Robotics and Automation, 2013 [4]. An extension of the system, which used a necklace code to add ID's to the tags, achieved a best paper award at the SAC 2017 conference [5].
If you decide to use this software for your research, please cite WhyCon using the one of the references provided in this bibtex file.
1 Make sure your system is up to date: sudo apt-get update.
- Install the required libraries.: sudo apt-get install libsdl1.2-dev libsdl-ttf2.0-dev libncurses5-dev.
- Install git, guvcview etc sudo apt install git guvcview.
- Run guvcview and check if you see your camera feed, adjust your camera settings (exposure, brightness etc) and check the available resolutions.
- Download the software from GitHub git clone https://github.com/gestom/whycon-orig.git and go to the src directory.
- Adjust the camera resolution in the main/whycon.cpp.
- Compile the software - just type make.
- Download, resize and print one circular pattern - you have the pattern also in the whycon-orig/etc/test.pdf file.
- Try a test run - you need to run the binary in the bin directory. Type ../bin/whycon /dev/videoX 1, where X is the number of the camera and 1 tells the system to track one pattern.
- You should see the image with some numbers below the circle. Pressing D shows the segmentation result.
- At this point, you can also change camera brightness, exposure, contrast by pressing (SHIFT) b, e, c respectively. These settings are stored in etc/camera.cfg and reloaded on restart.
- Open your browser to view localhost:6666. You should see the circle position.
- Calibrate your camera using the MATLAB (or Octave) calibration toolbox and put the Calib_Results.m in the etc directory.
- If you have resized the markers (their default size is 122mm), then adjust their diameter in the main/whycon.cpp file.
- Print additional four circular markers and place to the corners of your (reclangular) operational space.
- Modify the dimensions of the operation space in the main/whycon.cpp and call make to recompile - the system will now assume that the four markers are at positions [0,0],[fieldLength,0], [0,fieldWidth],[fieldLength,fieldWidth].
- Position and fixate your camera so that it has all four circles in it's field of view.
- Go to bin directory and run ./whycon /dev/videoX Y, where X is the number of your camera and Y is the number of patterns you want to track, i.e. Y=NxM+4.
- Once all the patterns are found, press a and the four outermost patterns will be used to calculate the coordinate system.
- Alternatively, you can press r and then click the four circles that define the coordinate system.
- Pressing 1 should show you the patterns' positions in camera-centric coordinates (x-axis equals to camera optical axis), pressing 2 and 3 will display marker coordinates in user-defined 2D or 3D coordinate systems.
- Pressing +,- changes the number of localized patterns.
- To create a log of the robot positions, simply create an output folder at the directory where you run the whycon.
- If your camera supports the MJPEG format, then the system will create a video in the output folder as well.
- If your camera does not support MJPEG, whycon will save the video feed as a serie of bitmaps, that you can process later as well.
- You can run whycon video_file_name Y to process that video in the same way as when using the camera, i.e. video_file_name instead of /dev/videoX.
- Processing a saved video rather than the camera feed is likely to provide more precise results.
- Running the system with a nogui argument e.g. ./whycon /dev/video0 1 nogui causes text-only output - this can speed-up postprocessing.
- Logs and videos might be large - to prevent saving logs and videos, run the system with nolog or novideo argument.
- At this point, you can start experimenting with the syste by adding whatever features you might think useful.
- We have tried to comment the code so an experienced programmer should be able to alter the system accordingly. However, if you have any questions regarding the code, feel free to contact Tom Krajnik or Matias Nitsche
- If you use this localization system for your research, please don't forget to cite at least one relevant paper from
these bibtexrecords. - Have fun!
All the following libraries are probably in your packages.
- libsdl1.2-dev for graphical user interface.
- libsdl-ttf2.0-dev to print stuff in the GUI.
- libncurses5-dev to print stuff on the terminal.
- guvcview to set-up the camera.
- J. Ulrich, A. Alsayed et al.: Towards fast fiducial marker with full 6 DOF pose estimation. Symposium on Applied Computing, 2022. [bibtex].
- J. Ulrich: Fiducial marker-based multiple camera localisation system. Master's thesis. Czech Technical University in Prague, 2022. [bibtex].
- K. Zampachu: Visual analysis of beehive queen behaviour. Bachelor's thesis. Czech Technical University in Prague, 2022. [bibtex].
- J. Ulrich: Fiducial Marker Detection for Vision-Based Mobile Robot Localisation. Bachelor's thesis. Czech Technical University in Prague, 2020. [bibtex].
- T. Krajník, M. Nitsche et al.: A Practical Multirobot Localization System. Journal of Intelligent and Robotic Systems (JINT), 2014. [bibtex].
- T. Krajník, M. Nitsche et al.: External localization system for mobile robotics. International Conference on Advanced Robotics (ICAR), 2013. [bibtex].
- M. Nitsche, T. Krajník et al.: WhyCon: An Efficent, Marker-based Localization System. IROS Workshop on Open Source Aerial Robotics, 2015. [bibtex].
- J. Faigl, T. Krajník et al.: Low-cost embedded system for relative localization in robotic swarms. International Conference on Robotics and Automation (ICRA), 2013. [bibtex].
- P. Lightbody, T. Krajník et al.: A versatile high-performance visual fiducial marker detection system with scalable identity encoding.Symposium on Applied Computing, 2017.[bibtex].
The development of this work is currently supported by the EU FET Open programme under grant agreement No.964492 project RoboRoyale. The development of this work was supported by the Czech Science Foundation project 17-27006Y STRoLL. In the past, the work was supported by EU within its Seventh Framework Programme project ICT-600623 STRANDS. The Czech Republic and Argentina have given support through projects 7AMB12AR022, ARC/11/11 and 13-18316P. We sincerely acknowledge Jean Pierre Moreau for his excellent libraries for numerical analysis that we use in our project.