| Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
ERS7Info.hGo to the documentation of this file.00001 //-*-c++-*- 00002 #ifndef INCLUDED_ERS7Info_h 00003 #define INCLUDED_ERS7Info_h 00004 00005 #include "Shared/CommonERSInfo.h" 00006 00007 // see http://tekkotsu.org/porting.html#configuration for more information on TGT_HAS_* flags 00008 #if defined(TGT_ERS7) 00009 # define TGT_HAS_LEDS 27 00010 # define TGT_HAS_BUTTONS 10 00011 # define TGT_HAS_IR_DISTANCE 3 00012 #endif 00013 00014 //! Contains information about the ERS-7 Robot, such as number of joints, PID defaults, timing information, etc. 00015 /*! 00016 You may be particularly interested in the "Output Offsets" section, which, along with the offsets of the common RobotInfo namespace, 00017 allows you to reference any specific joint or LED on the robot. 00018 00019 The "Input Offsets" section gives the index order of the buttons (#ButtonOffset_t) and sensors (#SensorOffset_t), as well as 00020 string names for each for easier debugging (#buttonNames, #sensorNames) 00021 00022 "Output Types" section provides "meta-information" regarding the capabilities of the robot, such as the number of head joints, or the number of LEDs, etc. 00023 00024 For more information on your robot's specifications, see also #DefaultPIDs, #MaxOutputSpeed, #outputRanges, and #mechanicalLimits. 00025 00026 "Outputs" (i.e. Joints, LEDs) are often refered to by index ("offset") value within an array. 00027 These values are formed by specifying a @e section offset, plus a @e specific offset. Sections are typically general across robot models, whereas the specifics are model-dependent (but can be aliased to provide compatability). 00028 00029 For most joints, the positive direction is "up", and the 0 position yields a forward looking, fully extended standing posture. 00030 00031 - {L,R}{FrBk}LegOffset - #NumLegs combinations, each with #JointsPerLeg items, add REKOffset_t; see also LegOffset_t 00032 - + #RotatorOffset: positive moves "out", away from body 00033 - + #ElevatorOffset: positive moves up, away from body 00034 - + #KneeOffset: positive bends knee (slight negative possible) 00035 - #HeadOffset - #NumHeadJoints items, add #TPROffset_t: 00036 - + #TiltOffset: positive looks up 00037 - + #PanOffset: positive looks left 00038 - + #NodOffset: positive looks up 00039 - #TailOffset - #NumTailJoints items, add #TPROffset_t: 00040 - + #TiltOffset: positive raises the joint (lowers the tail itself) 00041 - + #PanOffset: positive points the tail to the Aibo's right 00042 - MouthOffset - #NumMouthJoints items (no specific, only 1 joint) 00043 - LEDs: #NumLEDs items, see #LEDOffset_t; these are all direct offsets, and do not need to be added to anything else 00044 - #EarOffset - #NumEarJoints items (no specifics, first is left ear, second is right ear) 00045 00046 It happens that these joints can also be grouped by the @e type of joint, so there are additionally a few other offsets that can be used in order to loop across a group of joints: 00047 - PIDJointOffset - #NumPIDJoints items, servos using PID control 00048 - LegOffset - #NumLegJoints items, a subset of PID servos corresponding to the leg joints 00049 - LEDOffset - #NumLEDs items 00050 - BinJointOffset - #NumBinJoints items, solenoids, such as the ears (if any) which flip between two positions 00051 - #NumOutputs - total number of outputs available 00052 00053 LEDs are often handled in groups to display patterns. Some functions take an LEDBitMask_t 00054 parameter, which allows you to specify a set of several LEDs in a single parameter. 00055 For any given LED offset @c fooLEDOffset, the corresponding bitmask constant is @c fooLEDMask. 00056 Alternatively, you could calculate the bitmask of @c fooLEDOffset by <code>1<<(fooLEDOffset-LEDOffset)</code>. 00057 00058 @see <a href="../media/TekkotsuQuickReference_ERS7.pdf">ERS-7 Quick Reference Sheet</a> 00059 */ 00060 namespace ERS7Info { 00061 00062 // ******************************* 00063 // ROBOT CONFIGURATION 00064 // ******************************* 00065 00066 extern const char* const TargetName; //!< the name of the model, to be used for logging and remote GUIs 00067 00068 const unsigned int FrameTime=8; //!< time between frames in the motion system (milliseconds) 00069 const unsigned int NumFrames=4; //!< the number of frames per buffer (don't forget also double buffered) 00070 const unsigned int SlowFrameTime=8; //!< time between frames for the ears (ERS-7 doesn't seem to have any "slow" joints; this only applied for the ears on the ERS-210) 00071 const unsigned int NumSlowFrames=4; //!< the number of frames per buffer being sent to ears (double buffered as well) 00072 const unsigned int SoundBufferTime=32; //!< the number of milliseconds per sound buffer... I'm not sure if this can be changed 00073 00074 //!Corresponds to entries in ERS7Info::PrimitiveName, defined at the end of this file, these are the primary grouping 00075 /*!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 */ 00076 //!@name Output Types Information 00077 const unsigned NumWheels = 0; //!< no wheels, just legs 00078 00079 const unsigned JointsPerArm = 0; //!< no arms, just legs 00080 const unsigned NumArms = 0; //!< no arms, just legs 00081 const unsigned NumArmJoints = JointsPerArm*NumArms; 00082 00083 const unsigned JointsPerLeg = 3; //!< The number of joints per leg 00084 const unsigned NumLegs = 4; //!< The number of legs 00085 const unsigned NumLegJoints = JointsPerLeg*NumLegs; //!< the TOTAL number of joints on ALL legs 00086 const unsigned NumHeadJoints = 3; //!< The number of joints in the neck 00087 const unsigned NumTailJoints = 2; //!< The number of joints assigned to the tail 00088 const unsigned NumMouthJoints = 1; //!< the number of joints that control the mouth 00089 const unsigned NumEarJoints = 2; //!< The number of joints which control the ears (NOT per ear, is total) 00090 const unsigned NumButtons = 2+4+3+1; //!< the number of buttons that are available, 2 head, 4 paws, 3 back, 1 underbelly see ERS7Info::ButtonOffset_t 00091 const unsigned NumSensors = 3+3+5; //!< 3 IR (distance), 3 accel (force), 5 from power, see ERS7Info::SensorOffset_t 00092 const unsigned NumLEDs = 27; //!< The number of LEDs which can be controlled 00093 const unsigned NumFacePanelLEDs = 14; //!< The number of face panel LEDs 00094 00095 const unsigned NumPIDJoints = NumLegJoints+NumHeadJoints+NumTailJoints+NumMouthJoints; //!< The number of joints which use PID motion - everything except ears 00096 const unsigned NumBinJoints = NumEarJoints; //!< The number of binary joints - just the ears 00097 const unsigned NumOutputs = NumPIDJoints + NumBinJoints + NumLEDs; //!< the total number of outputs 00098 const unsigned NumReferenceFrames = NumOutputs + 1 + NumLegs + 1 + 3; //!< for the base, paws (NumLegs), camera, and IR sensors (3) reference frames 00099 00100 const float CameraHorizFOV=56.9/180*M_PI; //!< horizontal field of view (radians) 00101 const float CameraVertFOV=45.2/180*M_PI; //!< vertical field of view (radians) 00102 const float CameraFOV=CameraHorizFOV; //!< should be set to maximum of #CameraHorizFOV or #CameraVertFOV 00103 const unsigned int CameraResolutionX=208; //!< the number of pixels available in the 'full' layer 00104 const unsigned int CameraResolutionY=160; //!< the number of pixels available in the 'full' layer 00105 const float BallOfFootRadius=23.433/2; //!< radius of the ball of the foot 00106 00107 //! true for joints which can be updated every 32 ms (all joints on ERS-7) 00108 /*! @hideinitializer */ 00109 const bool IsFastOutput[NumOutputs] = { 00110 true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true, //PID joints 00111 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, //leds 00112 true,true //ears 00113 }; 00114 //@} 00115 00116 00117 00118 // ******************************* 00119 // OUTPUT OFFSETS 00120 // ******************************* 00121 00122 00123 //!Corresponds to entries in ERS7Info::PrimitiveName, defined at the end of this file 00124 //!@name Output Offsets 00125 00126 const unsigned PIDJointOffset = 0; //!< The beginning of the PID Joints 00127 const unsigned LegOffset = PIDJointOffset; //!< the offset of the beginning of the leg joints, #NumLegs of #JointsPerLeg each, in #LegOrder_t order; see #LegOffset_t 00128 const unsigned HeadOffset = LegOffset+NumLegJoints; //!< the offset of the beginning of the head joints, add #TPROffset_t to get specific joint 00129 const unsigned TailOffset = HeadOffset+NumHeadJoints; //!< the offset of the beginning of the tail joints, add #TPROffset_t to get specific joint (except RollOffset not available) 00130 const unsigned MouthOffset = TailOffset+NumTailJoints; //!< the offset of the beginning of the mouth joint, is specific joint 00131 00132 const unsigned LEDOffset = PIDJointOffset + NumPIDJoints; //!< the offset of LEDs in WorldState::outputs and MotionCommand functions, see LedOffset_t for specific offsets 00133 00134 const unsigned BinJointOffset = LEDOffset + NumLEDs; //!< The beginning of the binary joints 00135 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. 00136 00137 const unsigned BaseFrameOffset = NumOutputs; //!< Use with kinematics to refer to base reference frame 00138 const unsigned PawFrameOffset = BaseFrameOffset+1; //!< Use with kinematics to refer to paw reference frames (add appropriate LegOrder_t to specify which paw) 00139 const unsigned CameraFrameOffset = PawFrameOffset+NumLegs; //!< Use with kinematics to refer to camera reference frame 00140 const unsigned NearIRFrameOffset = CameraFrameOffset+1; //!< Use with kinematics to refer to short-range infrared (distance) sensor reference frame 00141 const unsigned FarIRFrameOffset = NearIRFrameOffset+1; //!< Use with kinematics to refer to long-range infrared (distance) sensor reference frame 00142 const unsigned ChestIRFrameOffset = FarIRFrameOffset+1; //!< Use with kinematics to refer to chest-mounted infrared (distance) sensor reference frame 00143 00144 //! the ordering of legs 00145 enum LegOrder_t { 00146 LFrLegOrder = 0, //!< left front leg 00147 RFrLegOrder, //!< right front leg 00148 LBkLegOrder, //!< left back leg 00149 RBkLegOrder //!< right back leg 00150 }; 00151 00152 //! 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) 00153 enum REKOffset_t { 00154 RotatorOffset=0, //!< moves leg forward or backward along body 00155 ElevatorOffset, //!< moves leg toward or away from body 00156 KneeOffset //!< moves knee 00157 }; 00158 00159 //! The offsets of appendages with tilt (elevation), pan (heading), and roll or nod 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) 00160 enum TPROffset_t { 00161 TiltOffset = 0, //!< tilt/elevation (vertical) 00162 PanOffset, //!< pan/heading (horizontal) 00163 RollOffset, //!< roll (rotational) 00164 NodOffset=RollOffset //!< nod (second tilt) 00165 }; 00166 00167 //! The offsets of the individual legs, add #REKOffset_t value to access specific joint 00168 /*! @hideinitializer */ 00169 enum LegOffset_t { 00170 LFrLegOffset = LegOffset+LFrLegOrder*JointsPerLeg, //!< beginning of left front leg's joints 00171 RFrLegOffset = LegOffset+RFrLegOrder*JointsPerLeg, //!< beginning of right front leg's joints 00172 LBkLegOffset = LegOffset+LBkLegOrder*JointsPerLeg, //!< beginning of left back leg's joints 00173 RBkLegOffset = LegOffset+RBkLegOrder*JointsPerLeg //!< beginning of right back leg's joints 00174 }; 00175 00176 //! The offsets of the individual LEDs on the head and tail. Note that left/right are robot's point of view. See also LEDBitMask_t 00177 /*! @hideinitializer */ 00178 enum LEDOffset_t { 00179 HeadColorLEDOffset = LEDOffset, //!< the orange LED immediately above the head button (copositioned with #HeadWhiteLEDOffset) 00180 HeadWhiteLEDOffset, //!< the LED immediately above the head button (copositioned with #HeadColorLEDOffset) 00181 ModeRedLEDOffset, //!< controls both of the red LEDs above the ears (copositioned with #ModeGreenLEDOffset and #ModeBlueLEDOffset) 00182 ModeGreenLEDOffset, //!< controls both of the green LEDs above the ears (copositioned with #ModeRedLEDOffset and #ModeBlueLEDOffset) 00183 ModeBlueLEDOffset, //!< controls both of the blue LEDs above the ears (copositioned with #ModeRedLEDOffset and #ModeGreenLEDOffset) 00184 WirelessLEDOffset, //!< controls the small rectangular blue LED on the back of the head 00185 FaceLEDPanelOffset, //!< the first LED in the panel - add 0 up to (not including) #NumFacePanelLEDs to this to access specific face panel LEDs, see LedEngine for diagram of placement 00186 FrBackColorLEDOffset = FaceLEDPanelOffset+NumFacePanelLEDs, //!< @b blue/purple LED on back, closest to head (copositioned with #FrBackWhiteLEDOffset) 00187 FrBackWhiteLEDOffset, //!< white LED on back, closest to head (copositioned with #FrBackColorLEDOffset) 00188 MdBackColorLEDOffset, //!< @b orange LED on back, in between FrBackColorLEDOffset and RrBackColorLEDOffset (copositioned with #MdBackWhiteLEDOffset) 00189 MdBackWhiteLEDOffset, //!< white LED on back, in between FrBackWhiteLEDOffset and RrBackWhiteLEDOffset (copositioned with #MdBackColorLEDOffset) 00190 RrBackColorLEDOffset, //!< @b red LED on back, farthest from head (copositioned with #RrBackWhiteLEDOffset) 00191 RrBackWhiteLEDOffset, //!< white LED on back, farthest from head (copositioned with #RrBackColorLEDOffset) 00192 LEDABModeOffset, // allows you to control A/B mode setting (this is a "virtual" LED) 00193 00194 // aliases for 2xx cross-compatibility 00195 BotLLEDOffset = FaceLEDPanelOffset+1,//!< aliases for backward compatability with ERS-210 (use mode A); bottom left of face panel 00196 BotRLEDOffset = FaceLEDPanelOffset+0, //!< aliases for backward compatability with ERS-210 (use mode A); bottom right of face panel 00197 MidLLEDOffset = FaceLEDPanelOffset+3, //!< aliases for backward compatability with ERS-210 (use mode A); middle left of face panel 00198 MidRLEDOffset = FaceLEDPanelOffset+2, //!< aliases for backward compatability with ERS-210 (use mode A); middle right of face panel 00199 TopLLEDOffset = FaceLEDPanelOffset+7, //!< aliases for backward compatability with ERS-210 (use mode A); top left of face panel 00200 TopRLEDOffset = FaceLEDPanelOffset+6, //!< aliases for backward compatability with ERS-210(use mode A); top right of face panel 00201 TopBrLEDOffset= HeadColorLEDOffset,//!< aliases for backward compatability with ERS-210 (use mode A); top bar (#HeadColorLEDOffset) 00202 TlRedLEDOffset= RrBackColorLEDOffset,//!< aliases for backward compatability with ERS-210; red tail light (#RrBackColorLEDOffset) 00203 TlBluLEDOffset= FrBackColorLEDOffset //!< aliases for backward compatability with ERS-210; blue tail light (#FrBackColorLEDOffset) 00204 }; 00205 //@} 00206 00207 //! Bitmasks for use when specifying combinations of LEDs (see LedEngine ) Note that left/right are robot's point of view 00208 //!@name LED Bitmasks 00209 typedef unsigned int LEDBitMask_t; //!< So you can be clear when you're refering to a LED bitmask 00210 00211 const LEDBitMask_t HeadColorLEDMask = 1<<(HeadColorLEDOffset-LEDOffset); //!< mask corresponding to HeadColorLEDOffset 00212 const LEDBitMask_t HeadWhiteLEDMask = 1<<(HeadWhiteLEDOffset-LEDOffset); //!< mask corresponding to HeadWhiteLEDOffset 00213 const LEDBitMask_t ModeRedLEDMask = 1<<(ModeRedLEDOffset-LEDOffset); //!< mask corresponding to ModeRedLEDOffset 00214 const LEDBitMask_t ModeGreenLEDMask = 1<<(ModeGreenLEDOffset-LEDOffset); //!< mask corresponding to ModeGreenLEDOffset 00215 const LEDBitMask_t ModeBlueLEDMask = 1<<(ModeBlueLEDOffset-LEDOffset); //!< mask corresponding to ModeBlueLEDOffset 00216 const LEDBitMask_t WirelessLEDMask = 1<<(WirelessLEDOffset-LEDOffset); //!< mask corresponding to WirelessLEDOffset 00217 const LEDBitMask_t FaceLEDPanelMask = 1<<(FaceLEDPanelOffset-LEDOffset); //!< mask corresponding to FaceLEDPanelOffset, selects only the first of the panel - shift this to get the others 00218 const LEDBitMask_t FrBackColorLEDMask = 1<<(FrBackColorLEDOffset-LEDOffset); //!< mask corresponding to FrBackColorLEDOffset 00219 const LEDBitMask_t FrBackWhiteLEDMask = 1<<(FrBackWhiteLEDOffset-LEDOffset); //!< mask corresponding to FrBackWhiteLEDOffset 00220 const LEDBitMask_t MdBackColorLEDMask = 1<<(MdBackColorLEDOffset-LEDOffset); //!< mask corresponding to MdBackColorLEDOffset 00221 const LEDBitMask_t MdBackWhiteLEDMask = 1<<(MdBackWhiteLEDOffset-LEDOffset); //!< mask corresponding to MdBackWhiteLEDOffset 00222 const LEDBitMask_t RrBackColorLEDMask = 1<<(RrBackColorLEDOffset-LEDOffset); //!< mask corresponding to RrBackColorLEDOffset 00223 const LEDBitMask_t RrBackWhiteLEDMask = 1<<(RrBackWhiteLEDOffset-LEDOffset); //!< mask corresponding to RrBackWhiteLEDOffset 00224 const LEDBitMask_t LEDABModeMask = 1<<(LEDABModeOffset-LEDOffset); //!< mask corresponding to LEDABModeOffset 00225 00226 const LEDBitMask_t BotLLEDMask = 1<<(BotLLEDOffset-LEDOffset); //!< bottom left 00227 const LEDBitMask_t BotRLEDMask = 1<<(BotRLEDOffset-LEDOffset); //!< bottom right 00228 const LEDBitMask_t MidLLEDMask = 1<<(MidLLEDOffset-LEDOffset); //!< middle left 00229 const LEDBitMask_t MidRLEDMask = 1<<(MidRLEDOffset-LEDOffset); //!< middle right 00230 const LEDBitMask_t TopLLEDMask = 1<<(TopLLEDOffset-LEDOffset); //!< top left 00231 const LEDBitMask_t TopRLEDMask = 1<<(TopRLEDOffset-LEDOffset); //!< top right 00232 const LEDBitMask_t TopBrLEDMask= 1<<(TopBrLEDOffset-LEDOffset); //!< top bar 00233 const LEDBitMask_t TlRedLEDMask= 1<<(TlRedLEDOffset-LEDOffset); //!< red tail light 00234 const LEDBitMask_t TlBluLEDMask= 1<<(TlBluLEDOffset-LEDOffset); //!< blue tail light 00235 00236 //! LEDs for the face panel (all FaceLEDPanelMask<<(0:NumFacePanelLEDs-1) entries) 00237 /*! @hideinitializer */ 00238 const LEDBitMask_t FaceLEDMask = (FaceLEDPanelMask<<0) | (FaceLEDPanelMask<<1) | (FaceLEDPanelMask<<2) | (FaceLEDPanelMask<<3) | (FaceLEDPanelMask<<4) | (FaceLEDPanelMask<<5) | (FaceLEDPanelMask<<6) | (FaceLEDPanelMask<<7) | (FaceLEDPanelMask<<8) | (FaceLEDPanelMask<<9) | (FaceLEDPanelMask<<10) | (FaceLEDPanelMask<<11) | (FaceLEDPanelMask<<12) | (FaceLEDPanelMask<<13); 00239 00240 //! LEDs for face (all but back lights) 00241 const LEDBitMask_t HeadLEDMask 00242 = FaceLEDMask | HeadColorLEDMask | HeadWhiteLEDMask 00243 | ModeRedLEDMask | ModeGreenLEDMask | ModeBlueLEDMask 00244 | WirelessLEDMask; 00245 00246 //! LEDS on the back 00247 const LEDBitMask_t BackLEDMask 00248 = FrBackColorLEDMask | FrBackWhiteLEDMask 00249 | MdBackColorLEDMask | MdBackWhiteLEDMask 00250 | RrBackColorLEDMask | RrBackWhiteLEDMask; 00251 00252 //! LEDs on tail (ERS-7 has none) 00253 const LEDBitMask_t TailLEDMask = 0; 00254 00255 //! selects all of the leds 00256 const LEDBitMask_t AllLEDMask = (LEDBitMask_t)~0; 00257 //@} 00258 00259 00260 00261 // ******************************* 00262 // INPUT OFFSETS 00263 // ******************************* 00264 00265 00266 //! The order in which inputs should be stored 00267 //!@name Input Offsets 00268 00269 //! holds offsets to different buttons in WorldState::buttons[] 00270 /*! Should be a straight mapping to the ButtonSourceIDs 00271 * 00272 * Note that the chest (power) button is not a normal button. It kills 00273 * power to the motors at a hardware level, and isn't sensed in the 00274 * normal way. If you want to know when it is pressed (and you are 00275 * about to shut down) see PowerSrcID::PauseSID. 00276 * 00277 * @see WorldState::buttons @see ButtonSourceID_t 00278 * @hideinitializer */ 00279 enum ButtonOffset_t { 00280 LFrPawOffset = LFrLegOrder, 00281 RFrPawOffset = RFrLegOrder, 00282 LBkPawOffset = LBkLegOrder, 00283 RBkPawOffset = RBkLegOrder, 00284 ChinButOffset= 4, 00285 HeadButOffset, 00286 HeadFrButOffset=HeadButOffset, 00287 FrontBackButOffset, 00288 MiddleBackButOffset, 00289 BackButOffset = MiddleBackButOffset, 00290 RearBackButOffset, 00291 WirelessSwOffset 00292 }; 00293 00294 //! Provides a string name for each button 00295 const char* const buttonNames[NumButtons] = { 00296 "LFrPaw","RFrPaw","LBkPaw","RBkPaw", 00297 "ChinBut","HeadBut", 00298 "FrontBackBut","MiddleBackBut","RearBackBut", 00299 "WirelessSw" 00300 }; 00301 00302 //! holds offset to different sensor values in WorldState::sensors[] 00303 /*! @see WorldState::sensors[] */ 00304 enum SensorOffset_t { 00305 NearIRDistOffset = 0, //!< in millimeters, ranges from 50 to 500 00306 IRDistOffset=NearIRDistOffset, //!< alias for ERS-2xx's solitary range finder 00307 FarIRDistOffset, //!< in millimeters, ranges from 200 to 1500 00308 ChestIRDistOffset, //!< in millimeters, ranges from 100 to 900 00309 BAccelOffset, //!< backward acceleration, in @f$m/s^2@f$, negative if sitting on butt (positive for faceplant) 00310 LAccelOffset, //!< acceleration to the robot's left, in @f$m/s^2@f$, negative if lying on robot's left side 00311 DAccelOffset, //!< downward acceleration, in @f$m/s^2@f$, negative if standing up... be careful about the signs on all of these... 00312 PowerRemainOffset, //!< percentage, 0-1 00313 PowerThermoOffset, //!< degrees Celcius 00314 PowerCapacityOffset, //!< milli-amp hours 00315 PowerVoltageOffset, //!< volts 00316 PowerCurrentOffset //!< milli-amp negative values (maybe positive while charging?) 00317 }; 00318 00319 //! Provides a string name for each sensor 00320 const char* const sensorNames[NumSensors] = { 00321 "NearIRDist","FarIRDist","ChestIRDist", 00322 "BAccel","LAccel","DAccel", 00323 "PowerRemain","PowerThermo","PowerCapacity","PowerVoltage","PowerCurrent" 00324 }; 00325 00326 //@} 00327 00328 00329 //! Names for each of the outputs 00330 const char* const outputNames[NumOutputs] = { 00331 "LFr:rotor","LFr:elvtr","LFr:knee", 00332 "RFr:rotor","RFr:elvtr","RFr:knee", 00333 "LBk:rotor","LBk:elvtr","LBk:knee", 00334 "RBk:rotor","RBk:elvtr","RBk:knee", 00335 00336 "NECK:tilt","NECK:pan","NECK:nod", 00337 00338 "TAIL:tilt", "TAIL:pan", 00339 00340 "MOUTH", 00341 00342 "LED:headC","LED:headW", 00343 "LED:modeR","LED:modeG", 00344 "LED:modeB","LED:wless", 00345 "LED:faceA","LED:faceB","LED:faceC","LED:faceD","LED:faceE","LED:faceF","LED:faceG", 00346 "LED:faceH","LED:faceI","LED:faceJ","LED:faceK","LED:faceL","LED:faceM","LED:faceN", 00347 "LED:bkFrC","LED:bkFrW", 00348 "LED:bkMdC","LED:bkMdW", 00349 "LED:bkRrC","LED:bkRrW", 00350 "LED:ABmod", 00351 00352 "EAR:left","EAR:right" 00353 }; 00354 00355 00356 //! provides polymorphic robot capability detection/mapping 00357 class ERS7Capabilities : public Capabilities { 00358 public: 00359 //! constructor 00360 ERS7Capabilities() 00361 : Capabilities(TargetName,NumOutputs,outputNames,NumButtons,buttonNames,NumSensors,sensorNames,PIDJointOffset,NumPIDJoints,LEDOffset,NumLEDs) 00362 { 00363 // 2xx button aliases 00364 buttonToIndex["HeadFrBut"]=HeadFrButOffset; // aliased to HeadButOffset 00365 buttonToIndex["BackBut"]=BackButOffset; //aliased to MiddleBackButOffset 00366 // 210 led aliases 00367 outputToIndex["LED:botL"]=BotLLEDOffset; // aliased to face panel... 00368 outputToIndex["LED:botR"]=BotRLEDOffset; 00369 outputToIndex["LED:midL"]=MidLLEDOffset; 00370 outputToIndex["LED:midR"]=MidRLEDOffset; 00371 outputToIndex["LED:topL"]=TopLLEDOffset; 00372 outputToIndex["LED:topR"]=TopRLEDOffset; 00373 outputToIndex["LED:topBr"]=TopBrLEDOffset; 00374 |