Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

robot/control/oldikor/IKOR/structures.h

Go to the documentation of this file.
00001 /* ________________________________________________________
00002   |                                                        |
00003   | Program Name:   structures.h                           |
00004   |________________________________________________________|
00005   |                                                        |
00006   | description: Contains data structures for system as    |
00007   |    well as a brief description of each. For more info  |
00008   |    try the user's manual.                              |
00009   |                                                        |
00010   | Structures: (order of appearance)                      |
00011   |    MATRIX                                              |
00012   |    ANGLE                                               |
00013   |    Platform                                            |
00014   |    Manipulator_struct                                  |
00015   |    Solutions                                           |
00016   |________________________________________________________| */
00017 #include <time.h>
00018 #include <stddef.h>
00019 
00020 /* MATRIX_struct is a structure for the matrixes used in the system */
00021 typedef struct 
00022 {
00023   float **p;    /* Pointer to array of pointers to matrix rows. */
00024   int   rows;   /* Row dimension of the matrix.                 */
00025   int   cols;   /* Column dimension of the matrix.              */
00026 } MATRIX;
00027 
00028 
00029 /* Angles is an array containing containing several instances*/
00030 /* of the following structure: limits, home, weight, etc...  */
00031 typedef struct {
00032   int   Prism;       /* ==Y then translates ==N then rotates */
00033   float Max_limit,   /* Max Limit for specific joint         */
00034         Min_limit,   /* Min Limit for specific joint         */
00035         Max_accel,   /* Max Limit for acceleration           */
00036         Min_accel,   /* Min Limit for acceleration           */
00037         Home;        /* Home position of joint               */
00038 } ANGLE;
00039 
00040 
00041 /* PLAT is an instance of the following structure which con- */
00042 /* tains information about a specific platform.              */
00043 typedef struct {
00044    int   Active,     /* Determines if Platform is active     */
00045          Exist,      /* Determines if Platform exists        */
00046          Holonomic;  /* ==Y Holonomic, ==N Automobile-like   */
00047    float Length,     /* Length of Platform                   */
00048          Width,      /* Width  of Platform                   */
00049          Thick,      /* Thickness of Platform                */
00050          Z_OFF,      /* offset of arm from platform Z        */
00051          L_OFF,      /* offset of arm from platform center   */
00052          ANG_OFF;    /* angle offset of first joint of Manip */
00053    MATRIX *Man_base; /* location of the base of manipulator  */
00054    MATRIX *Corner[4]; /* locations of the corners of platform */
00055 } Platform;
00056 
00057 /* Gripper is an example of this structure */
00058 typedef struct {
00059     MATRIX *Corner[4];   /* Points on end effector */
00060     float   Orient[3];   /* Orientation of end effector */
00061     float   Prev_pos[3]; /* Position of end effector at previous time step */
00062 } EndEffector;
00063 
00064 /* Robot is an instance of the following structure which con-*/
00065 /* tains information of the Manipulator.                     */
00066 typedef struct {
00067    int   NA,           /* Maximum number of Angles             */
00068          NL,           /* Number of Links in Manipulator       */
00069          NX,           /* set the workspace pos    dim (2->2d) */
00070          NO,           /* set the workspace orient dim (1->2d) */
00071          Orient;       /* Use orientation control              */
00072    double    *alpha,   /* D-H parameters */
00073              *theta,
00074              *dvals,
00075              *avals;
00076    MATRIX    *trans;    /* holds '1' or '0' if joint is active  */
00077                         /* inside a transformations             */
00078    ANGLE     *Angles;   /* see Angles_struct above.             */
00079    Platform   PLAT;     /* see Platform_struct above.           */
00080    MATRIX    *Weights;  /* How active the joint is 0<x<= 1      */
00081    MATRIX   **x_of_link;/* Holds locations of the links         */
00082    double    *LINKS;    /* length of the links of the robot     */
00083    EndEffector Gripper; /* location of points on end effector   */
00084 } Manipulator_struct; 
00085 
00086 /* FSP_data is an instance of the following structure type.  */
00087 /* It contains info vital to FSP and IKOR's integration.     */
00088 typedef struct {
00089     int   M, N,         /* (unused) may be used to replace globals */
00090           Mred,         /* number of columns in reduced Jacobian   */
00091           Nred,         /* number of rows    in reduced Jacobian   */
00092           cn,           /* number of constraints on system (betas) */
00093           Null_Space;   /* flag for detection of Null_Space Motion */
00094     MATRIX *g,          /* array of solution vectors               */
00095            *Qarray,     /* current angles positions ( in rad )     */
00096            *Impact,     /* location of end effector at impact      */
00097            *betall,     /* Contains All Betas (Beta all)           */
00098            *Xelim;      /* Contains strict values for reduced dq's */
00099 } Solutions;
00100 
00101 /* Old_dq[] is an example of the following structure type. */
00102 /* The size of this array is in general.h                  */
00103 typedef struct {
00104     double   time;       /* time at which calc finished */
00105     MATRIX  *DQ;         /* vector of joint steps */
00106     } History_Element;
00107 
00108 
00109 #define HIST_SIZE       5       /* must be at least 5 */
00110 typedef struct {
00111     int whereami;                  /* points to most recent event in history */
00112     History_Element dq[HIST_SIZE]; /* array of joint movements               */
00113     } History;
00114 
00115 

Generated on Thu Jul 29 15:56:35 2004 for OpenSim by doxygen 1.3.6