libmove3d
3.13.0
|
00001 /***************************************************/ 00002 /*DECLARATION PROVISOIRE DES STRUCTURES ANIMATIONS */ 00003 /***************************************************/ 00004 /*TYPE*/ 00005 00006 #define MAX_NOF_FRAMES 10000 00007 #define MAX_NOF_DOFS 100 00008 #define MAX_NOF_ANIM 10 00009 00010 #define MI_RZ 13 00011 #define MI_RY 14 00012 #define MI_RX 12 00013 #define MI_Z 8 00014 #define MI_Y 7 00015 #define MI_X 6 00016 #define MI_GRZ 11 00017 #define MI_GRY 10 00018 #define MI_GRX 9 00019 00020 #define FRAME_NOCOL -1 00021 #define FRAME_AUTOCOL -2 00022 #define FRAME_INVAL -3 00023 00024 typedef struct trajectory_characteristics { 00025 double AX, BX, AY, BY, AZ, BZ; 00026 double A, B, R, AngleDepart, AngleArrivee; 00027 } anim_traj_charac; 00028 00029 typedef struct animation { 00030 char name[255]; 00031 char type[255]; 00032 char when[255]; 00033 anim_traj_charac tcharac; 00034 p3d_rob * aim_robot; 00035 configPt * data; 00036 double ** fourier_real; 00037 double ** fourier_imag; 00038 double linear_speed; 00039 double rotation_speed; 00040 double length; 00041 int id; 00042 int nof_frames; 00043 int nof_coef; 00044 int index_theta; 00045 int framerate; 00046 char degree; 00047 char straight; 00048 char processed; 00049 char active; 00050 } p3d_animation; 00051 00052 typedef struct { 00053 int AnimationActive; 00054 int SpeedProfiledSampling; 00055 int InitPosRespect; 00056 int FinalPosRespect; 00057 int LinkLocalPath; 00058 int FourierNofCoefs; 00059 int FourierInitNofCoefs; 00060 int RespectSpeedProfile; 00061 int Extrapolation; 00062 int ArmController; 00063 int Reactif; 00064 double HumanApproxSpeed; 00065 double AccelerationLength; 00066 00067 int FramePerSecond; 00068 double MaximumLinearSpeed; 00069 double MaximumRotationSpeed; 00070 double MaximumAcceleration; 00071 double InfluenceDuration; 00072 int NofOptims; 00073 double ColBlockExtTime; 00074 int ColAvNofAttemps; 00075 int Optim1; 00076 int Optim2; 00077 double PosPlanParam; 00078 }AnimOptionsStruct; 00079 00080 AnimOptionsStruct AnimOptions; 00081 00082 typedef struct characteristics{ 00083 double * TotalDist; 00084 double * FrameDist; 00085 double * AnimRelSpeed; 00086 double * WalkRelSpeed; 00087 double * LinSpeed; 00088 double * RotSpeed; 00089 }p3d_localpath_characteristics; 00090 00091 #define NOFANIM 30 00092 #define FRAMERATE 60. 00093 #define HUMANAPPROXSPEED 1300. /* m/s */ 00094 00095 typedef struct bibliotheque { 00096 p3d_animation * animation[NOFANIM]; /* PROVISOIRE . ALLOCATION DYNAMIQUE NECESSAIRE */ 00097 int nof_animation; 00098 }p3d_animlib; 00099 00100 typedef struct frame_strip { 00101 struct frame_strip * next; 00102 int NumFrame; 00103 int NumChain; 00104 }p3d_frame_list; 00105 00106 typedef struct joint_strip { 00107 struct joint_strip * next; 00108 int NumJoint; 00109 p3d_jnt * Joint; 00110 }p3d_joint_list; 00111 00112 typedef struct AnimBuffer { 00113 configPt * AnimBuffer; 00114 int NofFrames; 00115 }anim_buffer; 00116 00117 typedef struct charac{ 00118 double TotalDist[MAX_NOF_FRAMES]; 00119 double FrameDist[MAX_NOF_FRAMES]; 00120 double AnimRelSpeed[MAX_NOF_FRAMES]; 00121 double WalkRelSpeed[MAX_NOF_FRAMES]; 00122 double LinSpeed[MAX_NOF_FRAMES]; 00123 double RotSpeed[MAX_NOF_FRAMES]; 00124 double Sens[MAX_NOF_FRAMES]; 00125 }Charac; 00126 00127 typedef struct SampleOptions { 00128 int EnableMaxAngularSpeed; 00129 int EnableMaxAcceleration; 00130 int FramePerSecond; 00131 double MaxAcceleration; 00132 double MaxAngularSpeed; 00133 double MaxLinearSpeed; 00134 }anim_sample_options; 00135 00136 typedef struct WalkOptions { 00137 int RespectEnd; 00138 int RespectInit; 00139 double RespectTime; 00140 int Filter; 00141 }anim_walk_controller_options; 00142 00143 typedef struct ColBlock{ 00144 int InitFrame; 00145 int EndFrame; 00146 int ColChain[100]; 00147 int NofChain; 00148 }anim_colblock; 00149 00150 typedef struct ColOptions { 00151 anim_colblock Blocks[50]; 00152 int NofBlocks; 00153 double ColBlockExtTime; 00154 int NofAttempts; 00155 }anim_reac_col_options; 00156 00157 typedef struct animprob { 00158 configPt Qi; 00159 configPt Qf; 00160 00161 p3d_rob * Robot; 00162 p3d_rob * RobotMin; 00163 00164 p3d_traj * FindTrajResult; 00165 00166 p3d_traj * OptimizedResult; 00167 00168 anim_sample_options SampleOptions; 00169 anim_buffer SamplingRes; 00170 00171 Charac CharacRes; 00172 char TrajCharacterized; 00173 00174 anim_walk_controller_options WalkOptions; 00175 anim_buffer WalkContRes; 00176 00177 anim_reac_col_options ColOptions; 00178 anim_buffer ColAvoidRes; 00179 anim_buffer ColOpt1Res; 00180 anim_buffer ColOpt2Res; 00181 anim_buffer PosPlanRes; 00182 double FrameDuration; 00183 p3d_graph * InitRRTGraph; 00184 p3d_graph * FinalRRTGraph; 00185 }AnimProb; 00186 00187 p3d_animlib XYZ_ANIM; 00188 00189 /***************************************************/ 00190 /***************************************************/