[ return ]

mknet.defs.pl




#
#  file: mknet.defs.pl
#

#
#     Copyright (C) 1995 Andrew H. Fagg (af0a@robotics.usc.edu)
#     
#     This program is free software; you can redistribute it and/or
#     modify it under the terms of the GNU General Public License
#     as published by the Free Software Foundation; either version 2
#     of the License, or any later version.
#     
#     This program is distributed in the hope that it will be useful,
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#     GNU General Public License for more details.
#     
#     You should have received a copy of the GNU General Public License
#     along with this program; if not, write to the Free Software
#     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#


##################################################################
# Debug options
#

$GENERAL_PARSE = 0x1;
$DETAILED_PARSE = 0x2;
$PIP_CONNECTION = 0x4;
$ADD_CONNECTION = 0x8;
$AIP_CONNECTION = 0x10;
$CONNECTION_FILTER = 0x20;
$CONNECTION_TRIG_F5 = 0x40;
$CONNECTION_F5_AIP = 0x80;
$CONNECTION_F5_F5 = 0x100;

##################################################################
#
#  Grasp defintions
#


@GRASP_TYPES = ("precision", "finger", "palm", "side");


@JOINTS = ("t0", "t1", "t2", "i0", "i1", "i2", "m0", "m1", "m2", 
	   "r0", "r1", "r2", "l0", "l1", "l2");

@PADS = ("t0", "s0", "i0", "i1", "i2", "m0", "m1", "m2", 
	   "r0", "r1", "r2", "l0", "l1", "l2");

@MCX_TYPES = ("p", "f", "if");

##################################################################
#
#   Object definitions
#

@SHAPES = ("cylinder", "sphere", "block");
$parm_size = 30;		# Must be identical to $gauss_size in parms.pl

$index = 0;
%shape = ();			# Description of different shapes in PIP
				# Cylinder
$shape{"parms", "cylinder"} = "width:length";
$shape{"index", "cylinder"} = $index;
++$index;
$shape{"pindex", "cylinder", "width"} = $index;
$index += $parm_size;
$shape{"pindex", "cylinder", "length"} = $index;
$index += $parm_size;

				# Sphere
$shape{"parms", "sphere"} = "width";
$shape{"index", "sphere"} = $index;
++$index;
$shape{"pindex", "sphere", "width"} = $index;
$index += $parm_size;

				# Block
$shape{"parms", "block"} = "width:length:depth";
$shape{"index", "block"} = $index;
++$index;
$shape{"pindex", "block", "width"} = $index;
$index += $parm_size;
$shape{"pindex", "block", "length"} = $index;
$index += $parm_size;
$shape{"pindex", "block", "depth"} = $index;
$index += $parm_size;

$shape{"num"} = $index;		# Total number of units in PIP

print "PIP units: $index\n";

##################################################################
#
#  Neural definitions

@LAYERS = ("AIP", "F5", "Mcx", "SI", "SII", "BG_PHASE", "BG_GRASP",
	"BG_F5_RECURRENT", "BG_AIP_RECURRENT", "F2");

@OTHER_SOURCES = ("PIP", "SMA", "TRIGGER", "CONSTANT", "TH_FINGER_POS",
	"TH_PAD_FORCES", "ABSTRACT", "A46", "F6", "IT");

@CONNECTORS = (
	"J_T0_pref", "J_T0_deg",
	"J_T1_pref", "J_T2_deg",
	"J_T2_pref", "J_T1_deg",
	"J_I0_pref", "J_I0_deg",
	"J_I1_pref", "J_I1_deg",
	"J_I2_pref", "J_I2_deg",
	"J_M0_pref", "J_M0_deg",
	"J_M1_pref", "J_M1_deg",
	"J_M2_pref", "J_M2_deg",
	"J_R0_pref", "J_R0_deg",
	"J_R1_pref", "J_R1_deg",
	"J_R2_pref", "J_R2_deg",
	"J_L0_pref", "J_L0_deg",
	"J_L1_pref", "J_L1_deg",
	"J_L2_pref", "J_L2_deg",
	"precision",	        # Must be the same as in GRASP_TYPES
	"finger",
	"palm",
	"side",
	"GRASP_APERTURE",
);


@F5_PHASES = ("set", "extension", "flexion", "hold", "release");
@F5_PHASE_INDEX = ();
$F5_PHASE_INDEX{"set"} = 0;
$F5_PHASE_INDEX{"extension"} = 1;
$F5_PHASE_INDEX{"flexion"} = 2;
$F5_PHASE_INDEX{"hold"} = 3;
$F5_PHASE_INDEX{"release"} = 4;


@AIP_PHASES = ("set", "early", "late");

@SII_TYPES = ("maximum extent", "contact", "release");


##################################################################
$JOINT_MAX = 100;
$JOINT_MIN = -10;

1;


[ return ]