Localization, Obstacle avoidance, Control and Kinematics [LOCK Part-1]
####Introduction
Robotics is a multi-disciplinary field with its heart dependent on the bleeding edge algorithms of AI, Control Optimization etc. There lies its inherent potential of delivering theory intensive courses like control theory, artificial intelligence and computer vision in an intuitive and informal manner.
Through a series of three tutorials you will ready to set up your own differential steering robot capable of navigating to given any co-ordinate while avoiding obstacles with only a static camera mounted on the ceiling as shown below. By following and implementing the code examples on LOCK, you will be ready to build more interesting and complex systems. Now lets crack on.
####Tools needed
USB HD webcam
opencv 2.4.x
git
####Installing OpenCv
For running the code in this post you need OpenCv 2.4.x bindings.
I have never set up OpenCv in a windows platform but it will definitely be way easier than any linux system.
####What is localization?
In robotics, localization is fundamental task. Especially in wheeled robots it is performed using odometers or using a camera to perform visual odometry. However, in our toy problem the localization task involves to find the coordinates of the bot using a webcam mounted on the ceiling. The performance constraints that force us to use c++. Again identification of bot can be performed in a variety of ways. Since we consider this an introduction of sorts, we simply prefer to cover our bot with a hard color for simplifying the task of detection.
####Algorithm
The algorithm can be stated in three simple steps
Threshold the image to obtain a binary image.
Find the biggest contour or blob.
Find the center of mass.
#Localization implementation class with explanation
This necessary to identify the pose of the robot.
####Making Detection Intensity Invariant
The problem of using the above algorithm is that it requires re-tuning of the threshold values as they in intensity. However by implementing this small hack we can make almost intensity invariant.