00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __RobotDimensions_H__
00010 #define __RobotDimensions_H__
00011
00012 #include "Tools/Math/Vector2.h"
00013
00014 class RobotDimensions
00015 {
00016 public:
00017 const double distancePanCenterToCameraX;
00018 const double distancePanCenterToCameraZ;
00019 const double distanceCameraToPSDSensor;
00020 const double distanceNeckToPanCenter;
00021
00022 const double shoulderWidth;
00023 const double bodyWidth;
00024 const double overallBodyWidth;
00025
00026 const double upperLegLengthX;
00027 const double upperLegLengthY;
00028 const double upperLegLengthZ;
00029 const double upperLegLength;
00030 const double lowerForeLegLengthX;
00031 const double lowerForeLegLengthZ;
00032 const double lowerForeLegLength;
00033 const double lowerHindLegLengthX;
00034 const double lowerHindLegLengthZ;
00035 const double lowerHindLegLength;
00036 const double lengthBetweenLegs;
00037 const double neckToLegsLengthZ;
00038 const double neckToLegsLengthX;
00039 const double lengthNeckToBodyCenter;
00040
00041 const double zeroShoulderArc;
00042 const double specsKneeArc;
00043 const double zeroFrontKneeArc;
00044 const double zeroHindKneeArc;
00045 const double zeroBodyTilt;
00046
00047 const double bodyLength;
00048 const double lowerBodyWidth;
00049 const double shoulderRadius;
00050 const double kneeRadius;
00051 const double footRadius;
00052
00053
00054
00055 const double jointLimitLeg1FN;
00056 const double jointLimitLeg1FP;
00057 const double jointLimitLeg1HN;
00058 const double jointLimitLeg1HP;
00059 const double jointLimitLeg2N;
00060 const double jointLimitLeg2P;
00061 const double jointLimitLeg3N;
00062 const double jointLimitLeg3P;
00063
00064 const double jointLimitNeckTiltN;
00065 const double jointLimitNeckTiltP;
00066 const double jointLimitHeadPanN;
00067 const double jointLimitHeadPanP;
00068 const double jointLimitHeadTiltN;
00069 const double jointLimitHeadTiltP;
00070
00071 const double jointLimitTailTiltN;
00072 const double jointLimitTailTiltP;
00073 const double jointLimitTailPanN;
00074 const double jointLimitTailPanP;
00075
00076
00077 const double motionCycleTime;
00078 const double imagesPerSecond;
00079
00080 RobotDimensions(
00081 const double distancePanCenterToCameraX,
00082 const double distancePanCenterToCameraZ,
00083 const double distanceCameraToPSDSensor,
00084 const double distanceNeckToPanCenter,
00085 const double shoulderWidth,
00086 const double bodyWidth,
00087 const double overallBodyWidth,
00088 const double upperLegLengthX,
00089 const double upperLegLengthZ,
00090 const double lowerForeLegLengthX,
00091 const double lowerForeLegLengthZ,
00092 const double lowerHindLegLengthX,
00093 const double lowerHindLegLengthZ,
00094 const double lengthBetweenLegs,
00095 const double neckToLegsLengthX,
00096 const double neckToLegsLengthZ,
00097 const double specsKneeArc,
00098 const double bodyLength,
00099 const double lowerBodyWidth,
00100 const double shoulderRadius,
00101 const double kneeRadius,
00102 const double footRadius,
00103 const double jointLimitLeg1FN,
00104 const double jointLimitLeg1FP,
00105 const double jointLimitLeg1HN,
00106 const double jointLimitLeg1HP,
00107 const double jointLimitLeg2N,
00108 const double jointLimitLeg2P,
00109 const double jointLimitLeg3N,
00110 const double jointLimitLeg3P,
00111 const double jointLimitNeckTiltN,
00112 const double jointLimitNeckTiltP,
00113 const double jointLimitHeadPanN,
00114 const double jointLimitHeadPanP,
00115 const double jointLimitHeadTiltN,
00116 const double jointLimitHeadTiltP,
00117 const double jointLimitTailTiltN,
00118 const double jointLimitTailTiltP,
00119 const double jointLimitTailPanN,
00120 const double jointLimitTailPanP,
00121 const double motionCycleTime,
00122 const double imagesPerSecond
00123 )
00124 : distancePanCenterToCameraX(distancePanCenterToCameraX),
00125 distancePanCenterToCameraZ(distancePanCenterToCameraZ),
00126 distanceCameraToPSDSensor(distanceCameraToPSDSensor),
00127 distanceNeckToPanCenter(distanceNeckToPanCenter),
00128 shoulderWidth(shoulderWidth),
00129 bodyWidth(bodyWidth),
00130 overallBodyWidth(overallBodyWidth),
00131 upperLegLengthX(upperLegLengthX),
00132 upperLegLengthY((bodyWidth - shoulderWidth) / 2),
00133 upperLegLengthZ(upperLegLengthZ),
00134 upperLegLength(Vector2<double>(upperLegLengthX, upperLegLengthZ).abs()),
00135 lowerForeLegLengthX(lowerForeLegLengthX),
00136 lowerForeLegLengthZ(lowerForeLegLengthZ),
00137 lowerForeLegLength(Vector2<double>(lowerForeLegLengthX, lowerForeLegLengthZ).abs()),
00138 lowerHindLegLengthX(lowerHindLegLengthX),
00139 lowerHindLegLengthZ(lowerHindLegLengthZ),
00140 lowerHindLegLength(Vector2<double>(lowerHindLegLengthX, lowerHindLegLengthZ).abs()),
00141 lengthBetweenLegs(lengthBetweenLegs),
00142 neckToLegsLengthX(neckToLegsLengthX),
00143 neckToLegsLengthZ(neckToLegsLengthZ),
00144 lengthNeckToBodyCenter(neckToLegsLengthX + lengthBetweenLegs / 2),
00145 zeroShoulderArc(atan2(upperLegLengthX, upperLegLengthZ)),
00146 specsKneeArc(specsKneeArc),
00147 zeroFrontKneeArc(zeroShoulderArc + specsKneeArc - atan2(lowerForeLegLengthX, lowerForeLegLengthZ)),
00148 zeroHindKneeArc(zeroShoulderArc + specsKneeArc - atan2(lowerHindLegLengthX, lowerHindLegLengthZ)),
00149 zeroBodyTilt(atan2(lowerHindLegLength * cos(zeroFrontKneeArc - zeroShoulderArc) -
00150 lowerForeLegLength * cos(zeroHindKneeArc - zeroShoulderArc), lengthBetweenLegs)),
00151 bodyLength(bodyLength),
00152 lowerBodyWidth(lowerBodyWidth),
00153 shoulderRadius(shoulderRadius),
00154 kneeRadius(kneeRadius),
00155 footRadius(footRadius),
00156 jointLimitLeg1FN(jointLimitLeg1FN),
00157 jointLimitLeg1FP(jointLimitLeg1FP),
00158 jointLimitLeg1HN(jointLimitLeg1HN),
00159 jointLimitLeg1HP(jointLimitLeg1HP),
00160 jointLimitLeg2N(jointLimitLeg2N),
00161 jointLimitLeg2P(jointLimitLeg2P),
00162 jointLimitLeg3N(jointLimitLeg3N),
00163 jointLimitLeg3P(jointLimitLeg3P),
00164 jointLimitNeckTiltN(jointLimitNeckTiltN),
00165 jointLimitNeckTiltP(jointLimitNeckTiltP),
00166 jointLimitHeadPanN(jointLimitHeadPanN),
00167 jointLimitHeadPanP(jointLimitHeadPanP),
00168 jointLimitHeadTiltN(jointLimitHeadTiltN),
00169 jointLimitHeadTiltP(jointLimitHeadTiltP),
00170 jointLimitTailTiltN(jointLimitTailTiltN),
00171 jointLimitTailTiltP(jointLimitTailTiltP),
00172 jointLimitTailPanN(jointLimitTailPanN),
00173 jointLimitTailPanP(jointLimitTailPanP),
00174 motionCycleTime(motionCycleTime),
00175 imagesPerSecond(imagesPerSecond)
00176 {}
00177 };
00178
00179 class RobotDimensionsERS210 : public RobotDimensions
00180 {
00181 public:
00182 RobotDimensionsERS210()
00183 : RobotDimensions(
00184 66.6,
00185 0.0,
00186 10.0,
00187 48.0,
00188
00189 118.4,
00190 119.4,
00191 152.0,
00192 12.8,
00193 64.0,
00194 22.4,
00195 64.9,
00196 16.6,
00197 74.9,
00198 119.0,
00199 15.5,
00200 50.0,
00201 0.611,
00202 200.0,
00203 61.0,
00204 58.0,
00205 25.0,
00206 10.0,
00207
00208 -2.04, 2.04,
00209 -2.04, 2.04,
00210 -0.2, 1.571,
00211 -0.46, 2.56,
00212 -1.571, 0.75,
00213 -1.571, 1.571,
00214 -0.46, 0.46,
00215 -0.38, 0.38,
00216 -0.38, 0.38,
00217 0.008,
00218 25)
00219 {}
00220 };
00221
00222 class RobotDimensionsERS7 : public RobotDimensions
00223 {
00224 public:
00225 RobotDimensionsERS7()
00226 : RobotDimensions(
00227 81.06,
00228 14.6,
00229 20.0,
00230 80.0,
00231
00232 125.0,
00233 134.4,
00234 180.15,
00235 9.0,
00236 69.5,
00237 28.3,
00238 71.5,
00239 21.3,
00240 76.5,
00241 130.0,
00242 2.5,
00243 19.5,
00244 0.524,
00245 230.0,
00246 80.0,
00247 52.0,
00248 13.0,
00249 22.5,
00250
00251 -2.0944, 2.3562,
00252 -2.3562, 2.0944,
00253 -0.2618, 1.6232,
00254 -0.5236, 2.2166,
00255 -1.3963, 0.0524,
00256 -1.6232, 1.6232,
00257 -0.3491, 0.8727,
00258 +0.0000, 1.1345,
00259 -1.0472, 1.0472,
00260 0.008,
00261 30)
00262 {}
00263 };
00264 #endif