PDA

View Full Version : [Project] Meet A.S.T.R.I.D.



LinuxGuy
09-17-2009, 01:07 PM
I've decided to start another robot project for when I get stalled on W.A.L.T.E.R. or want to work on something completely different. The SES will figure very prominently in this new project, which will be based on a slightly modified A4WD1 v2.0 rover kit. It will not use the stock motors because I want to have encoders on the back wheels. I'm not sure encoders would be useful on the front wheels.

Right now, I would like to use the GHM-14 (front) and GHM-15 (rear) motors, but these are not in stock and I don't know if/when they will be. If that doesn't work out, I will either use the GHM-04 or GHM-16 motors with encoders on the rear motors.

I'm going to get the A4WD1 kit next month, as I've wanted one of these for quite awhile now and the v2.0 rover has most of what I need for doing stuff that would not be appropriate for W.A.L.T.E.R. because he only has two wheels and not enough stability to do what I want to do with A.S.T.R.I.D.

As far as modifications to the A4WD1, I will have to a vertical triple SES hole setup to the side panels near where the current motor mount holes are. I will not be mounting the motors in the standard locations. This is where I will mount the new locomotion system to the rover. This system will provide for variable ground clearance as well as increased climbing ability hopefully. I'm planning to use some sort of wireless control for testing and manual over rides in case of problems.

I already have most of the other parts to build the modified locomotion system for the A4WD1. I've located the short spacers I need for the 2-56 screws at McMaster (http://www.mcmaster.com), which will go between the side panel and an ASB-24 (no 3D model yet) bracket.

Everything I have learned and will learn while working on W.A.L.T.E.R. will come into play with A.S.T.R.I.D. also, since he is still my main development platform. I just need to get some 3D models done for the A4WD1 v2.0 rover parts and the ASB-24 so I can check my designs out before I build. I'm just really starting to realize how much I depend on the 3D CAD stuff for robot designs and builds.

For those who have followed my various designs, you know it will be something quite different than what anyone has seen to date.. :D:D I think this is an exciting new project that will expand the capabilities of the A4WD1 rover base. :)

8-Dale

LinuxGuy
09-26-2009, 10:15 PM
I've been tinkering with the Webbot library (http://sourceforge.net/projects/webbotavrclib/) (suggested by Ro-Bot-X), and it is quite interesting. I already have the same setup I was working on before created and working using this library. I'm planning to do some more work with it and see how far I can go with it. I'd call this a great suggestion! :happy:

I think this will allow me to concentrate more on the overall behavior algorithms and not worry about the lower level code. I can't believe I said that! :veryhappy: I guess I've gotten to a point where I am tired of dealing with low level sensor coding and would rather concentrate on the behavior aspects for my robots. I am starting to warm up to the idea of dealing with sensors more as black boxes, and not writing all the code myself.

My first use of this and the Axon controller will be here, on ASTRID. Since I can, at least temporarily, power the Axon from one of the SSC-32 servo headers, this should make a good combination. I won't need the SSC-32 on WALTER, but will need it on ASTRID. I'll be moving the arm I originally designed and built for WALTER to ASTRID, and there will be other servos for the new locomotion system connected to the SSC-32.

I already have the Axon and SSC-32 powered in this configuration and it works fine. I will eventually get a dedicated 7.2V battery pack with the Hitec connector for the Axon and power the SSC-32 from a single [email protected] pack for the servos. I'm also excited about getting an A4WD1 rover platform to work with for ASTRID and think it will be a very stable and good base for what I want to do.

8-Dale

LinuxGuy
09-28-2009, 08:56 PM
I've been doing some more coding for ASTRID and WALTER, but seem to be having a strange problem with some variable definitions relating to the Webbot library.

I have the following:

PingSonar ping[8] = { MAKE_PingSonar(F0),
MAKE_PingSonar(F1),
MAKE_PingSonar(F2),
MAKE_PingSonar(F3),
MAKE_PingSonar(F4),
MAKE_PingSonar(F5),
MAKE_PingSonar(F6),
MAKE_PingSonar(F7)
};

Sharp_GP2D12 ir[8] = { MAKE_Sharp_GP2D12(K0), // <-- This is line 25
MAKE_Sharp_GP2D12(K1),
MAKE_Sharp_GP2D12(K2),
MAKE_Sharp_GP2D12(K3),
MAKE_Sharp_GP2D12(K4),
MAKE_Sharp_GP2D12(K5),
MAKE_Sharp_GP2D12(K6),
MAKE_Sharp_GP2D12(K7)

};The first definition for ping[8] compiles and works perfectly, but the second one for ir[8] gives me an error

"../walter-webbot.c:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ir'",

which does not make any sense to me. I've double checked with the Webbot documentation on how to define and use each type of sensor, the names of the creation routines, etc, and just don't see the problem.

Can anyone shine some light on this problem?

8-Dale

LinuxGuy
05-17-2010, 08:27 PM
I am also back to working on ASTRID now. I am taking this robot in a different direction and turning it into a four legged walker. The legs are all 3DOF with foot rotation and tilt added. Since I need to be able to work with these new legs I designed so I can perfect them, hopefully for later use on WALTER replacing the foot assembly with a motor and wheel, I decided to work with two different robots.

8-Dale

LinuxGuy
05-19-2010, 10:49 AM
I did a photoshoot with A.S.T.R.I.D. and here are some pictures of my current progress.

http://i853.photobucket.com/albums/ab97/robotguy_bucket/ASTRID/astrid_front.jpg

Walking mode only with just a foot. My current servo arrangement is two HS-475s for the hip and foot rotation with three HS-645s for the heavy lifting joints (2nd and 3rd) and foot tilt.


http://i853.photobucket.com/albums/ab97/robotguy_bucket/ASTRID/foot_left.jpg

http://i853.photobucket.com/albums/ab97/robotguy_bucket/ASTRID/leg_front_right.jpg


http://i853.photobucket.com/albums/ab97/robotguy_bucket/ASTRID/tilt_backward.jpg

http://i853.photobucket.com/albums/ab97/robotguy_bucket/ASTRID/tilt_forward.jpg

http://i853.photobucket.com/albums/ab97/robotguy_bucket/ASTRID/tilt_left.jpg

http://i853.photobucket.com/albums/ab97/robotguy_bucket/ASTRID/tilt_right.jpg

This is where I eventually want to go with the leg design I want to test and put on W.A.L.T.E.R. I am no doubt going to have to replace the heavy lifting servos with 5980s or 5990s.

Rolling mode:

http://i853.photobucket.com/albums/ab97/robotguy_bucket/ASTRID/wheel_rolling1.jpg

http://i853.photobucket.com/albums/ab97/robotguy_bucket/ASTRID/wheel_rolling2.jpg

http://i853.photobucket.com/albums/ab97/robotguy_bucket/ASTRID/wheel_rolling3.jpg

Walking mode:

http://i853.photobucket.com/albums/ab97/robotguy_bucket/ASTRID/wheel_walking1.jpg

http://i853.photobucket.com/albums/ab97/robotguy_bucket/ASTRID/wheel_walking2.jpg

http://i853.photobucket.com/albums/ab97/robotguy_bucket/ASTRID/wheel_walking3.jpg

8-Dale

LinuxGuy
05-29-2010, 01:58 PM
I've been working a bit on the electronics and control scheme. Right now, I am developing software for an Arduino that will allow it to accept commands from a master controller and execute specific actions. I'm doing development using my Sanguino, since it is breadboard friendly. So far, I have it connected to four sensors - two Sharp IR rangers and two PING ultrasonic rangers.

Here is the physical setup so far:

http://i853.photobucket.com/albums/ab97/robotguy_bucket/Robotics/sanguino_sensors.jpg

My software allows a Sanguino/Arduino to accept one or two character commands with or without an additional parameter. Below is the Arduino software so far:

/*
http://www.arduino.cc/en/Tutorial/SerialCallResponse

Created 26 Sept. 2005
by Tom Igoe
Modified 14 April 2009
by Tom Igoe and Scott Fitzgerald

Modified 20-May-2010
Dale Weber <[email protected]ybotics.org>
Added commands to read sensors and send readings back through UART.
*/

#define IR_MAX 2
#define PING_MAX 2
#define PING_START 4

#define HEARTBEAT_PIN 2

int inValue = 0; // Incoming serial byte
byte ir[6], ping[8]; // Sensor data

// Establish contact with the master controller
void establishContact() {
while (Serial.available() <= 0) {
Serial.print('!', BYTE); // Send a '!'

delay(300);
}
}

// Read distance from a PING ultrasonic sensor
// Code taken from the Arduino Playground. Returns distance in cm.
byte read_ping (byte pin) {
unsigned long echo = 0;
unsigned long ultrasoundValue = 0;

pinMode(pin, OUTPUT); // Switch signalpin to output
digitalWrite(pin, LOW); // Send low pulse
delayMicroseconds(2); // Wait for 2 uS
digitalWrite(pin, HIGH); // Send high pulse
delayMicroseconds(5); // Wait for 5 uS
digitalWrite(pin, LOW); // Hold off
pinMode(pin, INPUT); // Switch signal pin to input
digitalWrite(pin, HIGH); // Turn on pullup resistor

echo = pulseIn(pin, HIGH); // Listen for echo
ultrasoundValue = echo / 58.138; // Convert to cm

return ultrasoundValue;
}

// Read Sharp GP2D12 IR sensor.
// Code taken from the Arduino Playground. Returns distance in cm
byte read_gp2d12 (byte pin) {
int tmp;

tmp = analogRead(pin);

if (tmp < 3)
return -1; // Invalid value

return (6787.0 /((float)tmp - 3.0)) - 4.0;
}

// Convert lower case to upper case
char toUpper (char inp) {
if ((inp >= 97) & (inp <= 122))
return inp - 32;
else
return 0xFF;
}

// blink a heartbeat LED
void do_heartbeat (void) {
digitalWrite(HEARTBEAT_PIN, HIGH);
delay(250);
digitalWrite(HEARTBEAT_PIN, LOW);
delay(250);
}

void setup() {
byte i;

pinMode(HEARTBEAT_PIN, OUTPUT);

// start serial port at 115200 bps:
Serial.begin(115200);

// Initialize sensor arrays
for (i = 0; i < IR_MAX; i++)
ir[i] = 0;

for (i = 0; i < PING_MAX; i++)
ping[i] = 0;

establishContact(); // Send a byte to establish contact until receiver responds
}

// Responds to commands from the master controller and updates sensor readings
void loop() {
byte errorNr = 0, sensorNr = 0; // Eorror number, Sensor index number
byte angle = -85, increment = 10; // Scan angle and increment
byte pin, inValue; // Pin number to read (analog or digital)
boolean scanarea = false; // Scan flag
char maincmd, seccmd; // Main and secondary command chars

errorNr = 0;

do_heartbeat(); // Blink the heartbeat LED

// Get incoming byte:
if (Serial.available() > 0) {
maincmd = toUpper(Serial.read());

Serial.print("\nMain: ");
Serial.write(maincmd);

// Process master controller commands
switch (maincmd) {
case 'R':
if (Serial.available() > 0) {
// Get the second character of the command
seccmd = toUpper(Serial.read());

Serial.print(", Secondary: ");
Serial.write(seccmd);

switch (seccmd) {
case 'A': // RA command (Read Analog)
case 'P': // RP command (Read Pulse)
// Read an analog pin
pin = Serial.read();

if (seccmd == 'A')
inValue = analogRead(pin);
else {
pinMode(pin, OUTPUT);
digitalWrite(pin, LOW);
pinMode(pin, INPUT);
inValue = pulseIn(pin, HIGH);
}

Serial.print(inValue, DEC);

break;
case 'V': // RV command
// Send all current sensor readings
// Send header
Serial.print(IR_MAX + PING_MAX, BYTE);
Serial.print(IR_MAX, BYTE);
Serial.print(PING_MAX, BYTE);

// Send IR sensor readings
for (sensorNr = 0; sensorNr < IR_MAX; sensorNr++)
Serial.print(ir[sensorNr], BYTE);

// Send PING sensor readings
for (sensorNr = 0; sensorNr < PING_MAX; sensorNr++)
Serial.print(ping[sensorNr]);

break;
case 'I': // RI command (Read IR)
// Send single IR sensor reading
sensorNr = Serial.read();

Serial.print(ir[sensorNr], DEC);
Serial.println(" cm");
break;
case 'U': // RP command (Read PING)
// Send single PING ultrasonic reading
sensorNr = Serial.read();

Serial.print(ping[sensorNr], BYTE);
break;
default:
// Invalid command
errorNr = 253;
Serial.print("\nBad Secondary Command");
break;
}
} else
errorNr = 254;
break;
case 'S': // S command (Scan area)
// Scan area using pan/tilt
scanarea = true;
break;
case 'T': // Test command
// Test command
Serial.write('M');
break;
default:
// Invalid command
if (errorNr == 0)
errorNr = 255;
Serial.print("\nBad Main Command");
break;
}
}

if (errorNr != 0) {
// Send error code back to master controller immediately
Serial.print(0xFF, BYTE);
Serial.print(errorNr, BYTE);
errorNr = 0;
} else {
// Read IR sensors
for (sensorNr = 0; sensorNr < IR_MAX; sensorNr++)
ir[sensorNr] = read_gp2d12(sensorNr);

// Read PING sensors - Digital pins 4 through 11
for (sensorNr = 0; sensorNr < PING_MAX; sensorNr++)
ping[sensorNr] = read_ping(sensorNr + PING_START);

delay(50);
}

// Scan an area from -85 degrees to +85 degrees using a pan/tilt
if (scanarea) {
Serial.print("\nScanning..");
scanarea = false;
// Scan area using the Pan/Tilt sensors
}
}As soon as I have verified that the Arduino software is performing its functions properly, I'll continue developing Python code to communicate with and control it. Right now, I can send commands using a serial console and have a lot of extra printing statements in so I can monitor what is going on inside. My plan is to have one or two RoboDuino slaves connected to a BeagleBoard or Gumstix Overo as the master controller.

8-Dale

animeunplugged
09-07-2010, 12:49 PM
wow thats a pretty cool project and I can't wait to see more!

mackinthebox
02-03-2011, 11:31 PM
im closely watching this one :)
wheeled bots capable of walking are pretty cool, something I would like to make myself eventually