]> defiant.homedns.org Git - ros_roboint.git/commitdiff
cmd_vel: fix zero crossing
authorerik <erik@ROS.(none)>
Thu, 22 Aug 2013 17:51:07 +0000 (19:51 +0200)
committererik <erik@ROS.(none)>
Thu, 22 Aug 2013 17:51:07 +0000 (19:51 +0200)
scripts/robo_explorer.py

index af40fff1ed68ec3d36644a5a906b290e8d19566b..aa9835248539bdb3c96a225594e759cb50b87098 100755 (executable)
@@ -116,13 +116,13 @@ class RoboExplorer:
                # handle translation
                speed_l = 0
                wish_speed_left = trans - speed_offset
-               if abs(wish_speed_left) > 0:
+               if abs(wish_speed_left) > 1.7/64.3:
                        speed_l = 64.3*abs(wish_speed_left) - 1.7
                        if wish_speed_left < 0:
                                speed_l*=-1
                speed_r = 0
                wish_speed_right = trans + speed_offset
-               if abs(wish_speed_right) > 0:
+               if abs(wish_speed_right) > 1.7/64.3:
                        speed_r = 64.3*abs(wish_speed_right) - 1.7
                        if wish_speed_right < 0:
                                speed_r*=-1