Details:
The hardware of this robot is DoodleBot kit (by Dagu).
I programmed it together with my friend to participate in the "Doodle Bot Art Challenge". The code is based on OddBot's example.
The goal:
Use the kit to draw a robot, without using any additional sensors.
The problem:
The drawing may seem easy and simple - Believe me, it's not!
The main technical challenge is due to the fact each of the two wheels is connected to a seperate motor.
Each motor has different "personality": They don't achieve full speed at the same time, nor stopping simultenously. The speed itself is different as well. Moreover, the "personality" changes over time, as the battery voltage changes and the motors get warmer.
Bottom line: Without special code, straight line is not straight and a 90 degrees angle is not 90...
This resolution is enough if you have seperate simple characters (e.g. letters or numbers).
However, if you try to draw a big drawing and wish the shape to be symethric and to close properly - well, you have a problem...
The solution:
I may have received a kit with lots of "personality", so there's no single "magic fix".
The code both uses a calibration routine to test the speed difference between the wheels (for each direction: Forward, Backwards and Left/Right turns).
In addition, the robot "fixes itself" to compensate behaviour change during work.
The code also compensates overshoot of a wheel (when a wheel fails to stop immediately when you tell it).
As you can see in the video, the result is not perfect, but without applying the changes described above -
the result will not resembale a robot at all.
Now that I have the code, a more complicated drawing can be made. However, the challenge is over - so it will have to wait for another opportunity.
Final word:
Special thanks to OddBot for challenging us and to Dagu for creating this great kit!
This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/doodlebot-drawing-bot