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

robot/control/oldikor/IKOR/general.h

Go to the documentation of this file.
00001 /* ________________________________________________________
00002   |                                                        |
00003   | Program Name:   general.h                              |
00004   |________________________________________________________|
00005   |                                                        |
00006   | description:  Contains defines that are used by many   |
00007   |     of the modules in the IKOR system.  Every file that|
00008   |     gets compiled seperately must contain this file    |
00009   |     for adequate linkage to external variables.        |
00010   |________________________________________________________| */
00011 
00012 
00013 #ifndef _GENERAL_H
00014 #define _GENERAL_H
00015 
00016 /*#define DEBUG_OUT      ** uncomment this line when DEBUGGING    **/
00017 /*#define FSP_DEBUG      ** Makes FSP run on Jacob,dx in FSP_data **/
00018 /** The MACRO DEBUG was removed, use the commandline to see output **/
00019 #define DEBUG 1
00020 
00021 #include <math.h>
00022 #include <stdio.h>
00023 #include <IKOR/structures.h>
00024 
00025 /*****************************************************************
00026  *                                                               *
00027  *                      Global External References               *
00028  *                                                               *
00029  *****************************************************************/
00030 extern FILE *datafp, *FLWfile, *dqfile, *distfp;
00031 
00032 extern char *PoorMansFile,      /** Globals.h **/
00033              Method[5][30],     /** Globals.h **/
00034              dxLabel[6][30],    /** Globals.h **/
00035              ARM_file[15];      /** Globals.h **/
00036                                 /** Globals.h **/
00037 extern MATRIX   **all_links, *RW, *XW,
00038                 *PW1, *PW2, *PW3, *PW4,
00039                 *EW1, *EW2, *EW3, *EW4;
00040 
00041 extern int N, M,                  /** Globals.h  **/
00042            STEP,           /** Globals.h  **/
00043            CHANGE_SPHERES;        /** Globals.h  **/
00044 extern Manipulator_struct *Robot; /** Globals.h  **/
00045 extern double *LL;                /** Globals.h  **/
00046 /*****************************************************************
00047  *                                                               *
00048  *                      Macro Definitions                        *
00049  *                                                               *
00050  *****************************************************************/
00051 
00052 #define SPAN            (FSP_data->g->rows)
00053 #define SPAN2           (FSP_data->g->rows - NumSpg)
00054 #define SQUARE(a)       ((a)*(a));
00055 #define rad(x)          ((x)*PI/180) /*Convert to Radians*/
00056 #define deg(x)          ((x)*180/PI) /*Convert to Degrees*/
00057 #define SWAP(a,b)       {double temp; temp=a;a=b;b=temp;}
00058 #define MAX(a,b)        ((a) > (b) ? (a) : (b))
00059 #define SIGN(a,b)       ((b) >= 0.0 ? fabs(a) : -fabs(a))
00060 #define PYTHAG(a,b)     ((at=fabs(a)) > (bt=fabs(b)) ? \
00061 (ct=bt/at,at*sqrt(1.0+ct*ct)) : (bt ? (ct=at/bt,bt*sqrt(1.0+ct*ct)): 0.0))
00062 
00063 
00064 #define SPEED            .3             /* Flow Defines */
00065 #define MAX_PTS      5000               /* Sets Maximum Points in Trajectory  */
00066 #define BIG       5.0e-02               /* user-defined value for IKOR        */
00067 #define SMALL     5.0e-05               /* user-defined value for FSP & IKOR  */
00068 #define K2_BND    1.0e+01               /* user-defined value for FSP         */
00069 #define ZERO            0.0             /* General Defines */
00070 #define PI              3.14159265
00071 #define TRUE            1
00072 #define FALSE           0
00073 #define LAGRANGIAN      1               /* Optimization Defines */
00074 #define BANGBANG        2
00075 #define SIMPLEX         3
00076 #define ZEROD_OMEGAS    2               /* Constant Orientation Define */
00077 #define FATAL           0               /* IKerror Defines */
00078 #define OK              1
00079 #define ONE             1               /* STEP Defines */
00080 #define TWO             2
00081 #define JN_LIMITS       0               /* Constraint Defines */
00082 #define OBSTACLES       1
00083 #define ACCELRATN       2
00084 #define EE_IMPACT       3
00085 #define COMPLETE        2               /* Solution Generator Return Defines */
00086 #define NOT_COMPLETE   -1
00087 #define RESTRICTED     -2
00088 
00089 /*******************************************************************
00090  *                                                                 *
00091  *                      FUNCTION PROTOTYPES                        *
00092  *  function prototypes for every function should be in headers.h) *
00093  *                                                                 *
00094  *******************************************************************/
00095 #include <IKOR/headers.h>
00096 #include <UTILS/nrutil.h>
00097 #include <UTILS/matrix.h>
00098 
00099 #endif      /* end !_GENERAL_H */

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