]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/robofsm/robot_orte.c
Unify ORTE initialization
[eurobot/public.git] / src / robofsm / robot_orte.c
index 10dad10a3af0eada29188a7b5805d526947e349d..abb34f54e5aa9f5338e6d77b1c9b2b9f3dfd13ed 100644 (file)
@@ -182,15 +182,13 @@ void rcv_motion_irc_cb(const ORTERecvInfo *info, void *vinstance,
                        /* FIXME maybe it is not correct to do this nasty hack here (switch dleft and dright),
                        what is the right solution?
                        This was neccessary to view motor odometry correctly in robomon. */
-                       dright = ((robot.motion_irc.left - instance->left) >> 8) * c  * robot.odo_cal_b;
-                       dleft = ((instance->right - robot.motion_irc.right) >> 8) * c  * robot.odo_cal_a;
+                       dright = ((robot.motion_irc.left - instance->left) >> 8) * c;
+                       dleft = ((instance->right - robot.motion_irc.right) >> 8) * c;
                        
                        dtang = (dleft + dright) / 2.0;
                        dphi = (dright - dleft) / (2.0*ROBOT_ROTATION_RADIUS_M);
 
                        ROBOT_LOCK(est_pos_odo);
-                       robot.odo_distance_a +=dleft;
-                       robot.odo_distance_b +=dright;
                        double a = robot.est_pos_odo.phi;
                        robot.est_pos_odo.x += dtang*cos(a);
                        robot.est_pos_odo.y += dtang*sin(a);
@@ -481,8 +479,6 @@ int robot_init_orte()
 {
        int rv = 0;
 
-       robot.orte.strength = 20;
-
        rv = robottype_roboorte_init(&robot.orte);
        if (rv)
                return rv;