Difference between revisions of "Arm Control"

From Wiki for iCub and Friends
Jump to: navigation, search
(Kinematic Parameters)
Line 47: Line 47:
  
 
   upper arm length: 0.22 [m]
 
   upper arm length: 0.22 [m]
   forearm lenght:  0.16 [m]
+
   forearm length:  0.16 [m]

Revision as of 13:25, 25 July 2006

Arm control should be coming online today. This page is a start at documenting your interface to it. To control the robot you have to physically connect your laptop computer to the robot network (James). The procedure to connect your laptop to the robot is similar to the one we described for iCub (New_ports_on_iCub).

The arm

The arm has 7 joints. We number those joints based on distance from the body. Joint number 0 is closest to the body, in the shoulder, and joint 6 is furthest from the body, at the wrist (shoulder yaw, shoulder pitch, shoulder roll, elbow, wrist pitch, wrist yaw, wrist roll).

You will have limited control of these joints. We are enforcing fairly conservative limits on the joint ranges in order to avoid unfortunate accidents.

The arm starts in the configuration:

  [0, 40, 0, -10, 0, 0, 0]

and is limited within the range:

  MAX: [0, 80, 90, -10, 10, 70, 30]
  MIN: [-120, 40, 0, -90, -100, 0, -70]

Commands that are not within these ranges are automatically thresholded to fit the limits.

Commands to the arm

You can command the arm with a Bottle or Vector of 7 doubles. These numbers should be angles (in degrees) relative to a rest position. The first number controls the joint closest to the body, the last number controls the joint closest to the hand.

The arm controller listens for commands on a port called:

  /james/armcontrol/i

The arm takes some time to execute a command. During this time new commands issued to the controlled are discarded (not queued). So in principle you can send commands to the arm at a high rate; in practice try to be "nice" to the controller and wait some time between two consecutive commands.

Arm feedback

The program reads the currents and the encoders from the arm and broadcast them to two ports called, respectively:

  /james/armcontrol/encoders
  /james/armcontrol/currents

Both ports send a vector of 7 doubles, degrees and electric currents respectively.

Example

In the following example we use 'yarp write' to move the arm to four different positions:

  E:\dev\iCub\bin>yarp write /dummywriter /james/armcontrol/i
  Port /dummywriter listening at tcp://192.168.0.100:10072
  yarp: Sending output from /dummywriter to /james/armcontrol/i using tcp
  0.0 80.0 0.0 0.0 0.0 0.0 0.0
  0.0 80.0 0.0 -90.0 0.0 0.0 0.0
  0.0 0.0 0.0 -90.0 0.0 0.0 0.0
  -90.0 0.0 0.0 -90.0 0.0 0.0 0.0

Kinematic Parameters

The kinematic parameters of the Arm can be approximated as follows:

  upper arm length: 0.22 [m]
  forearm length:   0.16 [m]