]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
robofsm: Obstacle aviodance tuning
authorMichal Vokac <vokac.m@gmail.com>
Fri, 7 Jun 2013 12:26:48 +0000 (14:26 +0200)
committerMichal Vokac <vokac.m@gmail.com>
Fri, 7 Jun 2013 12:26:48 +0000 (14:26 +0200)
Disable obstacle avoidance system in robot initialization.
Enable hokuyo only in arena for localiation the bear.

src/robofsm/common-states.cc
src/robofsm/robot.c

index e951754bebd781177a1e2ab77f8789dba92c7540..5f326f1aed5accc4cde3fcbbc3ecb35348f120e2 100644 (file)
@@ -239,6 +239,7 @@ FSM_STATE(approach_target)
 
         switch(FSM_EVENT) {
                 case EV_ENTRY:
+                        enable_obstacle_avoidance(false);
                         DBG_PRINT_EVENT("approaching target");
 
                         get_approach_point(robot.target_pos.x, robot.target_pos.y, &x_approach, &y_approach, &phi_approach);
@@ -316,6 +317,7 @@ FSM_STATE(approach_arena)
                         FSM_TRANSITION(approach_target);
                         break;
                 case EV_TIMER:
+                        enable_obstacle_avoidance(true);
                         robot.target_localization_enab = true;
                         FSM_TRANSITION(move_around);
                         break;
index 311299b60e57ec2c7eaf22c7365a24e3f00bc906..419436e0ac86b6c344c40dc3a3e9291ef2e58c52 100644 (file)
@@ -135,8 +135,8 @@ int robot_init()
 
        robot_set_est_pos_trans(ROBOT_START_X_M, ROBOT_START_Y_M, DEG2RAD(ROBOT_START_ANGLE_DEG));
 
-       robot.ignore_hokuyo = false;
-        robot.ignore_sick = false;
+        robot.ignore_hokuyo = true;
+        robot.ignore_sick = true;
        robot.map = ShmapInit(1);
        fill_in_known_areas_in_map();
 
@@ -168,7 +168,7 @@ int robot_init()
        robot.use_left_bumper = false;
        robot.use_right_bumper = false;
        robot.start_state = POWER_ON;
-       robot.check_turn_safety = true;
+       robot.check_turn_safety = false;
 
        /* init ORTE domain, create publishers, subscribers, .. */
        rv = robot_init_orte();