Anand Tyagi- Midterm Project Report

Research and Pre-project thoughts:

The main goal behind my project was to make a robot that could behave and react as smoothly as possible. After reading through the Breitenberg paper, I decided to make a Dogged Machine. However, I found the Dogged design to be too mechanical. Although the Dogged machine mimics the way an animal responds to touch, the actual reaction was very artificial: after being touched, it would simply move in the opposite direction. This reaction is very unnatural and so, I was determined to create a robot that would react in a much more natural manner.

The behaviors I wanted to mimic were that of toddlers. Young children have extremely short attention spans, and on top of that, are naturally curious, hopping from one thing to the next every few minutes. Even new borns can be seen darting their eyes around while lying on their back, taking in all of their new surroundings. So, with my robot, I wanted to mimic such a behavior and decided to weave it together with the Dogged model.

As a result, I aimed to make a robot that followed the following procedure: It would roam around, mainly in a straight line, “looking around” until it found something close by of interest. Then, when it found something of interest, it would go up to it, “inspect it,” and retreat back to it’s normal path after a few seconds and continue on its path. In reality, the robot would use the ultrasonic sensor to look for an object that was somewhere close by in its peripheral, and if it found something within a certain threshold, it would stop, approach the object until it got close enough, and then stay there for a few seconds, and then retrace its steps back to its original path and continue on its way. 

Problems and Solutions:

There were several problems I faced along the way. One of those problems was the issue of having the robot behave in a smooth and continuous manner, in order to truly mimic an animal in a more natural way. The way in which I tackled this issue was by having the robot move the ultrasonic sensor after a giving amount of time. Originally, the way in which I designated this interval was through the physical time it took for the program to loop through all of its commands. However, that proved to be inconsistent and so the head would occasionally jerk rather than rotate more smoothly. To improve this, I made the head turn in accordance to the running time. This allowed for a more natural turning of the servo and thus a more fluid motion.

However, there was another problem, the head, or sonar sensor, was moving too fast and thus unable to read its values accurately. So, in order to not move to fast, I modded the running time by 8: now the head would move frequently and smoothly enough that it was not too robotic, but also not too fast that it would not be able to read the values. I choose 8 because after testing a variety of values, 8 gave the best intersection between smooth movement and accurate sensor readings.

The next issue was getting the robot to turn in the correct direction that it saw the object. One problem I ran into was the fact that the sensor reading would be happening while the code would continue to the next line. As a result, the point at which the robot detected something would not always be the direction in which it would be facing when it detected something in front of it. In order to fix this, I decided to check a variable instead of checking the value directly which allowed me to guide the robot in the correct position. It also allowed me to check a constant value rather than a ever changing value which further prevented the robot from executing the wrong section of code. 

Finally, I had to solve an issue related to direction of the robot. Since the motors did not move at the same speed, I had to go through a bunch of trial and error to figure out their respective speeds with respect to each other. I also had to figure out how to turn the robot to a specific angle. The manner in which I did this was simply by moving one of the two motors at a specific speed for a certain amount of time. The determination of how long and at how much power I should move each of the motors to turn the robot at a certain angle was done through trial land error as well.

Final thoughts:

At the end, I did accomplish what I aimed to do: create a robot that could move slowly and react in a more natural manner. Some ways in which I would improve this project would be to add a random element to the decision making: instead of going after every object, the robot would “spontaneously” choose whether or not it wanted to go see the object. Along with that I would have the robot move even more smoothly and not have to stop, turn, move forward, move back, and instead veer in the direction of interest instantly and thus act in a more fluid manner. 

One major lesson I learned was in regards to the time that each command takes to execute and how it is important to put physical stops between commands in the code, as occasionally, as shown with the sonar sensor readings, the code progresses faster than the physical movement of the robot.

Sources:

“Cognitive Development: 8 to 12 Months.” HealthyChildren.org, American Academy of Pediatrics, 2009, www.healthychildren.org/English/ages-stages/baby/Pages/Cognitive-Development-8-to-12-Months.aspx.

Wallace, Meri. “Young Children Are Curious.” Psychology Today, Sussex Publishers, 2015, www.psychologytoday.com/us/blog/how-raise-happy-cooperative-child/201501/young-children-are-curious.

Leave a Reply