]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
Merge branch 'lidars' into ketchup_house
authorMatous Pokorny <matous.pokorny@me.com>
Tue, 4 Jun 2013 21:39:16 +0000 (23:39 +0200)
committerMatous Pokorny <matous.pokorny@me.com>
Tue, 4 Jun 2013 21:39:16 +0000 (23:39 +0200)
1  2 
src/robofsm/common-states.cc
src/robofsm/map_handling.cc
src/robofsm/map_handling.h
src/robofsm/robot.h
src/robofsm/robot_orte.c
src/robofsm/sub-states.cc

index 30caa0740fb897203197eea66d539d1b8a4bcfac,11759ed1527d2ab56f581bd72396021fac69d08e..cf4abe1e6f6fb306f6214f85d79467a94e090f85
@@@ -90,7 -90,7 +90,7 @@@ bool close_goal(double goalx, double go
   */
  static bool detect_target()
  {
--        struct hokuyo_scan_type hokuyo = robot.hokuyo;
++        struct lidar_scan_type hokuyo = robot.hokuyo;
  
          Shape_detect sd;
          std::vector<Shape_detect::Arc> arcs;
index d062d38eb9bcf56d6b43514ba695e6dbdebff207,68af78780374b09df5dfec40f6621cc40e6cd13a..a19dfa910d12aca70212e4e69da23841326cca34
@@@ -66,7 -129,67 +66,7 @@@ void obst_coord(struct robot_pos_type *
        *y = sy+v*sin(sa);
  }
  
- void update_map_hokuyo(struct hokuyo_scan_type *s)
 -void get_checkerboard(std::vector<Shape_detect::Point> &team)
 -{
 -      Shape_detect::Point tmp, newPoint, start;
 -      unsigned int i;
 -
 -      if (robot.team_color) {
 -              start.x = 0.625;
 -              start.y = 0.525;
 -      } else {
 -              start.x = 0.975;
 -              start.y = 0.525;
 -
 -      }
 -
 -      tmp = start;
 -
 -      for (i = 1; i < 4; i++) {
 -              for (int j = 0; j < 3; j++) {
 -                      newPoint.y = tmp.y + 0.7 * j;
 -                      newPoint.x = tmp.x;
 -                      team.push_back(newPoint);
 -              }
 -              tmp.x = tmp.x + 0.7;
 -      }
 -
 -      if (robot.team_color) {
 -              tmp.x = start.x + 0.35;
 -              tmp.y = start.y + 0.35;
 -      } else {
 -              tmp.x = start.x - 0.35;
 -              tmp.y = start.y + 0.35;
 -
 -      }
 -
 -      for (i = 1; i < 4; i++) {
 -              for (int j = 0; j < 2; j++) {
 -                      newPoint.y = tmp.y + 0.7 * j;
 -                      newPoint.x = tmp.x;
 -                      team.push_back(newPoint);
 -              }
 -              tmp.x = tmp.x + 0.7;
 -      }
 -
 -      if (robot.team_color) {
 -              tmp.x = 1.675;
 -              tmp.y = 0.175;
 -      } else {
 -              tmp.x = 1.325;
 -              tmp.y = 0.175;
 -
 -      }
 -
 -      team.push_back(tmp);
 -}
 -
 -inline float point_distance(Shape_detect::Point a, Shape_detect::Point b)
 -{
 -      return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
 -}
 -
+ void update_map_hokuyo(struct lidar_scan_type *s)
  {
        double x, y;
        struct robot_pos_type e;
index b13834999a0a2a81f2ad56173fa036ddb55486ee,22fdd02a971c545b778b0d30acf6da927ce7805f..a7092ac110a11ec5b5e1424b4e663e4e7a379ed3
@@@ -7,8 -7,9 +7,8 @@@
  extern "C" {
  #endif
  
 -void * thread_obstacle_forgeting(void * arg);
 -/*void update_map(struct sharps_type *s);*/
 +void * thread_target_detecion(void * arg);
- void update_map_hokuyo(struct hokuyo_scan_type *s);
+ void update_map_hokuyo(struct lidar_scan_type *s);
  
  #ifdef __cplusplus
  }
Simple merge
Simple merge
index 2c833404724d15772dabfb10a39c6dfd0ad3c619,57e667d72ef76f672d6867eb28e76fbe5dab8057..6f8c6949e2592e05e86e4ba109c2a17a8bcbd0c6
@@@ -50,7 -50,7 +50,7 @@@ void get_hokuyo_min(double *alpha, doub
          double min = 1000;
          int min_i;
  
--        struct hokuyo_scan_type scan = robot.hokuyo;
++        struct lidar_scan_type scan = robot.hokuyo;
          uint16_t *data = scan.data;
  
          for (int i = 0; i < HOKUYO_ARRAY_SIZE; i++) {