diff --git a/ros_arduino_msgs/src/ros_arduino_msgs/__init__.pyc b/ros_arduino_msgs/src/ros_arduino_msgs/__init__.pyc index d360e18..bd4bec1 100644 Binary files a/ros_arduino_msgs/src/ros_arduino_msgs/__init__.pyc and b/ros_arduino_msgs/src/ros_arduino_msgs/__init__.pyc differ diff --git a/ros_arduino_python/src/arduino_driver.pyc b/ros_arduino_python/src/arduino_driver.pyc index 5c14558..1f784d7 100644 Binary files a/ros_arduino_python/src/arduino_driver.pyc and b/ros_arduino_python/src/arduino_driver.pyc differ diff --git a/ros_arduino_python/src/arduino_sensors.pyc b/ros_arduino_python/src/arduino_sensors.pyc index 079bd6d..97134c7 100644 Binary files a/ros_arduino_python/src/arduino_sensors.pyc and b/ros_arduino_python/src/arduino_sensors.pyc differ diff --git a/ros_arduino_python/src/base_controller.py b/ros_arduino_python/src/base_controller.py index c35c287..79bb81b 100755 --- a/ros_arduino_python/src/base_controller.py +++ b/ros_arduino_python/src/base_controller.py @@ -118,7 +118,7 @@ class BaseController: if now > self.t_next: # Read the encoders try: - right_enc, left_enc = self.arduino.get_encoder_counts() + left_enc, right_enc = self.arduino.get_encoder_counts() except: self.bad_encoder_count += 1 rospy.logerr("Encoder exception count: " + str(self.bad_encoder_count)) @@ -180,7 +180,6 @@ class BaseController: odom.twist.twist.linear.y = 0 odom.twist.twist.angular.z = vth - self.odomPub.publish(odom) if now > (self.last_cmd_vel + rospy.Duration(self.timeout)): @@ -189,10 +188,8 @@ class BaseController: # Set motor speeds in encoder ticks per PID loop if not self.stopped: - if self.motors_reversed: - self.arduino.drive(self.v_left, self.v_right) - else: - self.arduino.drive(self.v_right, self.v_left) + self.arduino.drive(self.v_left, self.v_right) + def stop(self): self.stopped = True diff --git a/ros_arduino_python/src/base_controller.pyc b/ros_arduino_python/src/base_controller.pyc index dcef166..28d9fa1 100644 Binary files a/ros_arduino_python/src/base_controller.pyc and b/ros_arduino_python/src/base_controller.pyc differ