From: erik Date: Thu, 22 Aug 2013 17:51:07 +0000 (+0200) Subject: cmd_vel: fix zero crossing X-Git-Url: https://defiant.homedns.org/gitweb/?a=commitdiff_plain;h=e1b72e5d45a8901cd82893a732a795d6f4231843;p=ros_roboint.git cmd_vel: fix zero crossing --- 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