Let's Make Robots!

The Caterpillar


Vendor's Description: 


The caterpillar robot is available as both an AVR and Picaxe based robot. The picaxe version can be bought from Revolution Education and various picaxe distributors. The AVR version can be bought from Arexx Engineering.

http://www.youtube.com/watch?v=MjP7plfW_mM

The caterpillar robot is the very first robot from the LMR website to be mass produced. As such, the LMR logo is on the box.

This is the first of hopefully many LMR robots to be mass produced. Frits's YDM and SplatBot MkII will also be produced.


18 Aug 2009: Here is a manual for the assembly of the caterpillar. The images are low resolution to keep the file small.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Hi OddBot I purchaced this caterpillar when i am compiling the code in Avrstudio6  it getting error:

ClearServo(3);------Undefined 'Servo'

Full program

/* 

 * ****************************************************************************

 * CATERPILLAR - ROBOT BASE EXAMPLES

 * ****************************************************************************

 * Example: MOVE FORWARD

 * Author(s): Hein Wielink

 Huy Nguyen

 * ****************************************************************************

 * Description:

 * In this example the Caterpillar will move forwards if no sensors are activated

 * Sensors such as: Head sensors and Roll sensor

 * 

 * ATTENTION: Make sure you have calibrate the caterpillar, else you

   can damage de servo's!!!

 * You can calibrate the servo's with the selftest program. (press c) 

 *

 *

 * #+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+

 * ############################################################################

 * ****************************************************************************

 */

 

/*****************************************************************************/

// Includes:

 

#include "CaterpillarBaseLib.h" 

 

/**

 * This function will move the servo's. 

 */

 

void Move_forward(void){

 

servopos[4] = Pos_Servo_4;

Move(4);

 

servopos[1] = Pos_Servo_1+1000;

Move(1);

 

servopos[7] = Pos_Servo_7+600;

Move(7);

 

servopos[5] = Pos_Servo_5-600;

Move(5);

 

servopos[3] = Pos_Servo_3+700;

Move(3);

 

servopos[1] = Pos_Servo_1-600;

Move(1);

 

servopos[7] = Pos_Servo_7+600;

Move(7);

servopos[1] = Pos_Servo_1+1000;

Move(1);

}

 

 

void Move_backwards(void){

 

servopos[7] = Pos_Servo_7;

Move(7);

servopos[3] = Pos_Servo_3;

Move(3);

 

servopos[1] = Pos_Servo_1;

Move(1);

 

servopos[5] = Pos_Servo_5;

Move(5);

 

servopos[7] = Pos_Servo_7-700;

Move(7);

 

servopos[3] = Pos_Servo_3+700;

Move(3);

 

servopos[5] = Pos_Servo_5-600;

Move(5);

 

servopos[3] = Pos_Servo_3-1400;

Move(3);

 

servopos[5] = Pos_Servo_5+1000;

Move(5);

 

servopos[7] = Pos_Servo_7+550;

Move(7);

 

servopos[3] = Pos_Servo_3-1400;

Move(3);

 

}

 

void Move_right(void){

 

servopos[2] = Pos_Servo_2+1000; //Servo 2 Right ----> 1000

SetServo(2); //Set Servo 2

 

servopos[3] = Pos_Servo_3-1000; //Servo 3 up ----> 1000

SetServo(3); //Set Servo 3

servopos[4] = Pos_Servo_4-1000; //Servo 4 Right ----> 1000

SetServo(4); //Set Servo 4

 

for(int a=0; a<6; a++) MoveAll(); //Move servo 2,3,4 --->   6 times

mSleep(500); // delay 500ms = 0.5s

ClearServo(3); //Clear Servo 3 

 

servopos[2] = Pos_Servo_2-600; //Servo 2 left ----> 600

 

servopos[4] = Pos_Servo_4+1000; //Servo 4 left ----> 1000

SetServo(4); //Set Servo 4

 

servopos[5] = Pos_Servo_5+1000; //Servo 5 up ----> 1000

SetServo(5); //Set Servo 4

for(int a=0; a<6; a++) MoveAll(); //Move servo 2,4,5 --->   6 times

ClearServo(5); //Clear Servo 3 

mSleep(500); // delay 500ms = 0.5s

}

 

void Move_left(void){

 

 

servopos[2] = Pos_Servo_2-1000; //Servo 2 Left ----> 1000

SetServo(2); //Set Servo 2

 

servopos[3] = Pos_Servo_3-1000; //Servo 3 up ----> 1000

SetServo(3); //Set Servo 3

servopos[4] = Pos_Servo_4+1000; //Servo 4 Left ----> 1000

SetServo(4); //Set Servo 4

 

for(int a=0; a<6; a++) MoveAll(); //Move servo 2,3,4 --->   6 times

mSleep(500); // delay 500ms = 0.5s

ClearServo(3); //Clear Servo 3 

 

servopos[2] = Pos_Servo_2+600; //Servo 2 Right ----> 600

 

servopos[4] = Pos_Servo_4-1000; //Servo 4 Right ----> 1000

SetServo(4); //Set Servo 4

 

servopos[5] = Pos_Servo_5+1000; //Servo 5 up ----> 1000

SetServo(5); //Set Servo 4

for(int a=0; a<6; a++) MoveAll(); //Move servo 2,4,5 --->   6 times

 

ClearServo(5); //Clear Servo 3 

mSleep(500); // delay 500ms = 0.5s

 

}

 

 

void standup_left(void) 

{

servopos[1] = Pos_Servo_1+800; //Servo 1 up ----> 800

servopos[3] = Pos_Servo_3-800; //Servo 3 up ----> 800

servopos[5] = Pos_Servo_5+500; //Servo 5 up ----> 500

servopos[7] = Pos_Servo_7-700; //Servo 7 up ----> 700

SetServo(1); SetServo(3); SetServo(5); SetServo(7);

for(int a=0; a<6; a++) MoveAll(); //Move servo 1,3,5,7 --->   6 times

ClearServo(3); ClearServo(1); ClearServo(7);

servopos[2] = Pos_Servo_2+1000; //Servo 2 right ----> 1200

servopos[4] = Pos_Servo_4-1000; //Servo 4 right ----> 1500

servopos[6] = Pos_Servo_6+1000; //Servo 6 right ----> 1000

servopos[5] = Pos_Servo_5+800; //Servo 5 up ----> 800

SetServo(4); SetServo(6); SetServo(2);

for(int a=0; a<50; a++) MoveAll(); //Move servo 1,3,5,7 --->   50 times

 

ClearServo(6); ClearServo(4); ClearServo(2);

 

servopos[1] = Pos_Servo_1; //Servo 1 to default value

servopos[3] = Pos_Servo_3; //Servo 1 to default value

servopos[5] = Pos_Servo_5; //Servo 1 to default value

servopos[7] = Pos_Servo_7; //Servo 1 to default value

SetServo(1); SetServo(3); SetServo(7);

for(int a=0; a<30; a++) MoveAll(); //Move servo 1,3,5,7 --->   30 times

}

 

void standup_right(void) 

{

    servopos[1] = Pos_Servo_1+800; //Servo 1 up ----> 800

servopos[3] = Pos_Servo_3-800; //Servo 3 up ----> 800

servopos[5] = Pos_Servo_5+500; //Servo 5 up ----> 500

servopos[7] = Pos_Servo_7-700; //Servo 7 up ----> 700

SetServo(1); SetServo(3); SetServo(5); SetServo(7);

for(int a=0; a<6; a++) MoveAll(); //Move servo 1,3,5,7 --->   6 times

ClearServo(3); ClearServo(1); ClearServo(7);

servopos[2] = Pos_Servo_2-1000; //Servo 2 left ----> 1200

servopos[4] = Pos_Servo_4+1000; //Servo 4 left ----> 1500

servopos[6] = Pos_Servo_6-1000; //Servo 6 left ----> 1000

servopos[5] = Pos_Servo_5+800; //Servo 5 up ----> 800

SetServo(4); SetServo(6); SetServo(2);

for(int a=0; a<50; a++) MoveAll(); //Move servo 1,3,5,7 --->   50 times

 

ClearServo(6); ClearServo(4); ClearServo(2);

 

servopos[1] = Pos_Servo_1; //Servo 1 to default value

servopos[3] = Pos_Servo_3; //Servo 1 to default value

servopos[5] = Pos_Servo_5; //Servo 1 to default value

servopos[7] = Pos_Servo_7; //Servo 1 to default value

SetServo(1); SetServo(3); SetServo(7);

for(int a=0; a<30; a++) MoveAll(); //Move servo 1,3,5,7 --->   30 times

}

 

int main( void )

{

//Init Caterpillar

initRobotBase();

writeString_P("#########       Caterpillar Demo    #########\n"); 

//Caterpillar to start position

Start_position(); //Caterpillar to startposition 

// Main loop

while(1)

    {

//Get information Roll_sensor did the Caterpillar felt over?

uint8_t roll = getRoll_sensor();

//Caterpillar felt on the right side

if(roll==2) 

{

standup_right();

Start_position();

}

//Caterpillar felt on the left side

if(roll==1) 

{

standup_left();

Start_position();

}

//Get information Head_left and Head_right are they activated?

uint8_t head_left = getHeadLeft();

uint8_t head_right = getHeadRight();

//If head_left is activated

if(head_left) 

{

for(int a=0; a<3; a++) Move_backwards();

Start_position();

for(int a=0; a<4; a++) Move_right();

Start_position();

Start_position();

}

//If head_right is activated

if(head_right) 

{

for(int a=0; a<3; a++) Move_backwards();

Start_position();

for(int a=0; a<4; a++) Move_left();

Start_position();

Start_position();

}

//If nothing is activated just move forward

else

{

Move_forward();  

mSleep(100);

}

}

}

 

 

I'm sorry but the caterpillar I designed used a picaxe 28X1.

It would seem you have an ATmel version designed by someone else. I have no idea how to program it.

Well Done OddBot

I sure hope we see a lot more from you.

How do I go about ordering one of these?

 -Glen

contact Claudia on her  member page...
Keep it up oddbot. I want to eventually get 1 of every LMR robot that gets mass produced. If I finish my PhD and become a professor I want to show them off in the robotics courses ;) I like how your robot can detect when it is in trouble and right itself.
What do you mean IF you finish????
2 years until I finish my master's then I have to paply and get accepted to do the PhD :) So in 4 years I'll let yo uknow how it works out.
I hope you do well, I reckon you'd make a cool proffesor :D

This is so totally awesome! Congratulations on seeing this turn into a mass-produced toy!

I would love to buy one myself now, but I am very deep into a project of my own and don't have the time and coin to spare! Certainly will think about buying one once my own project pans out and starts paying me! :-)

Anway way, very cool. I love it when someone I've chatted with a bit gets something well deserved for all their work.