Homepage Demos Overview Downloads Tutorials Reference
Credits
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Search

ERS210Info.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_ERS210Info_h
00003 #define INCLUDED_ERS210Info_h
00004 
00005 #include <math.h>
00006 #ifndef PLATFORM_APERIOS
00007 typedef unsigned short word; //!< otherwise defined in Types.h
00008 #else
00009 #include <Types.h>
00010 #endif
00011 
00012 #if TGT_ERS2xx
00013 #include "ERS2xxInfo.h"
00014 #endif
00015 
00016 //! Contains information about the ERS-210 Robot, such as number of joints, PID defaults, timing information, etc.
00017 namespace ERS210Info {
00018 
00019 #if TGT_ERS2xx
00020   using namespace ERS2xxInfo;
00021 #else
00022   // *******************************
00023   //       ROBOT CONFIGURATION
00024   // *******************************
00025 
00026 
00027   const unsigned int FrameTime=8;        //!< time between frames in the motion system (milliseconds)
00028   const unsigned int NumFrames=4;        //!< the number of frames per buffer (don't forget also double buffered)
00029   const unsigned int SlowFrameTime=128;  //!< time between frames for the ears (which move slower for some reason, don't want to mix with other outputs) (milliseconds)
00030   const unsigned int NumSlowFrames=1;    //!< the number of frames per buffer being sent to ears (double buffered as well)
00031   const unsigned int SoundBufferTime=32; //!< the number of milliseconds per sound buffer... I'm not sure if this can be changed
00032   
00033   //!Corresponds to entries in PrimitiveName, defined at the end of this file, these are the primary grouping
00034   /*!Right now all binary joints are slow, but perhaps this won't always be the case... hence the IsFast/Slow bitmasks to select which type, in order to be more general */
00035   //!@name Output Types Information
00036   const unsigned NumPIDJoints   = 18; //!< The number of joints which use PID motion - everything except ears
00037   const unsigned NumLEDs        =  9; //!< The number LEDs which can be controlled
00038   const unsigned NumBinJoints   =  2; //!< The number of binary joints - just the ears
00039   const unsigned NumOutputs     = NumPIDJoints + NumBinJoints + NumLEDs; //!< the total number of outputs
00040 
00041   const bool IsFastOutput[NumOutputs] = { true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,false }; //!< true for joints which can be updated every 32 ms (all but the ears)
00042   //! we need this so you can tell programmatically which joints are "real" and which are "fake" in compatability mode
00043   const bool IsRealERS210[NumOutputs] = { true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true };
00044   //@}
00045 
00046   const unsigned JointsPerLeg   =  3; //!< The number of joints per leg
00047   const unsigned NumLegs        =  4; //!< The number of legs
00048   const unsigned NumLegJoints   =  JointsPerLeg*NumLegs; //!< the TOTAL number of joints on ALL legs
00049   const unsigned NumHeadJoints  =  3; //!< The number of joints in the neck
00050   const unsigned NumTailJoints  =  2; //!< The number of joints assigned to the tail
00051   const unsigned NumMouthJoints =  1; //!< the number of joints that control the mouth
00052   const unsigned NumEarJoints   =  2; //!< The number of joints which control the ears (NOT per ear, is total)
00053   const unsigned NumButtons     =  8; //!< the number of buttons that are available, see ButtonOffset_t
00054   const unsigned NumSensors     =  1+3+1+5;  //!< 1 dist, 3 accel, 1 thermo, 5 from power, see SensorOffset_t
00055   
00056 
00057   // *******************************
00058   //         OUTPUT OFFSETS
00059   // *******************************
00060 
00061 
00062   //!Corresponds to entries in PrimitiveName, defined at the end of this file
00063   //!@name Output Offsets
00064 
00065   const unsigned PIDJointOffset = 0; //!< The beginning of the PID Joints
00066   const unsigned LegOffset   = PIDJointOffset;           //!< the offset of the beginning of the leg joints
00067   const unsigned HeadOffset  = LegOffset+NumLegJoints;   //!< the offset of the beginning of the head joints
00068   const unsigned TailOffset  = HeadOffset+NumHeadJoints; //!< the offset of the beginning of the tail joints
00069   const unsigned MouthOffset = TailOffset+NumTailJoints; //!< the offset of the beginning of the mouth joint
00070 
00071   const unsigned LEDOffset   = PIDJointOffset + NumPIDJoints; //!< the offset of LEDs in WorldState::outputs and MotionCommand functions
00072 
00073   const unsigned BinJointOffset = LEDOffset + NumLEDs; //!< The beginning of the binary joints
00074   const unsigned EarOffset   = BinJointOffset;           //!< the offset of the beginning of the ear joints - note that ears aren't sensed.  They can be flicked by the environment and you won't know.  Nor will they be flicked back
00075   //@}
00076   
00077   //! the ordering of legs
00078   enum LegOrder_t {
00079     LFrLegOrder = 0, //!< left front leg
00080     RFrLegOrder,     //!< right front leg
00081     LBkLegOrder,     //!< left back leg
00082     RBkLegOrder      //!< right back leg
00083   };
00084   
00085   //! The offsets of the individual legs
00086   enum LegOffset_t {
00087     LFrLegOffset = LegOffset+LFrLegOrder*JointsPerLeg, //!< beginning of left front leg
00088     RFrLegOffset = LegOffset+RFrLegOrder*JointsPerLeg, //!< beginning of right front leg
00089     LBkLegOffset = LegOffset+LBkLegOrder*JointsPerLeg, //!< beginning of left back leg
00090     RBkLegOffset = LegOffset+RBkLegOrder*JointsPerLeg  //!< beginning of right back leg
00091   };
00092   
00093   //! The offsets within appendages (the legs)  Note that the ordering matches the actual physical ordering of joints on the appendage (and not that of the head's TPROffset_t's)
00094   enum REKOffset_t {
00095     RotatorOffset=0, //!< moves leg forward or backward along body
00096     ElevatorOffset,  //!< moves leg toward or away from body
00097     KneeOffset       //!< moves knee
00098   };
00099   
00100   //! The offsets of appendages with tilt (elevation), pan (heading), and roll joints (i.e. head)  Note that the ordering matches the actual physical ordering of joints on the appendage (and not that of the leg's REKOffset_t's)
00101   enum TPROffset_t {
00102     TiltOffset = 0, //!< tilt/elevation (vertical)
00103     PanOffset,      //!< pan/heading (horizontal)
00104     RollOffset      //!< roll (rotational)
00105   };
00106   
00107   //! The offsets of the individual LEDs on the head and tail.  Note that L/R are robot's POV.  See also LEDBitMask_t
00108   enum LEDOffset_t {
00109     BotLLEDOffset = LEDOffset,//!< bottom left (red - sad)
00110     BotRLEDOffset, //!< bottom right (red - sad)
00111     MidLLEDOffset, //!< middle left (green - happy)
00112     MidRLEDOffset, //!< middle right (green - happy)
00113     TopLLEDOffset, //!< top left (red - angry)
00114     TopRLEDOffset, //!< top right (red - angry)
00115     TopBrLEDOffset,//!< top bar (green)
00116     TlRedLEDOffset,//!< red tail light
00117     TlBluLEDOffset, //!< blue tail light
00118  
00119     // alias for 220 cross-compatibility
00120     FaceFrontLeftLEDOffset = BotLLEDOffset,   //!< alias for 220 cross-compatibility
00121     FaceFrontRightLEDOffset = BotRLEDOffset,  //!< alias for 220 cross-compatibility
00122     FaceCenterLeftLEDOffset = MidLLEDOffset,  //!< alias for 220 cross-compatibility
00123     FaceCenterRightLEDOffset = MidRLEDOffset, //!< alias for 220 cross-compatibility
00124     FaceBackLeftLEDOffset = TopLLEDOffset,    //!< alias for 220 cross-compatibility
00125     FaceBackRightLEDOffset = TopRLEDOffset,   //!< alias for 220 cross-compatibility
00126     ModeLEDOffset = TopBrLEDOffset,           //!< alias for 220 cross-compatibility
00127     TailRightLEDOffset = TlRedLEDOffset,      //!< alias for 220 cross-compatibility
00128     TailLeftLEDOffset = TlBluLEDOffset        //!< alias for 220 cross-compatibility
00129   };
00130   
00131   //! Bitmasks for use when specifying combinations of LEDs (see LEDEngine ) Note that L/R are robot's POV
00132   //!@name LED Bitmasks
00133   typedef unsigned int LEDBitMask_t; //!< So you can be clear when you're refering to a LED bitmask
00134   const LEDBitMask_t BotLLEDMask = 1<<(BotLLEDOffset-LEDOffset); //!< bottom left (red - sad)
00135   const LEDBitMask_t BotRLEDMask = 1<<(BotRLEDOffset-LEDOffset); //!< bottom right (red - sad)
00136   const LEDBitMask_t MidLLEDMask = 1<<(MidLLEDOffset-LEDOffset); //!< middle left (green - happy)
00137   const LEDBitMask_t MidRLEDMask = 1<<(MidRLEDOffset-LEDOffset); //!< middle right (green - happy)
00138   const LEDBitMask_t TopLLEDMask = 1<<(TopLLEDOffset-LEDOffset); //!< top left (red - angry)
00139   const LEDBitMask_t TopRLEDMask = 1<<(TopRLEDOffset-LEDOffset); //!< top right (red - angry)
00140   const LEDBitMask_t TopBrLEDMask= 1<<(TopBrLEDOffset-LEDOffset); //!< top bar (green)
00141   const LEDBitMask_t TlRedLEDMask= 1<<(TlRedLEDOffset-LEDOffset); //!< red tail light
00142   const LEDBitMask_t TlBluLEDMask= 1<<(TlBluLEDOffset-LEDOffset); //!< blue tail light
00143 
00144   const LEDBitMask_t FaceLEDMask = BotLLEDMask|BotRLEDMask|MidLLEDMask|MidRLEDMask|TopLLEDMask|TopRLEDMask|TopBrLEDMask; //!< LEDs for face (all but tail)
00145   const LEDBitMask_t HeadLEDMask = BotLLEDMask|BotRLEDMask|MidLLEDMask|MidRLEDMask|TopLLEDMask|TopRLEDMask|TopBrLEDMask; //!< LEDs for face (all but tail)
00146   const LEDBitMask_t BackLEDMask = 0; //!< 210 has no back LEDs
00147   const LEDBitMask_t TailLEDMask = TlRedLEDMask|TlBluLEDMask; //!< LEDs on tail
00148   const LEDBitMask_t AllLEDMask  = ~0; //!< selects all of the leds
00149   //@}
00150 
00151 
00152   // *******************************
00153   //          INPUT OFFSETS
00154   // *******************************
00155 
00156 
00157   //! The order in which inputs should be stored
00158   //!@name Input Offsets
00159 
00160   //! holds offsets to different buttons in WorldState::buttons[]
00161   /*! Should be a straight mapping to the ButtonSourceIDs
00162    *
00163    *  Note that the chest (power) button is not a normal button.  It kills
00164    *  power to the motors at a hardware level, and isn't sensed in the
00165    *  normal way.  If you want to know when it is pressed (and you are
00166    *  about to shut down) see PowerSourceID::PauseSID.
00167    *
00168    *  @see WorldState::buttons @see ButtonSourceID_t */
00169   enum ButtonOffset_t {
00170     LFrPawOffset = LFrLegOrder,
00171     RFrPawOffset = RFrLegOrder,
00172     LBkPawOffset = LBkLegOrder,
00173     RBkPawOffset = RBkLegOrder,
00174     ChinButOffset= 4,
00175     BackButOffset,
00176     HeadFrButOffset, //!< not in reliable pressure units, but 1.0 is fairly stiff pressure, 0 is none
00177     HeadBkButOffset //!< not in reliable pressure units, but 1.0 is fairly stiff pressure, 0 is none
00178   };
00179 
00180   //! holds offset to different sensor values in WorldState::sensors[]
00181   /*! @see WorldState::sensors[] */
00182   enum SensorOffset_t {
00183     IRDistOffset = 0,  //!< in millimeters
00184     BAccelOffset, //!< backward acceleration, in @f$m/s^2@f$, negative if sitting on butt (positive for faceplant)
00185     LAccelOffset, //!< acceleration to the robot's left, in @f$m/s^2@f$, negative if lying on robot's left side
00186     DAccelOffset, //!< downward acceleration, in @f$m/s^2@f$, negative if standing up... be careful about the signs on all of these...
00187     ThermoOffset, //!< in degrees Celcius
00188     PowerRemainOffset, //!< percentage, 0-1
00189     PowerThermoOffset, //!<  degrees Celcius
00190     PowerCapacityOffset, //!< milli-amp hours
00191     PowerVoltageOffset, //!< volts
00192     PowerCurrentOffset //!< milli-amp negative values (maybe positive while charging?)
00193   };
00194 
00195   //@}
00196 
00197 
00198   //! The length of the strings used for each of the outputs in outputNames (doesn't include null term)
00199   const unsigned outputNameLen = 9;
00200   //! A name of uniform length for referring to joints - handy for posture files, etc.
00201   const char* const outputNames[NumOutputs] = {
00202     "LFr:rotor",
00203     "LFr:elvtr",
00204     "LFr:knee~",
00205     "RFr:rotor",
00206     "RFr:elvtr",
00207     "RFr:knee~",
00208     "LBk:rotor",
00209     "LBk:elvtr",
00210     "LBk:knee~",
00211     "RBk:rotor",
00212     "RBk:elvtr",
00213     "RBk:knee~",
00214     
00215     "NECK:tilt",
00216     "NECK:pan~",
00217     "NECK:roll",
00218     
00219     "TAIL:tilt",
00220     "TAIL:pan~",
00221     
00222     "MOUTH~~~~",
00223     
00224     "LED:botL~",
00225     "LED:botR~",
00226     "LED:midL~",
00227     "LED:midR~",
00228     "LED:topL~",
00229     "LED:topR~",
00230     "LED:topBr",
00231     
00232     "LED:tlRed",
00233     "LED:tlBlu",
00234     
00235     "EAR:left~",
00236     "EAR:right"
00237   };
00238   
00239 
00240   //! the joint identifier strings used to refer to specific joints in OPEN-R (but not needed for others)
00241   /*!@showinitializer 
00242    * @warning IMPORTANT!!!!  DO NOT CHANGE THE ORDER OF ITEMS IN THIS TABLE!!!\n
00243    *
00244    * The offset consts defined in this file correspond to this table and will make life easier
00245    * if you feel the need to reorder things, but they aren't used perfect @e everywhere \n
00246    * In particular, assumptions are made that the pid joints will be in slots 0-numPIDJoints
00247    * and that the fast outputs (ie NOT ears) will be in slots 0-NumFastOutputs\n
00248    * There may be other assumptions not noted here!!!
00249    * @note These entries DON'T correspond to the CPC index numbers defined in WorldState (this only lists joints, and in a different order defined by OPEN-R, that one has sensors as well*/
00250   const char* const PrimitiveName [NumOutputs] = {
00251     "PRM:/r2/c1-Joint2:j1",       //!< the left front leg   the rotator
00252     "PRM:/r2/c1/c2-Joint2:j2",    //!< the left front leg   the elevator 
00253     "PRM:/r2/c1/c2/c3-Joint2:j3", //!< the left front leg   the knee 
00254     "PRM:/r4/c1-Joint2:j1",       //!< the right front leg   the rotator
00255     "PRM:/r4/c1/c2-Joint2:j2",    //!< the right front leg    the elevator 
00256     "PRM:/r4/c1/c2/c3-Joint2:j3", //!< the right front leg   the knee 
00257     
00258     "PRM:/r3/c1-Joint2:j1",       //!< the left hind leg   the rotator
00259     "PRM:/r3/c1/c2-Joint2:j2",    //!< the left hind leg   the elevator 
00260     "PRM:/r3/c1/c2/c3-Joint2:j3", //!< the left hind leg   the knee
00261     "PRM:/r5/c1-Joint2:j1",       //!< the right hind leg   the rotator
00262     "PRM:/r5/c1/c2-Joint2:j2",    //!< the right hind leg   the elevator 
00263     "PRM:/r5/c1/c2/c3-Joint2:j3", //!< the right hind leg   the knee 
00264 
00265     "PRM:/r1/c1-Joint2:j1",       //!< the neck  tilt (12)
00266     "PRM:/r1/c1/c2-Joint2:j2",    //!< the neck   pan 
00267     "PRM:/r1/c1/c2/c3-Joint2:j3", //!< the neck   roll 
00268     
00269     "PRM:/r6/c2-Joint2:j2",       //!< the tail tilt (15)       // *** NOTE ***
00270     "PRM:/r6/c1-Joint2:j1",       //!< the tail pan             // CHANGE_ET 12/16/01 matches neck order
00271     
00272     "PRM:/r1/c1/c2/c3/c4-Joint2:j4", //!< the mouth (17)
00273     
00274     "PRM:/r1/c1/c2/c3/l1-LED2:l1", //!< lower  left  LED (18)
00275     "PRM:/r1/c1/c2/c3/l4-LED2:l4", //!< lower  right LED
00276     "PRM:/r1/c1/c2/c3/l2-LED2:l2", //!< middle left  LED
00277     "PRM:/r1/c1/c2/c3/l5-LED2:l5", //!< middle right LED
00278     "PRM:/r1/c1/c2/c3/l3-LED2:l3", //!< upper  left  LED
00279     "PRM:/r1/c1/c2/c3/l6-LED2:l6", //!< upper  right LED
00280     "PRM:/r1/c1/c2/c3/l7-LED2:l7", //!< top          LED
00281     
00282     "PRM:/r6/l2-LED2:l2", //!< tail red  LED
00283     "PRM:/r6/l1-LED2:l1", //!< tail blue LED
00284     
00285     "PRM:/r1/c1/c2/c3/e1-Joint3:j5", //!< left ear (27)
00286     "PRM:/r1/c1/c2/c3/e2-Joint3:j6" //!< right ear
00287   };
00288 
00289   //Old PID table:
00290   /*const word Pid[NumPIDJoints][6] = {
00291     { 0x16, 0x04, 0x08, 0x0E, 0x02, 0x0F },
00292     { 0x14, 0x04, 0x06, 0x0E, 0x02, 0x0F },
00293     { 0x23, 0x04, 0x05, 0x0E, 0x02, 0x0F },
00294     { 0x16, 0x04, 0x08, 0x0E, 0x02, 0x0F },
00295     { 0x14, 0x04, 0x06, 0x0E, 0x02, 0x0F },
00296     { 0x23, 0x04, 0x05, 0x0E, 0x02, 0x0F },
00297     { 0x16, 0x04, 0x08, 0x0E, 0x02, 0x0F },
00298     { 0x14, 0x04, 0x06, 0x0E, 0x02, 0x0F },
00299     { 0x23, 0x04, 0x05, 0x0E, 0x02, 0x0F },
00300     { 0x16, 0x04, 0x08, 0x0E, 0x02, 0x0F },
00301     { 0x14, 0x04, 0x06, 0x0E, 0x02, 0x0F },
00302     { 0x23, 0x04, 0x05, 0x0E, 0x02, 0x0F },
00303     
00304     { 0x0A, 0x08, 0x0C, 0x0E, 0x02, 0x0F },
00305     { 0x0D, 0x08, 0x0B, 0x0E, 0x02, 0x0F },
00306     { 0x10, 0x08, 0x0C, 0x0E, 0x02, 0x0F }, // P was 0x0C, updated as seen on https://www.openr.org/page1_2001/gain.html 8/13/2002
00307     
00308     { 0x0A, 0x00, 0x18, 0x0E, 0x02, 0x0F },
00309     { 0x07, 0x00, 0x11, 0x0E, 0x02, 0x0F },
00310     
00311     { 0x0E, 0x08, 0x10, 0x0E, 0x02, 0x0F }, //  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
00312   };*/
00313 
00314   //! This table holds the default PID values for each joint.  @see PIDMC
00315   const float DefaultPIDs[NumPIDJoints][3] =
00316     {
00317       { 0x16/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x08/(double)(1<<(16-0xF)) },
00318       { 0x14/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x06/(double)(1<<(16-0xF)) },
00319       { 0x23/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x05/(double)(1<<(16-0xF)) },
00320       { 0x16/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x08/(double)(1<<(16-0xF)) },
00321       { 0x14/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x06/(double)(1<<(16-0xF)) },
00322       { 0x23/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x05/(double)(1<<(16-0xF)) },
00323       { 0x16/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x08/(double)(1<<(16-0xF)) },
00324       { 0x14/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x06/(double)(1<<(16-0xF)) },
00325       { 0x23/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x05/(double)(1<<(16-0xF)) },
00326       { 0x16/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x08/(double)(1<<(16-0xF)) },
00327       { 0x14/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x06/(double)(1<<(16-0xF)) },
00328       { 0x23/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x05/(double)(1<<(16-0xF)) },
00329 
00330       { 0x0A/(double)(1<<(16-0xE)), 0x08/(double)(1<<(16-0x2)), 0x0C/(double)(1<<(16-0xF)) },
00331       { 0x0D/(double)(1<<(16-0xE)), 0x08/(double)(1<<(16-0x2)), 0x0B/(double)(1<<(16-0xF)) },
00332       { 0x0A/(double)(1<<(16-0xE)), 0x08/(double)(1<<(16-0x2)), 0x0C/(double)(1<<(16-0xF)) },
00333 
00334       { 0x0A/(double)(1<<(16-0xE)), 0x00/(double)(1<<(16-0x2)), 0x18/(double)(1<<(16-0xF)) },
00335       { 0x07/(double)(1<<(16-0xE)), 0x00/(double)(1<<(16-0x2)), 0x11/(double)(1<<(16-0xF)) },
00336 
00337       { 0x0E/(double)(1<<(16-0xE)), 0x08/(double)(1<<(16-0x2)), 0x10/(double)(1<<(16-0xF)) }
00338     };
00339     
00340   //!These values are Sony's recommended maximum joint velocities, in rad/ms
00341   /*! a value <= 0 means infinite speed (e.g. LEDs) */
00342   const float MaxOutputSpeed[NumOutputs] = {
00343     2.8143434e-03,     //Legs LR,FB,REK
00344     2.4980025e-03,
00345     2.8361600e-03,
00346     2.8143434e-03,
00347     2.4980025e-03,
00348     2.8361600e-03,
00349     2.8143434e-03,
00350     2.4980025e-03,
00351     2.8361600e-03,
00352     2.8143434e-03,
00353     2.4980025e-03,
00354     2.8361600e-03,
00355   
00356     2.1053034e-03,     //Head TPR
00357     3.0106930e-03,
00358     3.0106930e-03,
00359   
00360     4.4724062e-03,     //Tail
00361     4.4724062e-03,
00362   
00363     4.3742314e-03,     //Mouth
00364     
00365     0,0,0,0,0,0,0,0,0, //LEDs
00366     
00367     0,0                //Ears
00368   };
00369 
00370   #ifndef RAD
00371     //!Just a little macro for converting degrees to radians
00372   #define RAD(deg) (((deg) * M_PI ) / 180.0)
00373     //!a flag so we undef these after we're done - do you have a cleaner solution?
00374   #define __RI_RAD_FLAG
00375   #endif
00376   
00377   //! Defines the min and max index of entries in #outputRanges and #mechanicalLimits
00378   enum MinMaxRange_t { MinRange,MaxRange };
00379 
00380   //! This table holds the software limits of each of the outputs
00381   const double outputRanges[NumOutputs][2] =
00382     {
00383       { RAD(-117),RAD(117) },{ RAD(-11),RAD(89) },{ RAD(-27),RAD(147) }, //left front REK
00384       { RAD(-117),RAD(117) },{ RAD(-11),RAD(89) },{ RAD(-27),RAD(147) }, //right front REK
00385       { RAD(-117),RAD(117) },{ RAD(-11),RAD(89) },{ RAD(-27),RAD(147) }, //left back REK
00386       { RAD(-117),RAD(117) },{ RAD(-11),RAD(89) },{ RAD(-27),RAD(147) }, //right back REK
00387 
00388       { RAD(-82),RAD(43) },{ RAD(-89.6),RAD(89.6) },{ RAD(-29),RAD(29) }, //neck TPR
00389         
00390       { RAD(-22),RAD(22) },{ RAD(-22),RAD(22) }, // tail tp
00391 
00392       { RAD(-47),RAD(-3) }, //mouth
00393 
00394       {0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1}, //LEDs
00395     
00396       {0,1},{0,1} //ears
00397     };
00398 
00399   //! This table holds the mechanical limits of each of the outputs
00400   const double mechanicalLimits[NumOutputs][2] =
00401     {
00402       { RAD(-120),RAD(120) },{ RAD(-14),RAD(92) },{ RAD(-30),RAD(150) }, //left front jsk
00403       { RAD(-120),RAD(120) },{ RAD(-14),RAD(92) },{ RAD(-30),RAD(150) }, //right front jsk
00404       { RAD(-120),RAD(120) },{ RAD(-14),RAD(92) },{ RAD(-30),RAD(150) }, //left back jsk
00405       { RAD(-120),RAD(120) },{ RAD(-14),RAD(92) },{ RAD(-30),RAD(150) }, //right back jsk
00406 
00407       { RAD(-85),RAD(46) },{ RAD(-92.6),RAD(92.6) },{ RAD(-32),RAD(32) }, //neck tpr
00408         
00409       { RAD(-25),RAD(25) },{ RAD(-25),RAD(25) }, // tail tp
00410 
00411       { RAD(-50),RAD(0) }, //mouth
00412 
00413       {0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1}, //LEDs
00414     
00415       {0,1},{0,1} //ears
00416     };
00417 
00418 #ifdef __RI_RAD_FLAG
00419 #undef RAD
00420 #undef __RI_RAD_FLAG
00421 #endif
00422 
00423 #endif //TGT_ERS2xx check
00424 
00425   /*! @name CPC IDs
00426    * values defined by OPEN-R, used to interface with lower level OPEN-R code to read sensors - DOESN'T correspond to ::PrimitiveName */
00427   static const int CPCJointNeckTilt           =  0; //!< Head
00428   static const int CPCJointNeckPan            =  1;
00429   static const int CPCJointNeckRoll           =  2;
00430   static const int CPCSensorHeadBackPressure  =  3;
00431   static const int CPCSensorHeadFrontPressure =  4;
00432   static const int CPCSensorPSD               =  5;
00433   static const int CPCJointMouth              =  6;
00434   static const int CPCSensorChinSwitch        =  7;
00435   static const int CPCJointLFRotator          =  8; //!< Left front leg
00436   static const int CPCJointLFElevator         =  9;
00437   static const int CPCJointLFKnee             = 10;
00438   static const int CPCSensorLFPaw             = 11;
00439   static const int CPCJointLHRotator          = 12; //!< Left hind leg
00440   static const int CPCJointLHElevator         = 13;
00441   static const int CPCJointLHKnee             = 14;
00442   static const int CPCSensorLHPaw             = 15;
00443   static const int CPCJointRFRotator          = 16; //!< Right front leg
00444   static const int CPCJointRFElevator         = 17;
00445   static const int CPCJointRFKnee             = 18;
00446   static const int CPCSensorRFPaw             = 19;
00447   static const int CPCJointRHRotator          = 20; //!< Right hind leg
00448   static const int CPCJointRHElevator         = 21;
00449   static const int CPCJointRHKnee             = 22;
00450   static const int CPCSensorRHPaw             = 23;
00451   static const int CPCJointTailPan            = 24; //!< Tail
00452   static const int CPCJointTailTilt           = 25;
00453   static const int CPCSensorThermoSensor      = 26;
00454   static const int CPCSensorBackSwitch        = 27;
00455   static const int CPCSensorAccelFB           = 28; //!< Front-back @see RobotInfo::BAccelOffset 
00456   static const int CPCSensorAccelLR           = 29; //!< Left-right @see RobotInfo::LAccelOffset 
00457   static const int CPCSensorAccelUD           = 30; //!< Up-down  @see RobotInfo::DAccelOffset 
00458   //@}
00459 
00460 }
00461   
00462 /*! @file
00463  * @brief Defines RobotInfo namespace for ERS-210 models, gives some information about the robot's capabilities, such as joint counts, offsets, names and PID values
00464  * @author ejt (Creator)
00465  *
00466  * $Author: ejt $
00467  * $Name: tekkotsu-1_4_1 $
00468  * $Revision: 1.6 $
00469  * $State: Exp $
00470  * $Date: 2003/06/12 23:41:40 $
00471  */
00472 
00473 #endif

Tekkotsu v1.4
Generated Sat Jul 19 00:06:30 2003 by Doxygen 1.3.2