VVV09 Control Gazers Group

From Wiki for iCub and Friends
Revision as of 11:30, 27 July 2009 by VVV09 (talk | contribs)
Jump to: navigation, search

Participants: (Please Join)

Alex Bernardino

Jonas Ruesch

Lorenzo Natale

Objectives

ControlGaze2 is a module that controls in a coordinate way the head and the eyes of the iCub. It has been made for two main purposes: - Specify the gaze direction of the robot in (azimuth,elevation,vergence) angles rather that raw head/eye joints. - Provide a biological look to the dynamics of Head/Eye coordination.

The module allows changing the gaze direction by: - Specifying the absolute azimuth and elevation angles (in degrees). - Specifying the azimuth and elevation angles relative to the current gaze direction. - Specifying the pixel coordinates in the image where we want the robot to look at. - ... (TBC)

ControlGaze2 - Current State

Starting ControlGaze2

controlGaze2 <parameters>

To start control gaze you need to define the following parameters:

configCamera

E.g.

--configCamera iCubEyes.ini

A file with camera parameters. To convert from pixel coordinates to azimuth and elevation angles we need the intrinsic parameters of the cameras. These are the parameters that result from camCalibConf. The file should be something like this:

[CAMERA_CALIBRATION_RIGHT]

projection pinhole drawCenterCross 0 w 320 h 240 fx 224.34 fy 223.723 cx 178.58 cy 92.5934 k1 -0.381097 k2 0.153629 p1 0.0011246 p2 -0.00120395

[CAMERA_CALIBRATION_LEFT]

projection pinhole drawCenterCross 0 w 320 h 240 fx 214.953 fy 213.455 cx 166.773 cy 125.505 k1 -0.358372 k2 0.116527 p1 -0.000603539 p2 -0.000591796

---

If the images come from camCalib modules, the optical distortion parameters (k1, k2, p1, p2) should be put to 0.

appPath

E.g.

--appPath c:/icub/app/myapp

The folder name where to find the previous file. This is subject to change given the new ResourceFinder specification.


imageSize

E.g.

--imageSize 160 120

If the image size is different from the specified in the calibration file, this allows rescaling the intrinsic parameters. If this is not specified, the module will use the image dimension specified in the calibration file.

motorboard

E.g.

--motorboard /icub/head


This specifies the prefix of the port names made available by the control board to the head device. If you use ICubInterface, this is usually /icub/head.

Other not so interesting parameters

pidON 0 pidGAIN 5.0 vorON 0 log 0 K 0.04 0 -0.08 -0.024 0 -0.056 FrameRate 20 ControlRate 50 limitResetTime 3.0 headSaccadeDelay 3.0

Testing the module from the console

The module has a console interface where you can issue the following commands.


-- ACTUATION COMMANDS

   * sac abs <azy> <elev> : saccade in absolute angles (degrees)
   * set pos <azy> <elev> : same as before (obsolete but left here for historical reasons)
   * sac rel <azy> <elev> : saccade in head angles (degrees) relative to the current position
   * sac img <x> <y> : saccade in camera normalized relative coordinates (-1,1)
   * sac pix <x> <y> : saccade in image pixel coordinates 
   * pur abs <azyspd> <elevspd> : pursuit in absolute angular velocities
   * pur rel <azyspd> <elevspd> : pursuit in angular velocities relative to the current ones (acelerates, decelerates)
   * pur img <x> <y> : pursuit in camera normalized relative coordinates (-1,1)
   * pur pix <x> <y> : pursuit in image pixel relative coordinates 

-- STATUS COMMANDS

   * rset : resets the state of the controller
   * get st : get time from last saccade
   * get stat : get controller status
   * get ref : get current gaze reference
   * get dh : get current head gaze
   * get der : get current right eye gaze
   * get del : get current left eye gaze 

-- CONFIGURATION COMMANDS

   * set mst : set minimum saccade time (a.k.a head saccade delay)
   * set lrt : ser joint limit reset time
   * get mst : get minimum saccade time (a.k.a head saccade delay)
   * get lrt : get joint limit reset time