]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/robofsm/robot.h
robofsm: Data from Sick Tim551 is updated in the map
[eurobot/public.git] / src / robofsm / robot.h
index 8e0714486c3ab2be9a2b8e9225d6e8b3d46a00f1..209a701234c9f4375706ee4449099115500fab9e 100644 (file)
@@ -29,8 +29,9 @@
  * Competition parameters
  */
 enum team_color {
-       VIOLET = 0,             /* Coordinate transformation does not apply */
-       RED                     /* Coordinate transformation applies (in *_trans() functions) */
+        TC_WHITE = 0,          /* Coordinate transformation does not apply */
+        TC_GREEN,
+        TC_YELLOW
 };
 
 enum robot_start_state {
@@ -103,6 +104,8 @@ extern struct lock_log robot_lock_log;
 #define __robot_lock_drives            lock
 #define __robot_lock_sharps            lock
 #define __robot_lock_hokuyo            lock
+#define __robot_lock_sick               lock
+#define __robot_lock_sick551            lock
 #define __robot_lock_cmu               lock
 #define __robot_lock_bumper            lock
 #define __robot_lock_disp              lock_disp
@@ -123,11 +126,13 @@ enum robot_component {
        COMPONENT_CAMERA,
        COMPONENT_POWER,
        COMPONENT_HOKUYO,
+       COMPONENT_SICK,
        COMPONENT_START,
        COMPONENT_JAWS,
        COMPONENT_LIFT,
 
        ROBOT_COMPONENT_NUMBER
+        COMPONENT_SICK551,
 };
 
 /* robot's main data structure */
@@ -198,8 +203,20 @@ struct robot {
        struct odo_data_type odo_data;          /* independent odometry */
        struct corr_distances_type corr_distances;      /* ultrasound */
 
-       struct hokuyo_scan_type hokuyo;
+       struct lidar_scan_type hokuyo;
        bool ignore_hokuyo;
+        
+        struct lidar_scan_type sick;
+        bool ignore_sick;
+
+        struct lidar_scan_type sick551;
+        bool ignore_sick551;
+
+        /* variables for target detection */
+        bool target_loaded;
+        bool target_valid;
+        int target_ang;
+        char target_color[3];
 
        struct map *map;        /* Map for pathplanning (no locking) */
 
@@ -231,8 +248,6 @@ int robot_init() __attribute__ ((warn_unused_result));
 int robot_start() __attribute__ ((warn_unused_result));
 void robot_exit();
 void robot_destroy();
-void robot_calibrate_odometry();
-
 void robot_get_est_pos_trans(double *x, double *y, double *phi);
 void robot_get_est_pos(double *x, double *y, double *phi);