00001 /* 00002 * ART steering self-test 00003 * 00004 * Copyright (C) 2008 Austin Robot Technology 00005 * 00006 * License: Modified BSD Software License Agreement 00007 * 00008 * $Id: testwheel.h 1161 2011-03-26 02:10:49Z jack.oquin $ 00009 */ 00010 00011 00038 #ifndef _TESTWHEEL_H_ 00039 #define _TESTWHEEL_H_ 00040 00041 class devsteer; 00042 class DriverTimer; 00043 00044 class testwheel 00045 { 00046 public: 00047 00048 testwheel(const boost::shared_ptr<devsteer> &_dev); 00049 ~testwheel(); 00050 00051 int Configure(); 00052 int Run(float steering_angle); 00053 00054 // configuration options 00055 00056 private: 00057 00058 typedef enum 00059 { 00060 Begin, // begin wheel test 00061 Move, // turn wheel to test position 00062 Back, // turn wheel back 00063 Done // test completed 00064 } state_t; 00065 00066 state_t state; // current state of test 00067 boost::shared_ptr<devsteer> dev; 00068 boost::shared_ptr<DriverTimer> timer; 00069 00070 // configuration options 00071 bool test_wheel; 00072 double test_angle; 00073 double timeout; 00074 double tolerance; 00075 00076 float start_angle; 00077 float target_angle; 00078 }; 00079 00080 #endif // _TESTWHEEL_H_