DLR/HIT hand cartesian library

The hand cartesian library enables the DLR/HIT hand to:

  • Calculate current cartesian position of finger tips.
  • Calculate current forces at finger tips.
  • Run different types of controllers for each finger.
  • Close loop inverse kinematics controller.
  • Velocity inverse kinematics.

Installation instructions

  • Get the code from oid5 repository
  • Compile patched version of orocos-kdl
  • Compile yarp

Prerequisite: Run the DLR/HIT server

  • Run the server for the DLR/HIT hand in the computer where the hand is connected:
cd oid5/robots/kimp/hand/sahand_api
./sahand_yarp.py -n

Usage

  • Creating the hand object:
import hand as h
hand=h.Hand(handedness="left",sahand_number=1,portprefix="",sahand_port_name_prefix="/sahand")

Use the values adequate for your configuration. sahand_number indicates the port where the hand was connected to the PCI card. sahand_port_name_prefix indicates the prefix used by the DLR/HIT server. handedness is used for selecting the correct kinematic description. portprefix is used to add a prefix to the client port names.

  • Getting data from the hand:
hand.update_sensor_data()
first=hand.fingers[1]
print first.cur_joint_pos

This prints the current joint position of the finger. The finger class has a lot of more members that contain data or functions to calculate.

  • To get access to the kinematics members of the finger just look into fingerobject.kinematics.*
  • To get access to the controller members of the finger just look into fingerobject.controller.*
  • To control the hand. First select the controller for each finger that you want to use:
hand.set_controller(Finger_controller_sahand_joint_pos,finger_list=[1])

First argument is a controller class in this case Finger_controller_sahand_joint_pos is the controller that only relays information to the hand directly. There are other controllers like a close loop inverse kinematics one. The second argument is a list of fingers which will have this controller.

  • To command a finger to move to a joint position:
from numpy import pi
hand.set_refs(1,[0,10*pi/180,0])
hand.update_controller_refs()

Angles are in radians. Any other units are the standard metric scale (meters, seconds,Nm, etc) To know what the refs are, please take a look in the set_refs member in the selected controller class. The joint order is: first in the list corresponds to the first joint of the kinematic chain starting from the base of the chain.

  • One can also change the controller parameters in the same than the references using hand.set_params(finger,params_list) and then hand.update_controller_params()
 
projects/hand_cartesian.txt · Last modified: 2010/08/24 17:36 by memeruiz · [Old revisions]
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki