miercuri, 18 mai 2011

some things about the mirror test. preliminary notes

Well there is a time (...usually no time at all :p ) when a master project has to be done.
For two weeks now I got to work for my master thesis without doing any additional tasks..
From the tasks I was assigned previously I learned about the latest ONI boom and also got to know NAO better.
I read some papers about what has been done lately  on the "mirror test" topic and I am going to  try doing something more or less related.

1. The mirror test

The mirror test, also called the mirror self-recognition test, or MSR is an experiment developed by Gordon G. Gallup.This experiment studies the reaction of animals in front of the mirror and tries to determine if they are conscious of the own presence there, if they identify the fact that in the mirror shows only the reflection.

2. State of the art

 The mirror test has been proposed  as a test for conscious machines - "if the machine is able to recognize itself in the mirror then the machine should be self-aware"[1]


Several implementation of this test were made on robots:

  • Junichi Tackeno of Meiji University Japan builds small robots that demonstrate inner activity exposed to their mirror image or another similar robot. He states that this is a demonstration of self awareness.[2]


  • Another application is developed at MIT by Fitzpatrick Arsenio and Torras-Jara on a robot called Cog. These test was developed focused on the movement of the hands of the robot and the visual field in the mirror.[3]


  • Michel, Gold and Scassellati at Yale use a Nico robot and make it pass the test by using the movement in the mirror useing a time window without mapped on the movement detected in the mirror.[4]


3. Test motivation and meaning

The mirror test is not exactly intended as a general test for consciousness, but as a specific test for self-consciousness,  and more exactly self-recognition.  It is really hard to state that self-consciousness is  achived by robots only by passing the mirror test.

Consciousness would involve other internal models that are compulsory in this matter, things like: personal history, emotional evaluation, reaction evaluation. An "mental self-image"[5] would be the key for achieving consciousness. These would mean having also a "personal history with personal needs, goals, emotional values and styles of action" .

Identification in a mirror is only a minor attribute of what it would be a conscious machine. As Haikonen states in his work[5] a conscious machine should have both a "body  image" and a "mental self-image ".
As I mentioned above the goal of this project is only achieving identification in the mirror, passing the mirror test.

4. Experiment details

All the tests made until now used more or less crude data obtained from camera images.

The test case developed in this experiment tries to avoid processing crude data and uses a Kinect device for vision and as a test subject a NAO robot.
Using OpenNi and NITE the Kinect extracts the skeletons identified in the mirror. The skeleton is compared by the robot to its own movement in a time window. If the movement matches the skeleton behavior extracted from the mirror in the time window then there is a probability that the reflection is the robot's one. The procedure continues until the confidence coefficient of the tracking is sufficiently close to one.
  ~To be continued~
[1]
[2]
[3]
[4]
[5]

duminică, 1 mai 2011

Mirror game - specific adjustments

Finally I made the ROS work with Kinect and NAO under Ubuntu...It was a long journey with several crashes along...

What next?

The task that I was given is used for a study of children with autism. This experiment made in Cluj, Romania and the purpose is to see what is the response rate of child interacting with NAO robot in a game of mirroring. If the response is positive maybe the next step in rehabilitation would be a better interaction with the therapist.

The code that I succeed in reusing needed some adjustments in the behavior of the robot:

1. The scenario was designed for a statical interaction, so I had to remove the walking. Another reason for this modification was the fact that NAO, as many robots of its kind is not a very stable walker.
2. The attention mode was removed because there was no use for it in the experiment.
(This two adjustments were made only by removing some parts of the original code).
3. The behavior of the robot had to be mirrored, because in the original application the robot was having the same orientation as the tracked body. For that I had to modify some functions that were controlling the motion of the body.
4. An improvement needed to be done to the calibration because this was very slow and also needed to be done every time the user appeared in the scene. For these we saved the initial tracked skeleton and reused it.
5. The motor control was removed and the motors were enabled at the beginning of the execution.

Here you can see the result:
http://www.youtube.com/watch?v=8rXAxGgzKHM

sâmbătă, 26 martie 2011

Update on nao_openni

As a first task for my master thesis I had to make the "nao_openni" packedge work with a NAO robot and a Kinect.
A demo of this application is shown here:

http://www.youtube.com/watch?v=rSKRgasUEko  

I am going to write here all the stuff I've tried even though not all of it was successful.
There are tree kind of packages you need  in order to connect the two devices:

- packages for NAO robot
 http://www.aldebaran-robotics.com/en

- packages for Kinect - free software for the Microsoft Kinect
 http://openkinect.org/wiki/Main_Page

- packages of ROS (Robot Operating System)
 http://www.ros.org/wiki/

Compatibility issues:

First of all I had to choose an operating system on witch to install the software.
Because of the administrator rights I didn't have on my lab computer I first tried to install all of them on my laptop that is a DELL Inspiron 6400.
My ATIX1400 graphical card doesn't have a good Linux driver so I first tried to install all the software on Win7.

Step 1:All went fine with the packedges for Kinect:
http://openkinect.org/wiki/Getting_Started#Windows 

Although, I don't recommend it because it is the most time consuming solution.
If in Win7 you can do it in 2 hours by using CMake for all the dependencies and so on in Ubuntu it is done by writing 4 lines(see the tutorial).

Step 2 was to install Choreograph 10, the latest version of the software for NAO.
Being new to the robot I didn't have any idea about the version of software the robot  had on it.

For a while I tried to understand why my Choreographe and NaoQi seemed to have different versions (when I tried to connect to the robot by direct plug in of the utp cable) I had a warning that I was using different versions of Choreographe and NaoQi.
I flashed the key for NAO and tried again. Because the robot software hadn't been updated for a while the latest version of Choreograph was impossible to use. 

Step 3: Installing ROS on Win7 is not fully supported so I followed this tutorial to installing it on cygwin:
 http://mplab.ucsd.edu/~ting/notes/ros/ros-cygwin.html

The examples from the tutorial worked fine but when trying to make the "nao_openni package" work several things started crushing so after two or three days of getting the dependencies I just gave up.