velocityCtrl.h

Go to the documentation of this file.
00001 #ifndef VELOCITY_CTRL_H
00002 #define VELOCITY_CTRL_H
00003 
00013 //#include "robotParams.h"
00014 #include "velocityInfo.h"
00015 
00016 #ifndef MM_STABLE_SHIFT
00017 #define MM_STABLE_SHIFT 3
00018 #endif
00019 #ifndef DIV16_STABLE_SHIFT
00020 #define DIV16_STABLE_SHIFT 5
00021 #endif
00022 
00023 
00024 enum {
00025   // 制御が安定状態になったかどうか
00026   CONTROL_UNSTABLE = 0,
00027   CONTROL_STABLE = 1,
00028 };
00029 
00030 
00034 typedef struct {
00035   int ref_vel;
00036   int current_vel;
00037   int acc;
00038   int current_pos;
00039   int circle_r;
00040   int stable;
00041 } velocityCtrlInfo_t;
00042 
00043 
00044 //#include "cpp_extern_macro.h"
00045 BEGIN_C_DECLS;
00046 
00047 extern void initVelocityCtrlInfo(velocityCtrlInfo_t *velCtrl);
00048 extern void getFirstHoldVelocity(velocityCtrlInfo_t *velCtrl, int vel);
00049 extern int holdVelocityCtrl(velocityCtrlInfo_t *velCtrl);
00050 extern int holdPositionCtrl(velocityCtrlInfo_t *velCtrl, int stable_shift);
00051 extern int followLineCtrl(velocityCtrlInfo_t *velCtrl, int follow_r,
00052                           velocityInfo_t *velInfo, int run_crd_div16);
00053 extern int followCircleCtrl(velocityCtrlInfo_t *velCtrl, int follow_r,
00054                             int x, int y, velocityInfo_t *velInfo,
00055                             int run_crd_div16);
00056 
00057 END_C_DECLS;
00058 #endif /* !VELOCITY_CTRL_H */
00059 

Generated on Mon Apr 13 22:52:04 2009 by  doxygen 1.5.7.1