Arm yarl

From Wiki for iCub and Friends
Jump to navigation Jump to search
The correct title of this article is arm_yarl. The initial letter is shown capitalized due to technical restrictions.

yet another reaching learner...

Author: Torbjorn S. Dahl, University of Wales, Newport, torbjorn.dahl@newport.ac.uk

This module allows iCub to learn reaching movements using a simple reinforcement learning algorithm based on crude corrective movements [Fagg et al., 97]. The goal of yarl is to be able to learn a general reaching behaviour from any starting arm configuration to any goal coordinates. This is inspired by having the goal coordinates provided by the attention module.

Caveats

  • Most importantly, no precautions are taken to ensure that the movements produced are safe to the iCub or anyone else. Yarp produces arm movements with a random element and it is highly likely that if this code is run without further safety precautions, it will damage the robot.
  • So far, yarl has been developed on Webots and is using a Kinematic chain corresponding to the Webots iCub model rather than the iCub's.
  • Also, yarl currently only learns a finite number of reaching movements from a fixed starting point to a finite number of target positions.

To do

  • Ensure that the movements produced cannot harm the iCub. To do this I suggest generalising the armSimpleCollisionFilter module to check movements as well as potisions.
  • Get kinetmatic information from a file so that yarp can be used on the Webots simulator, the iCubSimulation module, and the real robot.
  • Get target location data through yarp.
  • Generalise to learn reaching from any initial arm position to any target position.

Back to the ReachingGroup

Compiler & Linker Dependencies

None.

Include files

#include <math.h>

#include <kdl/kinfam/serialchain.hpp>
#include <kdl/frames.hpp>
#include <kdl/frames_io.hpp>

#include <ace/OS.h>
#include <ace/Log_Msg.h>
#include <ace/Sched_Params.h>

#include <yarp/os/ConnectionReader.h>
#include <yarp/dev/ControlBoardInterfaces.h>
#include <yarp/dev/Drivers.h>
#include <yarp/dev/PolyDriver.h>
#include <yarp/os/all.h>
#include <yarp/String.h>

Libraries

YARP libs
kdl (The kinematics and dynamis library from the Orocos project)

Run-time Dependencies

YARP libs
kdl

Module arguments

None, but see 'User interface mechanisms' below.

Ports accessed

Ports that are assumed to exist prior to instantiation of the module (i.e. some other module must create them)

/yarl/webots/left_arm

For webots simulation time mode:

/yarl/webots/time/out
   

Ports created

Ports that are instantiated by the module and are then available for other modules to use (using yarp connect)

/yarl/left_arm

For webots simulation time mode:

/yarl/webots/time/in
   

Input data files

None

Output data files

None

Configuration files

None

User interface mechanism

The module accepts two command line options. The -wt option forces the module to relate to Webots simulation time rather than real time. The default behaviour is to use real-time. The -trial option sets the maximum number of trials that may be used in the learning process.

OS on which the module was developed

Linux, Fedora 7

OS on which the module was tested

Linux, Fedora 7

Operating system dependencies

The module does not have any OS-specific dependencies.

Example instantiation of the module

./arm_yarl -wt 0 -trials 30

iCub Capabilities

None

iCub capability code

None

Other Yarp modules required to effect this capability

For use of Webots simulation time rather thna real-time, the webots module is needed.

Example instantiation

None

References

  • Fagg, A. H., Zelevinsky, L., Barto, A. G., Houk, J. C. (1997) Using Crude Corrective Movements to Learn Accurate Motor Programs for Reaching, presented at the NIPS workshop on Can Artificial Cerebellar Models Compete to Control Robots, Dec. 5, Breckenridge, CO

Back to ReachingGroup