Difference between revisions of "Humanoid Robotics 1"

From IPRE Wiki
Jump to: navigation, search
Line 1: Line 1:
 
''' Melanie Shafer ''' <br>
 
''' Melanie Shafer ''' <br>
Mentor: Doug Blank
+
''' Mentor: Doug Blank '''
  
 
= Current Abstract =
 
= Current Abstract =

Revision as of 19:19, 1 June 2010

Melanie Shafer
Mentor: Doug Blank

Current Abstract

Arduino Duemilanove Microcontroller

A humanoid robot is a robot that is designed to have the appearance and body of a human. It typically has a head, a torso, and two arms and legs. Humanoid robots are also meant to be autonomous, meaning that they can perform tasks on their own without continuous human control. This summer I will be using the Arduino platform to control my own humanoid robot. Arduino is an open source physical computer patform which uses an input/output board. The microcontroller on this board uses the Arduino programming language and the Arduino development environment , which are both based on the Processing programming language. Arduino can receive input from its environment by IR (infrared) sensors connected to the board, and it can then react through controlling servo motors or other actuators. I plan to communicate with Arduino over a serial interface in Python, so that I can rad and write to the serial device, specifically enabling the robot to respond to inputted values through initiating servo motors (i.e. move the robot's joints).
A popular application of such humanoid robots is the "Robot Soccer World Cup," also known as "RoboCup." This is an international robotics competition promoting research and education in artificial intelligence. In this competition, various categories of autonomous soccer robots compete in games against each other. My ultimate goal for the summer is to enable my robot to play soccer on its own, without constant need of human guidance.

Daily Blog

This is where I will keep track of my work each day.

Week 1

05/24/10

Today I read the book “Getting Started with Arduino” for my first introduction to this platform. The following are brief notes from the 1st chapter:

Arduino:
- physical computing platform
- implements the Processing language
- you program it via USB cable, not a serial port

Interaction Design:
- experiences between humans and technology

Physical Computing:
- uses electronics to prototype new materials for designers/artist
- design of interactive objects to communicate with humans
- uses sensors, software running inside a microcontroller

I started out by connecting the arduino to the computer by USB. It seemed too complicated to install all the arduino software on Linux, so I’ve been running Windows. I ran some example sketches, and I was able to make the LED light on the board flash at 1 second intervals. I edited this sketch to change the interval of blinking. By the end of the day, I was able to connect the servo motor to the board. Through help of online example sketches, I made the motor move back and forth 180 degrees.

05/25/10

How to connect servo to arduino:
- Servo black wire to arduino ground (gnd)
- Servo red wire to arduino 5V
- Servo yellow wire to arduino digital pin 9

How to connect IR sensor to arduino:
- IR black wire to arduino ground (gnd)
- IR red wire to arduino 5V
- IR yellow wire to arduino Analog In 1

I attached the IR sensor and the servo motor to the arduino at the same time. My goal was to make the motor move based on readings from the IR sensor. Originally I had trouble getting the IR sensor to work while the motor was connected, because both needed to be attached to the 5V power port. To solve this, I connected a wire directly from the 5V port to the breadboard for the sensor, and then I took another wire that connected from that area of the breadboard to another for the motor. Another problem was that I did not know how to print out data from the sketches I write. I knew that “Serial.print()” should work, but I didn’t know where it was printing to. To see where it prints, you need to open the “Serial Monitor” box. Now I have code that moves the motor if the IR detects an obstacle. The Serial Monitor also prints out the IR reading, and it prints when an obstacle is detected. I edited this code so that while there is no obstacle in the way, the LED light stays on, and once the sensor detects an obstacle, the light turns off.
I also set up the Rovio robot and installed the initial software needed. So far it hasn't been able to do much moving around because it needs to be charged, but I got to experiment with its camera. There are three different heights that the robot "head" can be at, so it any time, the robot can see all around itself.

05/26/10

In the morning I continued to work on the rovio robot. One thing it is supposed to be able to do is locate and travel to its "home," also known as the charging dock, all on its own. Even though its battery was fully charged by the morning, it still had trouble moving itself to the dock. I think the problem is that the light projected on the ceiling from the dock is being interrupted by the various ceiling fixtures in the room. The instruction manual said that ceiling lights or fans could disrupt the light so that the rovio cannot correctly locate its home. I think the lights on the ceiling here in the lab are causing the problem, but later I will try moving the dock so that it has a flat ceiling above it.

Arduino Programming Environment
Processing Programming Environment

Later in the day I used the arduino to try and control servo motion based on keystrokes, specifically enabling the servo to move based on pressing certain keys. This led me to researching the similarities and differences between the Arduino software and the Processing programming language. Although their programming environments and the languages themselves are very similar, as the Arduino software is based on Processing, Arduino has significantly fewer libraries than that of Processing. I found several articles through [www.arduino.cc] that explained how Arduino and Processing codes can run together to go on the microcontroller. I haven't yet figured out how to write to the arduino serial port through Processing, but I will try again using Python. I did however write a code using the Arduino software that allows for an input into the Serial Monitor, and based on the input, it lights up the LED on the microcontroller.


05/27/10

Today I continued to work on reading into a serial port by using Processing. I was having trouble originally because it claimed to not be able to find and connect to the correct serial port. Then I tried using Python instead. I spent a lot of time reading about the "pyserial" library and how I would read and write to a serial port. I found several useful articles, but I was still having trouble connecting to the serial port for the arduino. I read that with windows, python can have trouble connecting if the number in the serial port name is above 09 (meaning COM01 through COM09 would work). On this computer, the arduino was on COM12, so it was not connecting. I eventually tried this again on my Macbook, and it was able to connect and write to the serial port. In the next days I'll have to figure out how to do this on a computer running windows.
Later in the day, Jenny from Villanova came with her professor to visit our CS lab. Jenny from BMC, Jenny from Villanova, and I all talked about our summer research with Doug, Diana, and the Villanova professor.

05/28/10

Lab safety training!

Week 2

06/01/10

Doug told me that the servo motors on this robot are made by Bioloid. They can be controlled in a similar fashion to the servos for the Arduino, but they use a different microcontroller called CM-2. We spend a long time downloading the RoboPlus software, which is used to interact with the CM-2. Doug opened up the RoboPlus Terminal and attached the CM-2 to one of the servos on the robot's arm. He said at first he got the servo to move, but now we're not sure how to get it to move again. It might be that the power source is not strong enough. Our goal for this week is to get the servos moving from the CM-2 commands and to hopefully start thinking about the settings for each servo to put the robot into different set positions. This will be the first step to making the robot walk.