Back

Stage 01

Objective: Make the Nomad Move down the hall and count doors as it moves along stopping at a specified door.

What we did:


Stage 02

Objective: Have the robot avoid obstacles while the it is moving down the hall.

What we did:


Stage 03

Objective: Have the robot go through a given maze from a specified room and direction to a specified room within the maze.

What we did:

This project we broke up into two parts:

To have the robot generate a string of directions, we first had the program read a map file; then the program figures out the shortest path to the destination. We then had that information stored to an array for the follow instructions routine to use.
Following the instructions was very easy. We simply read in the next direction, compared it to the current direction, and used the results in the form of one or two 90 degree right turns or one left turn to face the correct direction. We then made another routine to get to the next room.
The move to next room procedure simply stayed in between the walls and stopped when it is in the middle of the room. It knows when it is in the middle of the room by reading the distance from the robot to the wall in front of it (we made another data file that tells it how many rooms are left when it reaches a certain room).

The Final project

To make a high level programming language for the Nomad.

What we did:

In addition to making an interface where we could type in a command and have the robot follow that command, we also made an adaptation to the maze program and included it in the command functions that we made available. This adaptation was that, instead of simply going from a specified room to one destination room, now we could go to any sequence of rooms. In other words, we could now tell it to go from room, say 4 to 5, then 2, then 5, again and so on. We did this by having the user in the beginning specify a sequence of rooms in the format of 1 4 3 2…. ending with 0, to stop the robot at the last
room. We then included our previous procedure into a loop, now taking in the instructions, instead of from a user, now from an array that contains the string of rooms that the user had previously specified. Another addition was that we added a function to follow the closest object to the robot, and yet another function to run from the object closest to the robot. This
was done by finding the closest object to the robot and moving that sonar’s number*22.5 direction. The rest of the project was simply a matter of putting everything else that we had done to date into a switch statement, and not stopping until a “quit” command were issued.

The commands are:

turn_right Turns right by 90 degrees
turn_left Turns left by 90 degrees
do_maze Runs the modified maze program
do_doors Goes down the hall a specified number of doors to the right or left
go_forward moves forward for a specified length of time
go_backward Moves backward a specified length of time
run runs from closest object
follow follows’ the closest object
quit quits the program altogether

This is the code that runs this final project.