SHARE
TWEET

Untitled

a guest Feb 25th, 2020 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         switch(obstacle.zone) {
  2.             case ZcmObstacle::ZONE_RED:
  3.                 if (msg.index_red == -1 || obstacle.distance_x < msg.obstacles[msg.index_red].distance_x)
  4.                     msg.index_red = msg.obstacles.size() - 1;
  5.                 break;
  6.             case ZcmObstacle::ZONE_YELLOW:
  7.                 if (msg.index_yellow == -1 || obstacle.distance_x < msg.obstacles[msg.index_yellow].distance_x)
  8.                     msg.index_yellow = msg.obstacles.size() - 1;
  9.                 break;
  10.             case ZcmObstacle::ZONE_BROWN:
  11.                 if (msg.index_brown == -1 || obstacle.distance_x < msg.obstacles[msg.index_brown].distance_x)
  12.                     msg.index_brown = msg.obstacles.size() - 1;
  13.                 break;
  14.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top