Anand Tyagi, Lab 4: Braitenberg Creatures

Lab 4: Braitenberg Creatures

PART A

Plan:

I will be making a modified version of the Dogged robot that is described in the Braitenberg Creatures paper. The original Dogged robot is an obstacle avoiding robot that simulates how people and animals natural avoid obstacles by sensing, or more specifically touching, the world around them. The main modification that I will make is to use the Ultrasonic sensor instead of a touch sensor to allow the robot to have the robot detect the world around it. It will continually scan the environment and if there is an obstacle that appears, it will turn away from that object in order to avoid it.

Documentation:

Code:

I made one continuous loop that is constantly looking around while the bot is running. And I had three different sub functions for three different subsections of the area that the Ultrasonic sweeps.

 

Video:

Here is a video of the robot in action.

https://photos.google.com/share/AF1QipPMI1sdpwLYVK7U72muYUtyfEl-WZhGAaduTVdsTuW7CM2hR5Aa-Fhjs50CRaicew?key=MmIyaHd1d2ZFQUJFS1Q2SjBIQjhCdjNGak85SkRn

PART B

Draw:

Inspiration:

My Drawing:

Robot Doggo:

The inspiration for the design of my robot dog drawing was this robot dog: K-9. This is a character in the show Doctor Who which I used to watch. Although I never actually saw the episodes with this character, I did hear a lot about it, and so, it was the first type of robot dog that came to mind when I started drawing. However, unlike K-9, my dog has legs. The first picture is just a simple side profile of the dog, while the next picture is meant to show how the dog would avoid obstacles in its path— in this case, it is jumping over a log.

Analyze:

As my robot was modeled after a dog, one situation where the behavior of my robot takes place in the real world is with dogs. Dogs are constantly running around and exploring, and in head of it all, they often bump into things. However, often times they are agile enough to quickly move out of the way. Besides, mostly all animals move out of the way of obstacles that arise in front of them. Thus, my robot, which was made to avoid obstacles around it, represents a key and basic trait found amongst mostly all animals.

Remix:

Go back to your mobile platform and think what was not accurate. Find one aspect that can be different and iterate the design/program/analyze process. Commit your new code and note the effects of your changes.

While coding the robot, I went through several iterations of the code. The major change I made was in relation to how I set up the functions and flow of the code. Initially, I had the bot go through it’s loop of looking around and continually check if it ever found anything. If it did, it would stop, turn a specific amount, check again, and if it was clear, it would continue. However, I soon realized that it is not actually possible to pass values through the functions provided by the scratch code. As a result, I could not call one “check if there is an obstacle” function that could then turn according to whatever value the servo was at. Instead, I made three different ranges— obstacleneg, obstaclemed, and obstaclepos— which turn in a direction opposite to the direction that he obstacle was detected in. Thus, in my final code, I manually defined the ranges and called the function respective to the position of the servo when the function was called.

Reflect:

As I stated in the beginning, the “Braitenberg Creature” that I modeled my robot after was the “Dogged’ robot. The Dogged robot works by first going in a direction until one of it’s bumpers is hit. At that time, it changes directions and goes in the opposite direction until the bumper on the other side is hit. As the “Braitenberg Creatures” paper notes, the robot “will fall into a pattern of running very quickly back and forth between two objects over and over again.” (Page 4). In order to make a slightly more effective and exploratory robot, I switched the method of obstacle detection to ultrasound which I put on a moving servo. This would allow the robot to see obstacles that are in almost any direction and adjust its path in advance and accordingly. Thus, my robot was able to go around any room and, in theory, explore the area without any major issues. And instead of just changing directions to go in the opposite direction, my robot just slightly alters its course. So, it is able to avoid the trap of going back and forth between the same two points or even a more enclosed corner, as shown in the video.

While the “Dogged” robot describes a basic obstacle avoiding robot, I believe my robot is the natural next step when making an obstacle avoiding robot— making a robot that can anticipate its obstacles a little bit in advance, and change its path before hitting the obstacle.

Leave a Reply