mirror of
https://github.com/YikeStone/ros_arduino_bridge.git
synced 2025-08-05 20:14:07 +05:30
Enforced float() type on wheel_track for dth calculation
This commit is contained in:
parent
a43f33e1b6
commit
171ed94a31
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user