Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
LynxArm6Info.hGo to the documentation of this file.00001 //-*-c++-*- 00002 #ifndef INCLUDED_LynxArm6Info_h 00003 #define INCLUDED_LynxArm6Info_h 00004 00005 #include <cmath> 00006 #include <cstdlib> 00007 #include "CommonInfo.h" 00008 using namespace RobotInfo; 00009 00010 // see http://tekkotsu.org/porting.html#configuration for more information on TGT_HAS_* flags 00011 #if defined(TGT_LYNXARM6) 00012 # define TGT_HAS_ARMS 1 00013 #endif 00014 00015 //! Declares configuration of the 6-DOF PUMA style arm from Lynx Motion, such as number of joints, LEDs, etc. 00016 namespace LynxArm6Info { 00017 00018 // ******************************* 00019 // ROBOT CONFIGURATION 00020 // ******************************* 00021 00022 extern const char* const TargetName; //!< the name of the model, to be used for logging and remote GUIs 00023 00024 const unsigned int FrameTime=32; //!< time between frames in the motion system (milliseconds) 00025 const unsigned int NumFrames=1; //!< the number of frames per buffer (don't forget also double buffered) 00026 const unsigned int SoundBufferTime=32; //!< the number of milliseconds per sound buffer... I'm not sure if this can be changed 00027 00028 //!@name Output Types Information 00029 const unsigned NumWheels = 0; //!< no wheels, just legs 00030 00031 const unsigned JointsPerArm = 6; 00032 const unsigned NumArms = 1; 00033 const unsigned NumArmJoints = JointsPerArm*NumArms; 00034 00035 const unsigned JointsPerLeg = 0; //!< The number of joints per leg 00036 const unsigned NumLegs = 0; //!< The number of legs 00037 const unsigned NumLegJoints = JointsPerLeg*NumLegs; //!< the TOTAL number of joints on ALL legs 00038 const unsigned NumHeadJoints = 0; //!< The number of joints in the neck 00039 const unsigned NumTailJoints = 0; //!< The number of joints assigned to the tail 00040 const unsigned NumMouthJoints = 0; //!< the number of joints that control the mouth 00041 const unsigned NumEarJoints = 0; //!< The number of joints which control the ears (NOT per ear, is total) 00042 const unsigned NumButtons = 0; //!< the number of buttons that are available, 2 head, 4 paws, 3 back, 1 underbelly see ERS7Info::ButtonOffset_t 00043 const unsigned NumSensors = 4; //!< the four input pins 00044 const unsigned NumLEDs = 0; //!< The number of LEDs which can be controlled 00045 const unsigned NumFacePanelLEDs = 0; //!< The number of face panel LEDs 00046 00047 const unsigned NumPIDJoints = NumArmJoints + NumLegJoints+NumHeadJoints+NumTailJoints+NumMouthJoints; //!< The number of joints which use PID motion - everything except ears 00048 const unsigned NumOutputs = NumPIDJoints + NumLEDs; //!< the total number of outputs 00049 const unsigned NumReferenceFrames = NumOutputs + 1 + NumArms; //!< for the base, gripper (* NumArms) 00050 00051 // webcam ? 00052 const float CameraHorizFOV=56.9f/180*(float)M_PI; //!< horizontal field of view (radians) 00053 const float CameraVertFOV=45.2f/180*(float)M_PI; //!< vertical field of view (radians) 00054 const float CameraFOV=CameraHorizFOV; //!< should be set to maximum of #CameraHorizFOV or #CameraVertFOV 00055 const unsigned int CameraResolutionX=320; //!< the number of pixels available in the 'full' layer 00056 const unsigned int CameraResolutionY=240; //!< the number of pixels available in the 'full' layer 00057 //@} 00058 00059 00060 // ******************************* 00061 // OUTPUT OFFSETS 00062 // ******************************* 00063 00064 //!Corresponds to entries in ERS7Info::PrimitiveName, defined at the end of this file 00065 //!@name Output Offsets 00066 00067 const unsigned PIDJointOffset = 0; //!< The beginning of the PID Joints 00068 const unsigned ArmOffset = PIDJointOffset; 00069 00070 //! These are 'absolute' offsets for the arm joints, don't need to add to ArmOffset like TPROffset_t values do 00071 enum ArmOffset_t { 00072 ArmShoulderOffset=ArmOffset, 00073 ArmElevatorOffset, 00074 ArmElbowOffset, 00075 WristOffset, 00076 WristRollOffset = WristOffset, 00077 WristPitchOffset, 00078 GripperOffset 00079 }; 00080 00081 const unsigned BaseFrameOffset = NumOutputs; //!< Use with kinematics to refer to base reference frame 00082 const unsigned GripperFrameOffset = BaseFrameOffset+1; //!< Use with kinematics to refer to paw reference frames 00083 00084 //@} 00085 00086 00087 // ******************************* 00088 // INPUT OFFSETS 00089 // ******************************* 00090 00091 00092 //! The order in which inputs should be stored 00093 //!@name Input Offsets 00094 00095 //! holds offsets to different buttons in WorldState::buttons[] 00096 /*! Should be a straight mapping to the ButtonSourceIDs 00097 * 00098 * Note that the chest (power) button is not a normal button. It kills 00099 * power to the motors at a hardware level, and isn't sensed in the 00100 * normal way. If you want to know when it is pressed (and you are 00101 * about to shut down) see PowerSrcID::PauseSID. 00102 * 00103 * @see WorldState::buttons @see ButtonSourceID_t 00104 * @hideinitializer */ 00105 enum ButtonOffset_t { }; 00106 00107 //! Provides a string name for each button 00108 const char* const buttonNames[NumButtons+1] = { NULL }; // plus one and NULL entry to workaround gcc 3.4.2 internal error 00109 00110 //! holds offset to different sensor values in WorldState::sensors[] 00111 /*! @see WorldState::sensors[] */ 00112 enum SensorOffset_t { SensorAOffset, SensorBOffset, SensorCOffset, SensorDOffset }; 00113 00114 //! Provides a string name for each sensor 00115 const char* const sensorNames[NumSensors] = { "SensorA", "SensorB", "SensorC", "SensorD" }; 00116 00117 //@} 00118 00119 00120 //! Names for each of the outputs 00121 const char* const outputNames[NumReferenceFrames+1] = { 00122 "Shldr:rot","Shldr:elv","Elbow", 00123 "Wrist:elv","Wrist:rot","Gripper", 00124 00125 "BaseFrame", "GripperFrame", 00126 NULL 00127 }; 00128 00129 //! allocation declared in RobotInfo.cc 00130 extern const Capabilities capabilities; 00131 00132 //! This table holds the default PID values for each joint. see PIDMC 00133 const float DefaultPIDs[NumPIDJoints][3] = { 00134 {1,0,0}, {1,0,0}, {1,0,0}, 00135 {1,0,0}, {1,0,0}, {1,0,0}, 00136 }; 00137 00138 //!These values are Sony's recommended maximum joint velocities, in rad/sec 00139 /*! a value <= 0 means infinite speed (e.g. LEDs) 00140 * 00141 * These limits are <b>not</b> enforced by the framework. They are simply available for you to use as you see fit. 00142 * HeadPointerMC and PostureMC are primary examples of included classes which do respect these values (although they can be overridden) 00143 * 00144 * These values were obtained from the administrators of the Sony OPEN-R BBS */ 00145 const float MaxOutputSpeed[NumOutputs] = { 00146 4.86510529f, //Legs LR,FB,REK 00147 5.27962099f, 00148 5.27962099f, 00149 4.86510529f, 00150 5.27962099f, 00151 5.27962099f 00152 }; 00153 00154 #ifndef RAD 00155 //!Just a little macro for converting degrees to radians 00156 #define RAD(deg) (((deg) * (float)M_PI ) / 180.0f) 00157 //!a flag so we undef these after we're done - do you have a cleaner solution? 00158 #define __RI_RAD_FLAG 00159 #endif 00160 00161 //! This table holds the software limits of each of the outputs, first index is the output offset, second index is MinMaxRange_t (i.e. MinRange or MaxRange) 00162 const float outputRanges[NumOutputs][2] = 00163 { 00164 { RAD(-90),RAD(90) },{ RAD(-90),RAD(90) },{ RAD(-90),RAD(90) }, 00165 { RAD(-90),RAD(90) },{ RAD(-90),RAD(90) },{ RAD(-90),RAD(90) }, 00166 }; 00167 00168 //! This table holds the mechanical limits of each of the outputs, first index is the output offset, second index is MinMaxRange_t (i.e. MinRange or MaxRange) 00169 /*! Same as #outputRanges */ 00170 const float mechanicalLimits[NumOutputs][2] = 00171 { 00172 { RAD(-90),RAD(90) },{ RAD(-90),RAD(90) },{ RAD(-90),RAD(90) }, 00173 { RAD(-90),RAD(90) },{ RAD(-90),RAD(90) },{ RAD(-90),RAD(90) }, 00174 }; 00175 00176 #ifdef __RI_RAD_FLAG 00177 #undef RAD 00178 #undef __RI_RAD_FLAG 00179 #endif 00180 } 00181 00182 /*! @file 00183 * @brief Defines some capabilities of the 6-DOF PUMA style arm from Lynx Motion 00184 * @author ejt (Creator) 00185 */ 00186 00187 #endif |
Tekkotsu v5.1CVS |
Generated Mon May 9 04:58:44 2016 by Doxygen 1.6.3 |