Enforced float() type on wheel_track for dth calculation

This commit is contained in:
Patrick Goebel 2016-04-18 06:47:36 -07:00
parent a43f33e1b6
commit 171ed94a31

View File

@ -53,7 +53,7 @@ class BaseController:
pid_params['Ki'] = rospy.get_param("~Ki", 0)
pid_params['Ko'] = rospy.get_param("~Ko", 50)
self.accel_limit = rospy.get_param('~accel_limit', 0.1)
self.accel_limit = rospy.get_param('~accel_limit', 1.0)
self.motors_reversed = rospy.get_param("~motors_reversed", False)
# Set up PID parameters and check for missing values
@ -149,7 +149,7 @@ class BaseController:
self.enc_left = left_enc
dxy_ave = self.odom_linear_scale_correction * (dright + dleft) / 2.0
dth = self.odom_angular_scale_correction * (dright - dleft) / self.wheel_track
dth = self.odom_angular_scale_correction * (dright - dleft) / float(self.wheel_track)
vxy = dxy_ave / dt
vth = dth / dt