|
|
back to boardI don't understand this sentence! How shall I decide whether the robot should turn left or right? And why LEFT in sample #1? Note that it does not matter whether the robot is moving forward or backward while following the route. You should consider this when calculating the turn direction - the turn angle should be minimal. Re: I don't understand this sentence! How shall I decide whether the robot should turn left or right? And why LEFT in sample #1? This means that when you want to reach a point at angle A, you can either move FRONT at angle A, or move BACK at angle A + 180, so you must choose the one closer to your current direction. That's why we have LEFT in first sample: -100 == 80, and 80 is closer to 0 than -100 is, so we turn LEFT to reach 80. When they say "angle to the next waypoint exceeds 20 degrees by absolute value", they actually mean "angle or Abs(180 - Abs(Angle)) exceeds 20 degrees by absolute value". |
|
|