[ return ]

hand.h




/*
 * file : hand.h
 *
 * [DEFINE DESCRIPTION = Hand dynamics simulation]
 *
 *  Name                Date        Description
 *  --------------      --------    -------------------------------------
 *  Andrew H. Fagg      09/05/94    Original
 *
 *
 *
 */

#define HAND_JOINTS 15		/* Controllable degrees of freedom */
#define J_T0 0
#define J_T1 1
#define J_T2 2
#define J_I0 3
#define J_I1 4
#define J_I2 5
#define J_M0 6
#define J_M1 7
#define J_M2 8
#define J_R0 9
#define J_R1 10
#define J_R2 11
#define J_L0 12
#define J_L1 13
#define J_L2 14



#define OBJECT_PARMS_SIZE 6
#define OBJECT_CROSS_SHAPE 0
#define OBJECT_W0 1		/* Thumb width */
#define OBJECT_W1 2		/* Index finger width */
#define OBJECT_W2 3		/* Middle finger width */
#define OBJECT_W3 4		/* Ring finger width */
#define OBJECT_W4 5		/* Little finger width+ */

#define OBJECT_CS_ROUND 0	/* Cross section shape */
#define OBJECT_CS_CUBE  1
#define OBJECT_CS_FLAT  2

                                /* Note this must be consistent */
				/*  with mknet.defs.pl */
				/*  (both order and number)  */
#define PAD_FORCES_SIZE 14
#define PAD_T0 0
#define PAD_S0 1
#define PAD_I0 2
#define PAD_I1 3
#define PAD_I2 4
#define PAD_M0 5
#define PAD_M1 6
#define PAD_M2 7
#define PAD_R0 8
#define PAD_R1 9
#define PAD_R2 10
#define PAD_L0 11
#define PAD_L1 12
#define PAD_L2 13


//#define PAD_FORCES_SIZE 51

//#define TH_START 0
//#define TH_LEN 1
//#define IN_SIDE_START 1
//#define IN_SIDE_LEN 10
//#define IN_START 11
//#define IN_LEN 10
//#define MD_START 21
//#define MD_LEN 10
//#define RG_START 31
//#define RG_LEN 10
//#define LI_START 41
//#define LI_LEN 10
//#define FINGER_LEN 10		/* Note some code assumes all fingers */
//				/*   have the same length of force pads. */

#define HAND_DISPLAY_X 20
#define HAND_DISPLAY_Y 20


extern void hand_dynamics(nsl_vector&, nsl_vector&,        //OVERLOAD CALL: hand_dynamics: hand.c(?), hand.orig.c(?)
			  nsl_vector&,
			  nsl_vector&, 
			  nsl_data&, nsl_data&,
			  nsl_vector&, nsl_vector&, nsl_vector&,
			  nsl_vector&, nsl_data&,
			  nsl_data&, nsl_data&,
			  nsl_vector&);

extern void compute_hand_display(nsl_vector&, nsl_matrix&, nsl_vector&);        //OVERLOAD CALL: compute_hand_display: hand.c(?), hand.orig.c(?)


/**********************************************************************/
				/* Distributed encoding of hand position. */

#define POS_PAD 1
#define POS_STD 0.1


[ return ]