]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
robofsm: Obstacle avoidance disabled by default
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 2 May 2008 13:49:52 +0000 (15:49 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 2 May 2008 13:49:52 +0000 (15:49 +0200)
src/robofsm/eb2008/fsmmove.cc
src/robofsm/eb2008/robot_eb2008.c
src/robofsm/eb2008/robot_eb2008.h

index 4ab02632f1d0da217937fb9e6ee46f644827e180..f98a586ee90a2481d7774e0d560238ade21e7e03 100644 (file)
@@ -143,7 +143,8 @@ static void do_control()
                t = (double)(tv.tv_usec - tv_start.tv_usec) / 1000000.0;
                t += (tv.tv_sec - tv_start.tv_sec);
 
-               check_for_collision_in_future(w, t);
+               if (robot.obstacle_avoidance_enabled)
+                       check_for_collision_in_future(w, t);
 
                done = w->getRefPos(t, ref_pos);
 
index f5ee9b0c624e8ec0d44437618832f57380bdc08d..522919d19ac34474d0d7df631b4f52b735c72f94 100644 (file)
@@ -146,6 +146,8 @@ int robot_init()
        /* init ORTE domain, create publishers, subscribers, .. */
        robot_init_orte();
 
+       robot.obstacle_avoidance_enabled = false;
+
        return 0;
 }
 /** 
index 40c122caa54e332f5f66b311f88a45a7ef710b20..dde70c319fc32d850c5dccdda62cee7c06361e12 100644 (file)
@@ -181,6 +181,8 @@ struct robot_eb2008 {
 
        /* information about HW units status - for display */
        uint8_t hw_status[6];
+
+       bool obstacle_avoidance_enabled;
 }; /* robot_eb2008 */
 
 extern struct robot_eb2008 robot;