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 has 7 joints. We number these joints in the following way:
Arm: 1 shoulder yaw 0 shoulder pitch 2 shoulder roll 3 elbow
Wrist: 6 roll 4 yaw 5 pitch
If you are confused, don't worry we are going to upload a schema soon ;).
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:
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.
The program reads the currents and the encoders from the arm and broadcast them to two ports called, respectively:
There is also a port called
which should (if not ask for help) be visible to everybody on the shared network. In this way you can get the encoder feedback while someone else is moving the robot.
Both ports send a vector of 7 doubles, degrees and electric currents respectively.
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
The kinematic parameters of the Arm can be approximated as follows:
upper arm length: 0.22 [m] forearm length: 0.16 [m]