Posted 28 October 2023
Field test starting in bedroom hallway, just before MBR door. I have elected to start here, as WallE3 has been consistently making it this far with no problems whatsoever. Everything wen OK except for a couple of strange occurrences where it appeared that WallE3 was simply going straight without tracking anything. One of these occurrences was right at the end of the run. Here’s the video of the run:
And here’s the telemetry:
|
1 |
The strange behavior occurs just after WallE3 changed from the left to right-hand wall when it hits the open doorway of the larger guest bedroom, and then makes the hard right-hand turn to follow the near wall when it exits the hallway into the dining room area.
From the video, this occurs at approximately 203 sec, so I have excerpted the telemetry starting at the point where the robot transitions from the left to right wall.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
Stopping Motors! Anomaly Code is 8 --> EXCESS_STEER_VAL 199.9: Top of loop() - calling UpdateAllEnvironmentParameters() Battery Voltage = 7.43 Just after first UpdateAllEnvironmentParameters() & 200mSec delay at top of loop() 200.3: gl_Left/RightCenterCm = 115.4/57.9, Left/RightSteerVal = 1.00/-0.09 Just before call to HandleAnomalousConditions() with anomaly code = EXCESS_STEER_VAL In HandleAnomalousConditions(LEFT) with last anomaly code = EXCESS_STEER_VAL In HandleAnomalousConditions(LEFT) ANOMALY_EXCESS_STEER_VAL CASE- Top of HandleExcessSteervalCase(LEFT) 201179: gl_Left/RightCenterCm = 120.2/56.7, Left/RightSteerVal = 1.00/-0.06 HandleExcessSteervalCase(LEFT) open doorway block In RotateToParallelOrientation(RIGHT) RTPO: starting front/rear/steer avgs = 57.87/58.87/-0.10 Calling SpinTurn() for angle = -5.7 RTPO: ending front/rear/steer avgs = 57.80/58.04/-0.02 RTPO: GetWallOrientDeg(-0.02) returned ending orientation of -1.37 deg TrackRightWallOffset(350.0, 0.0, 20.0, 30) called TrackRightWallOffset: Start tracking offset of 30cm at 205.8 Calling CaptureWallOffset(TRACKING_RIGHT, 57.5) Hdg Dist After SpinTurn, Hdg/Dist = -94.8/56 MTFD: at start, tgt = 30cm, curr_dist = 56, front/rear var = 83325/13332 MTFD: Stopped with front dist = 32, anomaly code = NONE In RotateToParallelOrientation(RIGHT) RTPO: starting front/rear/steer avgs = 30.32/29.45/0.09 End of CaptureWallOffset Just after CaptureWallOffset(TRACKING_RIGHT, 29.8) Sec LCen RCen Deg RF RR RStr Front Rear FVar RVar LSpd RSpd ACODE TRKDIR 213.4 104.6 29.7 173.2 30.6 29.8 0.08 249 116 132873 7073 94 55 NONE RIGHT 213.5 121.9 29.8 173.4 30.5 29.6 0.09 245 120 132900 7029 99 50 NONE RIGHT 213.5 123.0 29.7 174.8 30.2 29.5 0.07 235 117 132794 7001 92 57 NONE RIGHT 213.6 140.5 29.8 176.9 30.6 29.8 0.08 236 121 132460 6973 95 54 NONE RIGHT 213.6 129.4 29.5 179.6 29.7 29.6 0.01 452 121 131672 6956 72 77 NONE RIGHT 213.7 123.9 29.4 -179.5 29.9 29.9 0.00 451 121 130684 6947 68 81 NONE RIGHT 213.7 119.6 29.4 -179.2 29.9 30.1 -0.02 445 121 129454 6947 61 88 NONE RIGHT 213.8 114.2 29.5 -179.4 29.5 30.4 -0.09 442 124 127968 6947 37 112 NONE RIGHT 213.8 124.4 29.3 179.8 29.5 30.0 -0.05 443 133 126211 6939 49 100 NONE RIGHT 213.9 120.9 29.0 178.0 29.6 29.8 -0.11 435 123 124125 6957 24 125 NONE RIGHT 213.9 126.5 28.6 176.1 29.5 29.8 -0.03 222 140 121819 6952 48 101 NONE RIGHT 214.0 126.2 28.6 174.7 29.7 29.8 -0.03 216 128 119045 6976 50 99 NONE RIGHT 214.0 123.4 29.3 173.8 29.7 29.6 0.01 213 128 115742 7005 70 79 NONE RIGHT 214.1 123.1 29.9 172.6 30.0 29.5 0.05 223 127 111820 7043 84 65 NONE RIGHT 214.1 118.6 29.4 171.8 30.4 29.4 0.10 261 127 107197 7086 102 48 NONE RIGHT 214.2 114.4 29.9 172.5 31.2 29.7 0.15 250 129 101960 7132 112 37 NONE RIGHT 214.2 133.2 30.3 173.4 30.9 30.2 0.07 224 136 96084 7171 100 49 NONE RIGHT 214.3 120.3 30.3 174.1 31.3 30.2 0.07 206 148 89494 7193 99 50 NONE RIGHT 214.3 121.9 30.4 175.4 31.3 30.4 0.09 203 139 82097 7235 106 43 NONE RIGHT 214.4 108.5 30.8 176.7 31.2 31.0 0.02 208 142 73831 7276 83 66 NONE RIGHT 214.4 97.5 30.5 178.4 31.0 31.3 -0.03 222 140 64657 7326 65 84 NONE RIGHT 214.5 93.4 30.6 178.8 31.0 31.1 -0.01 302 132 54716 7392 71 78 NONE RIGHT 214.6 84.8 30.7 178.8 31.0 31.5 -0.05 306 151 43891 7430 58 91 NONE RIGHT 214.6 78.5 30.6 178.4 31.1 31.8 -0.07 206 154 31824 7467 50 99 NONE RIGHT 214.7 75.6 30.5 177.6 31.0 31.9 -0.09 189 174 18625 7483 43 106 NONE RIGHT 214.7 72.0 30.6 176.5 30.4 30.8 -0.04 198 168 18404 7506 60 90 NONE RIGHT 214.8 69.3 30.6 175.9 30.4 31.5 -0.11 193 143 18161 7565 31 118 NONE RIGHT 214.8 66.8 30.7 175.3 31.3 30.7 0.06 186 168 17899 7592 92 57 NONE RIGHT 214.8 66.8 31.0 174.7 31.3 30.7 0.06 181 168 17620 7621 102 47 NONE RIGHT 214.9 65.5 31.0 174.1 31.3 31.5 -0.02 180 143 17327 7682 76 73 NONE RIGHT 214.9 64.2 30.5 174.2 31.4 31.2 0.02 179 138 17020 7752 81 68 NONE RIGHT 215.0 62.0 31.1 174.5 31.4 31.4 0.00 174 142 16697 7813 82 68 NONE RIGHT 215.0 62.5 31.5 174.9 31.7 31.3 0.06 173 154 16359 7857 101 48 NONE RIGHT 215.1 61.7 31.0 175.0 32.5 31.3 0.04 175 148 16002 7906 96 53 NONE RIGHT 215.1 61.2 31.2 175.5 33.1 31.4 0.17 170 160 15630 7937 127 17 NONE RIGHT 215.2 61.4 30.9 176.8 34.0 31.8 0.22 183 162 15233 7964 127 12 NONE RIGHT 215.2 61.0 31.1 179.3 36.0 31.7 0.43 180 112 14812 8067 127 0 NONE RIGHT RightSteer = 1.0, result = TRUE 215.3 62.3 33.5 -178.3 46.6 32.0 1.00 183 140 14368 8114 127 0 EXCESS_STEER_VAL RIGHT Stopping Motors! Error Code is 8 --> EXCESS_STEER_VAL 215.3: Top of loop() - calling UpdateAllEnvironmentParameters() Battery Voltage = 7.42 Just after first UpdateAllEnvironmentParameters() & 200mSec delay at top of loop() 215.7: gl_Left/RightCenterCm = 94.0/33.9, Left/RightSteerVal = -1.00/1.00 Just before call to HandleAnomalousConditions() with anomaly code = EXCESS_STEER_VAL In HandleAnomalousConditions(RIGHT) with last anomaly code = EXCESS_STEER_VAL In HandleAnomalousConditions(RIGHT) ANOMALY_EXCESS_STEER_VAL CASE- Top of HandleExcessSteervalCase(RIGHT) 216672: gl_Left/RightCenterCm = 219.7/77.2, Left/RightSteerVal = 1.00/-1.00 TrackRightWallOffset(350.0, 0.0, 20.0, 30) called TrackRightWallOffset: Start tracking offset of 30cm at 216.7 Calling CaptureWallOffset(TRACKING_RIGHT, 77.2) Hdg Dist After SpinTurn, Hdg/Dist = -71.0/93 MTFD: at start, tgt = 30cm, curr_dist = 91, front/rear var = 83325/13332 MTFD: Stopped with front dist = 24, anomaly code = NONE In RotateToParallelOrientation(RIGHT) RTPO: starting front/rear/steer avgs = 35.79/10.33/2.55 Calling SpinTurn() for angle = 145.5 |
At 215.3 sec WallE3 experiences another EXCESS_STEER_VAL anomaly (as the robot exits the hallway into the dining room area). WallE3 makes a slight right turn, moves forward a bit, and stops; this is the normal ‘move ahead one skosh’ after an EXCESS_STEER_VAL anomaly detection.
Then at 216.6 sec with gl_Left/RightCenterCm = 219.7/77.2, Left/RightSteerVal = 1.00/-1.00 it makes another right turn to, presumably, follow the right-hand wall, but it doesn’t try to capture the 30 cm offset and track – it just goes straight, eventually running into the wall on the far side of the open doorway into the kitchen area bathroom. From the telemetry it looks like WallE3 called ‘MoveToDesiredFrontDistCm() with a target distance of 30 cm as part of ‘CaptureWallOffset()’ but started the process almost parallel to the wall rather than perpendicular.
Matching the code up with the telemetry and the video, it becomes apparent that ‘HandleExcessSteervalCase(RIGHT)’ is called by HandleAnomalousConditions(RIGHT) as soon as the EXCESS_STEER_VAL anomaly is detected.
The first thing that HandleExcessSteervalCase() does is move forward for 500 mSec – the ‘skosh’ intended to clear the point where the anomaly occurred to obtain valid distance measurements. In this case, however, the video shows that the ‘forward’ direction was slanted off to the right instead of straight ahead, which meant that instead of detecting an ‘open corner’ condition with no trackable wall in range, the robot saw a trackable wall to the right at 77.2 cm, as the following telemetry line shows:
So, instead of the ‘open corner’ block in HandleExcessSteervalCase() executing, the ‘else if (trkcase == TRACKING_RIGHT)’ block was run , as shown below:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
else if (trkcase == TRACKING_RIGHT) { if (gl_RightCenterCm < MAX_TRACKING_DISTANCE_CM) { //09/30/23 have to handle case where tracking side is the ONLY side within tracking distance if (gl_LeftCenterCm > MAX_TRACKING_DISTANCE_CM) { //OK, no need to go through ChooseBetterTrackingSide() TrackRightWallOffset(WALL_OFFSET_TRACK_Kp, WALL_OFFSET_TRACK_Ki, WALL_OFFSET_TRACK_Kd, WALL_OFFSET_TGTDIST_CM); } //excess steerval anomaly occurred with tracking side dist < MAX_TRACKING_DISTANCE_CM //so this is the 'ChooseBestSide' case on right side newside = ChooseBetterTrackingSide(); if (newside == TRACKING_LEFT) { gl_pSerPort->printf("HandleExcessSteervalCase(%s): ChooseBetterTrackingSide() returned %s\n", WallTrackStrArray[newside]); TrackLeftWallOffset(WALL_OFFSET_TRACK_Kp, WALL_OFFSET_TRACK_Ki, WALL_OFFSET_TRACK_Kd, WALL_OFFSET_TGTDIST_CM); } else if (newside == TRACKING_RIGHT) { gl_pSerPort->printf("HandleExcessSteervalCase(%s): ChooseBetterTrackingSide() returned %s\n", WallTrackStrArray[newside]); TrackRightWallOffset(WALL_OFFSET_TRACK_Kp, WALL_OFFSET_TRACK_Ki, WALL_OFFSET_TRACK_Kd, WALL_OFFSET_TGTDIST_CM); } else //newside == TRACKING_NEITHER - should never happen { gl_pSerPort->printf("HandleExcessSteervalCase(%s): ChooseBetterTrackingSide() returned %s! Should never happen - quitting!\n", WallTrackStrArray[newside]); while (true) { CheckForUserInput(); delay(100); } } } else if (gl_RightCenterCm >= MAX_TRACKING_DISTANCE_CM) { //excess steerval anomaly occurred with tracking side dist >= MAX_TRACKING_DISTANCE_CM //so this is 'open corner' or 'open doorway case on right side. if (gl_LeftCenterCm >= MAX_TRACKING_DISTANCE_CM) { //'open corner' case gl_pSerPort->printf("HandleExcessSteervalCase(%s) open corner block\n", WallTrackStrArray[trkcase]); SpinTurn(trkcase == TRACKING_LEFT, 90);//CW 90deg turn RunBothMotorsMsec(true, 1000); UpdateAllEnvironmentParameters(); gl_pSerPort->printf("HandleExcessSteervalCase(RIGHT) open corner block after turn and move: gl_Left/RightCenterCm = %2.1f/%2.1f, Left/RightSteerVal = %2.2f/%2.2f\n", gl_LeftCenterCm, gl_RightCenterCm, gl_LeftSteeringVal, gl_RightSteeringVal); TrackRightWallOffset(WALL_OFFSET_TRACK_Kp, WALL_OFFSET_TRACK_Ki, WALL_OFFSET_TRACK_Kd, WALL_OFFSET_TGTDIST_CM); } else if (gl_LeftCenterCm < MAX_TRACKING_DISTANCE_CM) { //'open doorway' case gl_pSerPort->printf("HandleExcessSteervalCase(%s) open doorway block\n", WallTrackStrArray[trkcase]); RotateToParallelOrientation(TRACKING_LEFT); TrackLeftWallOffset(WALL_OFFSET_TRACK_Kp, WALL_OFFSET_TRACK_Ki, WALL_OFFSET_TRACK_Kd, WALL_OFFSET_TGTDIST_CM); } else { //should never happen! gl_pSerPort->printf("HandleExcessSteervalCase(%s) else block - should never execute!\n", WallTrackStrArray[trkcase]); } } } |
Since HandleExcessSteervalCase was called with TRACKING_RIGHT, and because gl_RightCenterCm = 77.2 was less than MAX_TRACKING_DISTANCE_CM (100 cm), ‘TrackRightWallOffset(WALL_OFFSET_TRACK_Kp, WALL_OFFSET_TRACK_Ki, WALL_OFFSET_TRACK_Kd, WALL_OFFSET_TGTDIST_CM)’ was called without running ‘ChooseBetterTrackingSide()’.
In TrackRightWallOffset(), CaptureWallOffset(TRACKING_RIGHT, 77.2) was called because the starting offset was too high for immediate tracking. In CaptureWallOffset(), a 90º CW turn was performed to (supposedly) point WallE3 directly at the wall to be tracked, and then ‘MoveToDesiredFrontDistCm(tgt_offset_cm)’ was called to capture the wall offset of 30 cm.
Unfortunately, the 90º CW turn step assumes the robot is already oriented parallel to the wall to be tracked, but because the actual physical configuration at this point was an open corner instead of an open doorway, WallE3 wasn’t at all parallel to the wall. So, the turn just oriented the robot to about 40-45º to the wall rather than 90º. The next step in the offset capture routine is to call MoveToDesiredFrontDistCm() to move the robot to the desired offset distance (in this case, 30 cm). But the front distance measurement never got down to 30 cm, as the robot wound up running along the baseboard, parallel to the wall. This would have continued indefinitely except WallE3 ran into the far edge of the doorway into the kitchen area bathroom.
So, everything worked just like it was supposed to, except that when the robot exited the bedroom hallway it was turned just enough so that it saw what looked like a trackable wall to the right, instead of gl_LeftCenterCm & gl_RightCenterCm > MAX_TRACKING_DIST_CM, so the open corner case wasn’t executed.
To fix this problem (and hopefully not create other ones) I added the condition that to bypass the ‘open corner’ case, the absolute value of the ‘trackable side’ steering value must be less than 1/2 the max steerval of +/- 1.
Well, that didn’t work as well as I thought. I made another field run, this time starting just before the end of the bedroom hallway where it opens into the dining area. What should have happened is the robot should have detected the ‘open corner’ configuration, made a 90º CW turn and carried on tracking the right-hand wall. What actually happened wasn’t that. Here’s a short video showing the action, along with the telemetry from the run
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
TrackRightWallOffset: Start tracking offset of 30cm at 0.5 Just after CaptureWallOffset(TRACKING_RIGHT, 25.0) Sec LCen RCen Deg RF RR RStr Front Rear FVar RVar LSpd RSpd ACODE TRKDIR 0.6 68.1 25.6 0.2 26.3 24.5 0.18 516 128 67035 12327 94 55 NONE RIGHT 0.6 70.0 23.2 0.4 23.9 24.7 -0.08 509 126 62845 12022 3 127 NONE RIGHT 0.7 67.9 23.0 -0.2 26.4 24.6 0.18 522 131 58857 11723 77 72 NONE RIGHT 0.8 71.1 25.0 -2.5 24.5 24.6 -0.01 525 136 55079 11430 39 110 NONE RIGHT 0.8 67.9 23.7 -3.5 24.7 23.7 0.10 288 129 52970 11158 59 90 NONE RIGHT 0.9 70.1 23.4 -4.5 24.5 24.5 0.00 295 156 51100 10864 28 122 NONE RIGHT 0.9 70.1 25.3 -5.3 27.0 24.5 0.25 290 129 49586 10616 108 41 NONE RIGHT 1.0 68.3 23.8 -6.1 25.0 23.9 0.11 283 184 48444 10323 67 82 NONE RIGHT 1.0 68.3 24.5 -5.5 24.9 24.6 0.03 287 138 47539 10086 44 105 NONE RIGHT 1.1 69.9 24.3 -5.5 25.2 24.6 0.06 292 156 46848 9837 53 96 NONE RIGHT 1.1 67.7 24.3 -5.9 25.0 24.6 0.06 274 137 46617 9625 54 96 NONE RIGHT 1.1 69.1 24.5 -6.5 25.5 24.8 0.02 276 150 46605 9405 40 109 NONE RIGHT 1.2 70.3 24.5 -8.0 25.5 25.1 0.04 287 151 46693 9195 46 103 NONE RIGHT 1.3 71.1 25.3 -9.6 26.4 25.8 0.06 455 211 45664 8953 60 89 NONE RIGHT 1.4 69.7 26.0 -10.7 27.4 25.9 0.15 325 160 45760 8752 90 59 NONE RIGHT 1.4 69.1 26.5 -11.2 27.8 26.1 0.17 297 174 46324 8546 99 50 NONE RIGHT 1.4 68.3 27.1 -11.1 27.3 26.4 0.09 299 174 47025 8350 86 63 NONE RIGHT 1.5 68.0 27.0 -10.2 28.3 25.9 0.24 317 154 47681 8187 121 28 NONE RIGHT 1.5 67.9 27.1 -9.1 28.3 26.7 0.16 337 196 48269 7995 104 45 NONE RIGHT 1.6 68.4 27.8 -7.3 29.0 26.5 0.25 471 149 48108 7858 119 30 NONE RIGHT 1.7 69.6 27.8 -5.6 29.0 27.5 0.15 247 153 49868 7727 100 49 NONE RIGHT 1.7 69.6 27.5 -4.2 28.7 27.7 0.10 253 153 51593 7606 89 60 NONE RIGHT 1.8 73.1 27.5 -3.0 28.3 27.7 0.10 253 144 53332 7506 89 61 NONE RIGHT 1.8 93.8 27.3 -1.4 28.4 28.5 -0.01 252 152 55068 7405 52 97 NONE RIGHT 1.9 112.1 27.3 -1.0 28.9 28.0 0.09 463 154 55201 7309 83 66 NONE RIGHT 1.9 110.9 27.8 -1.3 28.4 27.9 0.03 463 147 55328 7233 65 84 NONE RIGHT 2.0 109.8 27.2 -1.4 28.4 28.2 0.02 458 158 55445 7151 61 88 NONE RIGHT 2.1 101.9 27.8 -1.9 28.3 28.8 -0.05 461 176 55503 7056 37 112 NONE RIGHT 2.1 110.7 27.4 -2.6 28.1 27.7 0.04 261 127 56864 7042 66 83 NONE RIGHT 2.2 97.7 27.7 -3.5 28.5 27.9 0.06 243 153 58239 6991 74 75 NONE RIGHT 2.2 102.7 27.8 -3.9 28.3 29.2 -0.09 240 164 59419 6933 25 124 NONE RIGHT 2.2 116.9 28.2 -4.1 28.3 28.9 -0.06 237 168 60366 6878 39 111 NONE RIGHT 2.3 103.1 28.3 -4.9 28.7 28.7 0.00 233 168 61051 6831 59 90 NONE RIGHT 2.3 103.1 28.2 -5.4 29.3 28.5 0.08 228 143 61442 6826 87 62 NONE RIGHT 2.3 117.7 28.2 -5.9 29.3 28.5 0.08 229 150 61435 6816 89 61 NONE RIGHT 2.4 98.8 28.7 -6.2 29.1 27.8 0.13 223 161 61058 6797 98 51 NONE RIGHT 2.4 109.1 28.7 -6.1 29.8 28.6 0.12 225 244 60187 6742 96 53 NONE RIGHT 2.5 109.1 28.5 -5.7 29.5 29.2 0.03 223 244 58820 6690 72 77 NONE RIGHT 2.5 116.8 28.5 -5.3 29.5 29.2 0.03 224 162 56884 6688 71 78 NONE RIGHT 2.5 116.0 29.4 -4.8 29.6 29.2 0.04 225 145 54336 6718 81 68 NONE RIGHT 2.6 113.8 29.1 -4.7 29.8 29.5 0.03 225 155 51140 6736 78 71 NONE RIGHT 2.6 114.3 29.2 -4.6 30.0 29.3 0.07 219 161 47292 6751 91 58 NONE RIGHT 2.7 129.9 29.4 -4.2 30.2 29.7 0.05 216 159 42715 6772 85 64 NONE RIGHT 2.7 112.7 29.4 -3.8 29.9 29.9 0.00 217 141 37332 6825 69 81 NONE RIGHT 2.8 111.4 30.3 -3.5 30.1 29.9 -0.01 219 148 31091 6870 71 78 NONE RIGHT 2.8 122.5 29.6 -3.5 30.2 30.0 0.02 215 149 23972 6916 74 75 NONE RIGHT 2.9 117.6 30.1 -3.5 30.4 30.9 -0.05 213 144 15910 6975 58 91 NONE RIGHT 2.9 114.5 29.9 -3.7 30.8 30.3 0.05 214 146 11182 7033 83 66 NONE RIGHT 3.0 108.1 30.4 -3.8 30.5 29.7 0.08 207 143 10525 7098 102 48 NONE RIGHT 3.0 107.6 29.8 -3.4 30.5 30.6 -0.01 203 124 9807 7197 66 83 NONE RIGHT 3.1 100.1 30.2 -2.9 30.8 30.6 0.02 209 150 8986 7252 81 69 NONE RIGHT 3.2 103.6 30.1 -2.6 30.8 30.8 -0.04 212 141 8143 7320 62 87 NONE RIGHT 3.2 88.3 29.9 -2.6 31.4 30.7 0.07 206 141 7125 7389 90 59 NONE RIGHT 3.3 86.9 30.3 -2.4 31.2 31.0 0.02 207 142 5994 7455 82 67 NONE RIGHT 3.4 79.2 30.1 -2.1 31.1 31.0 0.01 206 142 6080 7521 78 71 NONE RIGHT 3.4 73.4 30.1 -1.8 31.4 30.9 0.05 202 132 6165 7602 91 58 NONE RIGHT 3.5 68.2 30.5 -1.6 31.5 31.8 -0.03 192 127 6276 7690 66 83 NONE RIGHT 3.5 64.7 30.3 -1.4 31.0 31.3 -0.03 181 135 6421 7758 64 85 NONE RIGHT 3.6 63.1 29.9 -1.5 30.8 31.1 -0.05 188 131 6531 7831 51 98 NONE RIGHT 3.6 62.2 30.1 -2.1 31.0 31.2 -0.02 190 132 6623 7898 67 83 NONE RIGHT 3.7 62.4 30.2 -2.6 30.9 30.8 0.01 187 126 6731 7969 77 72 NONE RIGHT 3.7 61.4 30.4 -3.2 30.6 31.3 -0.07 184 134 6840 8022 52 97 NONE RIGHT 3.8 61.4 30.1 -3.7 30.6 31.0 -0.04 179 136 6947 8064 60 89 NONE RIGHT 3.8 61.7 30.2 -3.8 31.3 30.8 0.05 180 136 6248 8099 90 59 NONE RIGHT 3.9 61.7 30.1 -3.7 34.4 30.8 0.05 186 132 6216 8135 92 57 NONE RIGHT 3.9 62.0 30.1 -3.6 34.4 30.9 0.35 182 141 6251 8150 127 0 NONE RIGHT RightSteer = 1.0, result = TRUE 3.9 61.4 30.8 -3.1 43.1 30.7 1.00 191 135 6251 8163 127 0 EXCESS_STEER_VAL RIGHT Stopping Motors! Error Code is 8 --> EXCESS_STEER_VAL 4.0: Top of loop() - calling UpdateAllEnvironmentParameters() Battery Voltage = 7.48 Just after first UpdateAllEnvironmentParameters() & 200mSec delay at top of loop() 4.4: gl_Left/RightCenterCm = 72.7/130.3, Left/RightSteerVal = 0.45/1.00 Just before call to HandleAnomalousConditions() with anomaly code = EXCESS_STEER_VAL In HandleAnomalousConditions(RIGHT) with last anomaly code = EXCESS_STEER_VAL In HandleAnomalousConditions(RIGHT) ANOMALY_EXCESS_STEER_VAL CASE- Top of HandleExcessSteervalCase(RIGHT) 5246: gl_Left/RightCenterCm = 83.6/250.5, Left/RightSteerVal = 1.00/1.00 HandleExcessSteervalCase(RIGHT) open doorway block In RotateToParallelOrientation(LEFT) TrackLeftWallOffset(350.0, 0.0, 20.0, 30) called TrackLeftWallOffset: Start tracking offset of 30cm at 9.5 Calling CaptureWallOffset(TRACKING_LEFT, 118.2) Hdg Dist After SpinTurn, Hdg/Dist = -164.6/211 MTFD: at start, tgt = 30cm, curr_dist = 125, front/rear var = 83325/13332 MTFD: Stopped with front dist = 28, anomaly code = NONE In RotateToParallelOrientation(LEFT) End of CaptureWallOffset Just after CaptureWallOffset(TRACKING_LEFT, 184.2) Sec LCen RCen Deg LF LR LStr Front Rear FVar RVar LSpd RSpd ACODE TRKDIR 26.7 186.6 90.0 163.1 186.9 185.2 0.17 32 8 5898 7674 0 127 NONE LEFT 26.8 185.0 91.4 156.8 188.3 188.6 -0.03 32 7 5366 9110 0 127 NONE LEFT Stopping Motors! Anomaly Code is 4 --> WALL_OFFSET_DIST_AHEAD 26.8: Top of loop() - calling UpdateAllEnvironmentParameters() |
So, it appears the same sort of thing happened again, only this time it was the left-side distance that was less than MAX_TRACKING_DIST_CM. Since both steervals were +/- 1 this should have caused the ‘open corner’ block to execute.
Fixed (again!). Running another test.
ALRIGHT!! This time things worked just like they are supposed to! Here’s a short video showing the action, and the telemetry from the run.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
TrackRightWallOffset(350.0, 0.0, 20.0, 30) called TrackRightWallOffset: Start tracking offset of 30cm at 0.5 Just after CaptureWallOffset(TRACKING_RIGHT, 25.0) Sec LCen RCen Deg RF RR RStr Front Rear FVar RVar LSpd RSpd ACODE TRKDIR 0.6 68.2 23.0 0.0 23.2 23.9 0.18 538 105 67032 12453 81 68 NONE RIGHT 0.6 68.5 23.1 0.1 27.1 24.7 -0.15 543 114 62791 12170 0 127 NONE RIGHT 0.7 69.5 25.4 -0.8 23.1 24.6 0.25 554 106 58747 11918 105 44 NONE RIGHT 0.7 71.1 24.6 -2.6 26.2 24.1 0.21 540 104 54902 11680 93 56 NONE RIGHT 0.8 68.5 24.9 -2.0 23.5 24.2 -0.07 545 104 51261 11458 13 127 NONE RIGHT 0.8 70.1 22.8 -1.7 25.9 24.5 0.14 540 116 47836 11225 58 92 NONE RIGHT 0.9 71.5 25.1 -2.8 23.3 23.8 -0.05 544 110 44618 11015 24 125 NONE RIGHT 1.0 69.3 24.9 -4.1 24.8 24.1 0.07 532 111 41638 10817 55 94 NONE RIGHT 1.0 70.9 24.7 -5.5 25.4 23.8 0.16 419 112 39410 10628 80 69 NONE RIGHT 1.1 69.6 24.7 -6.5 23.0 23.7 -0.07 313 108 38415 10461 12 127 NONE RIGHT 1.1 69.6 23.2 -6.9 26.6 23.7 -0.07 303 108 37810 10307 1 127 NONE RIGHT 1.1 70.8 23.2 -8.0 26.6 23.9 0.27 306 111 37432 10158 93 56 NONE RIGHT 1.2 67.9 25.5 -9.4 27.2 24.1 0.31 301 111 37360 10021 119 30 NONE RIGHT 1.3 70.8 23.7 -8.5 24.8 24.5 0.03 311 113 37405 9890 41 108 NONE RIGHT 1.3 68.6 24.4 -7.4 24.7 24.4 0.03 292 113 37888 9772 43 106 NONE RIGHT 1.4 68.9 24.0 -7.8 24.8 24.8 0.00 299 118 38485 9656 33 116 NONE RIGHT 1.4 68.4 24.2 -8.5 24.3 24.7 -0.04 287 123 39405 9539 19 127 NONE RIGHT 1.5 70.0 24.4 -10.8 25.4 24.9 0.05 402 118 39350 9442 48 101 NONE RIGHT 1.6 69.0 25.3 -13.0 26.3 25.3 0.10 354 125 39853 9345 73 76 NONE RIGHT 1.6 69.3 24.9 -14.3 26.6 24.5 0.21 319 130 40837 9249 91 58 NONE RIGHT 1.6 69.5 25.6 -15.1 28.0 25.9 0.21 327 135 41839 9153 99 50 NONE RIGHT 1.7 69.3 27.2 -14.6 28.0 26.6 0.14 316 137 43036 9063 96 53 NONE RIGHT 1.7 69.3 26.8 -13.9 27.9 26.2 0.17 312 136 44331 8985 99 50 NONE RIGHT 1.8 67.9 27.4 -13.3 28.1 26.7 0.14 306 129 45718 8928 96 53 NONE RIGHT 1.8 67.4 27.4 -12.5 28.2 26.7 0.15 308 129 47086 8881 99 50 NONE RIGHT 1.9 67.2 27.3 -11.5 28.5 27.2 0.13 341 142 48110 8819 92 57 NONE RIGHT 2.0 66.6 28.0 -10.5 28.7 27.7 0.10 440 135 48417 8777 95 54 NONE RIGHT 2.0 65.6 28.5 -9.5 29.0 27.8 0.12 486 145 48509 8727 96 54 NONE RIGHT 2.1 65.4 28.6 -8.6 29.9 28.3 0.16 367 143 49176 8688 109 40 NONE RIGHT 2.1 65.8 28.7 -8.0 29.4 28.3 0.16 251 146 50848 8653 110 40 NONE RIGHT 2.2 66.9 28.7 -7.3 29.4 28.5 0.09 255 167 52273 8600 93 56 NONE RIGHT 2.2 67.9 28.9 -6.4 29.2 29.5 -0.03 255 140 53464 8587 52 97 NONE RIGHT 2.3 71.8 28.5 -5.6 29.1 28.5 0.06 255 152 54383 8565 80 69 NONE RIGHT 2.3 77.8 28.6 -5.6 29.2 29.3 -0.01 259 130 54954 8581 58 91 NONE RIGHT 2.3 77.8 28.6 -5.7 29.2 28.9 0.03 256 130 55212 8603 70 79 NONE RIGHT 2.4 84.6 28.3 -5.9 28.9 29.3 -0.04 248 189 55163 8564 48 101 NONE RIGHT 2.4 88.7 28.3 -6.1 29.7 29.3 -0.04 251 194 54656 8526 47 103 NONE RIGHT 2.5 111.8 28.9 -6.7 29.7 29.3 0.04 252 158 53670 8525 73 76 NONE RIGHT 2.5 109.5 28.8 -7.4 29.5 29.9 -0.04 247 221 52216 8491 48 101 NONE RIGHT 2.5 103.6 29.2 -7.9 29.9 29.4 0.05 245 254 50220 8473 83 66 NONE RIGHT 2.6 108.4 29.0 -8.6 30.1 30.4 -0.03 233 128 47715 8530 59 90 NONE RIGHT 2.6 105.3 29.5 -8.7 30.4 29.6 0.09 219 162 44659 8540 97 52 NONE RIGHT 2.7 108.7 30.0 -9.0 30.2 29.9 0.03 224 202 40841 8525 86 63 NONE RIGHT 2.8 107.9 30.2 -8.5 30.9 30.1 0.08 223 155 36264 8550 102 48 NONE RIGHT 2.8 107.9 30.2 -8.1 31.1 30.4 0.07 221 194 30882 8544 99 50 NONE RIGHT 2.8 107.6 30.2 -7.5 31.1 30.4 0.07 230 189 24580 8544 99 50 NONE RIGHT 2.9 109.4 30.4 -6.6 31.4 30.8 0.06 229 150 17373 8584 96 53 NONE RIGHT 2.9 108.0 30.5 -5.5 31.4 31.0 0.03 228 200 13168 8582 86 63 NONE RIGHT 3.0 119.2 30.8 -4.3 31.0 31.5 -0.05 233 280 12562 8616 59 90 NONE RIGHT 3.1 110.1 29.9 -4.3 31.2 31.1 0.01 235 246 11847 8621 70 79 NONE RIGHT 3.1 119.1 30.2 -4.7 31.1 32.1 -0.10 227 217 11153 8619 41 108 NONE RIGHT 3.2 112.1 30.4 -5.3 30.9 31.1 -0.02 225 170 10345 8643 66 83 NONE RIGHT 3.2 124.7 30.3 -6.1 31.4 31.4 0.00 221 208 9366 8645 74 75 NONE RIGHT 3.3 113.8 30.5 -6.8 31.2 31.2 0.00 212 208 8465 8646 75 75 NONE RIGHT 3.3 113.8 30.7 -7.1 31.6 31.2 0.00 211 168 7433 8673 75 75 NONE RIGHT 3.3 123.7 30.7 -7.3 31.6 31.4 0.02 206 268 6379 8696 81 68 NONE RIGHT 3.4 120.0 30.8 -7.5 31.8 31.7 0.01 207 190 5190 8703 78 71 NONE RIGHT 3.4 120.5 31.4 -7.4 31.7 31.5 0.02 205 208 4042 8701 88 61 NONE RIGHT 3.5 115.4 31.4 -7.2 32.5 32.1 0.04 200 183 3742 8708 95 54 NONE RIGHT 3.5 114.9 31.3 -6.7 32.5 32.1 0.04 205 179 3798 8716 96 54 NONE RIGHT 3.6 112.2 32.1 -6.0 32.1 32.4 -0.03 198 240 3879 8711 79 70 NONE RIGHT 3.6 111.8 31.8 -5.2 32.6 32.4 0.00 206 204 3927 8700 81 68 NONE RIGHT 3.7 101.7 31.9 -4.8 32.4 32.7 -0.03 204 101 3978 8815 72 77 NONE RIGHT 3.8 95.1 31.6 -4.5 32.8 32.8 0.00 210 238 3992 8800 81 68 NONE RIGHT 3.8 82.0 32.0 -4.4 32.3 32.5 0.00 209 171 4030 8794 88 61 NONE RIGHT 3.9 79.9 31.7 -4.4 32.8 33.1 -0.03 204 284 4063 8814 72 77 NONE RIGHT 3.9 76.1 31.9 -4.1 32.5 33.2 -0.07 208 250 4098 8793 58 91 NONE RIGHT 4.0 71.1 31.8 -4.6 32.8 33.4 -0.13 191 182 3753 8764 31 118 NONE RIGHT 4.1 66.8 31.9 -5.4 32.5 33.0 -0.05 194 291 3611 8778 62 87 NONE RIGHT 4.1 64.1 31.9 -6.2 32.5 33.0 -0.05 189 222 3585 8728 64 85 NONE RIGHT 4.1 63.0 32.0 -6.8 33.1 32.8 0.03 181 191 3540 8674 97 52 NONE RIGHT 4.1 63.0 32.7 -7.3 32.6 32.8 0.03 178 191 3520 8612 99 50 NONE RIGHT 4.2 62.6 32.7 -7.4 32.6 33.1 -0.05 173 293 3509 8607 73 76 NONE RIGHT 4.2 61.2 32.6 -7.1 33.3 32.6 0.07 174 227 3498 8528 111 38 NONE RIGHT 4.3 60.8 32.0 -6.7 32.8 33.3 -0.05 171 238 3474 8446 73 76 NONE RIGHT 4.3 60.1 32.5 -6.2 33.0 33.1 -0.01 176 133 3301 8402 84 65 NONE RIGHT 4.4 59.2 32.3 -6.2 33.2 33.1 0.01 177 104 2453 8394 92 57 NONE RIGHT 4.4 59.3 32.5 -5.5 35.3 33.3 0.02 178 194 1100 8270 95 54 NONE RIGHT 4.5 59.3 33.8 -4.7 36.5 32.9 0.36 186 174 672 8143 127 0 NONE RIGHT RightSteer = 1.0, result = TRUE 4.5 59.6 34.5 -3.6 51.3 33.2 1.00 192 388 656 8335 127 0 EXCESS_STEER_VAL RIGHT Stopping Motors! Error Code is 8 --> EXCESS_STEER_VAL 4.6: Top of loop() - calling UpdateAllEnvironmentParameters() Battery Voltage = 7.47 Just after first UpdateAllEnvironmentParameters() & 200mSec delay at top of loop() 5.0: gl_Left/RightCenterCm = 78.4/79.5, Left/RightSteerVal = -0.16/1.00 Just before call to HandleAnomalousConditions() with anomaly code = EXCESS_STEER_VAL In HandleAnomalousConditions(RIGHT) with last anomaly code = EXCESS_STEER_VAL In HandleAnomalousConditions(RIGHT) ANOMALY_EXCESS_STEER_VAL CASE- Top of HandleExcessSteervalCase(RIGHT) 5857: gl_Left/RightCenterCm = 84.1/235.6, Left/RightSteerVal = 1.00/1.00 HandleExcessSteervalCase(RIGHT) open corner block HandleExcessSteervalCase(RIGHT) open corner block after turn and move: gl_Left/RightCenterCm = 133.7/26.2, Left/RightSteerVal = 1.00/0.04 TrackRightWallOffset(350.0, 0.0, 20.0, 30) called TrackRightWallOffset: Start tracking offset of 30cm at 9.0 Just after CaptureWallOffset(TRACKING_RIGHT, 26.2) |
As can be seen from the video and telemetry, the ‘open corner’ configuration was properly detected even with gl_Left/RightCenterCm = 84.1/235.6, Left/RightSteerVal = 1.00/1.00 (left side within MAX_TRACKING_DIST_CM but abs(left steerval) > MAX_STEERVAL ). Yay!!
Stay Tuned,
Frank