line following with constant body position any hints ?

hello,
first, i apologize for my broken english.
second, you have to read that with a french accent.

GOAL:
my project is to build a robot with the following features :

  • following a line
  • drawing on that line.

BACKGROUND IDEA :
they will be 2 robots, one draw the line while making childish sounds,
the other erase the line while making grumpy sounds, useless but fun.
i plan to use hexapod,
because i would like to use glitter glue later
instead of childish and grumpy, to have " father serious and glitter daughter"
so i think hexapods are the best way to avoid stepping into fresh glitter glue ( but that's another story).
and hexapods looks cool. ( even if they are not wearing a fez ( if you don't get that joke you will be exterminated))

MY PROBLEMS, MY IDEAS :
today, my problem is, how to handle a constant body positionning in a simple way ?

my idea is to use 2 sensor arrays, ( 2 CCD scanner bars or optical mouse) close to each other,
each sensors give me a point, these 2 points give me a line with an angle,
and the robot positionning is the most parallel to this line.
( a voice in my head say " isn't that a vector ?" sh** *p, i hate maths )

I think with mouse or scanner sensor, i could achieve a precision close to the millimeter ( 0,1mm would be a dream).
Because when you draw, you don't want to step out the shape, otherwise unicorns looks like dogs.

How to have the stylus on the line without long trial and error tweaking sequence ?
my idea:
to build some kind of turret, first the robot will self calibrate on the line by changing the stylus for an optical sensor, then switch for the stylus.

Is there an easy way to handle curves ?

If anyone got any ideas, i'm listening.

thanks,
oliver.

FIRST EDITING :
i asked google, and i found line following robots, and drawing robots, no " following and re-drawing robots"
i wasn't looking for the right thing : it's an inverse kinematic problem.
my idea is now : i use multiple "brains",

  • the master brain
  • one brain handling the sensor, probably with a fast ADC, according to some datasheets those CCD sensors send a lots of datas
  • one brain handling the legs and handling a translation into simple XYZ coordinate system from the master brain.

and the master brain calculate a body vector movement as close as possible as the vector from the sensor.

SECOND EDITING :
I just realize that it could be a great idea for a new kind of cnc, with a dremel instead of a pen, you draw or glue your print and the robot cut, and if we add a color sensor ( the CCD bar from the scanner ?) it could be possible to handle different deeps. Yeahhh a cnc without size limits !!!!