From e1b72e5d45a8901cd82893a732a795d6f4231843 Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 22 Aug 2013 19:51:07 +0200 Subject: [PATCH] cmd_vel: fix zero crossing --- scripts/robo_explorer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/robo_explorer.py b/scripts/robo_explorer.py index af40fff..aa98352 100755 --- a/scripts/robo_explorer.py +++ b/scripts/robo_explorer.py @@ -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 -- 2.39.2