Made divisor a float

This commit is contained in:
2018-02-26 22:46:49 -08:00
parent 8c96c8e0a9
commit 91780ffed1

View File

@@ -175,8 +175,8 @@ class RoverDriveSender(QtCore.QThread):
def __update_and_publish(self): def __update_and_publish(self):
drive_message = DriveCommandMessage() drive_message = DriveCommandMessage()
drive_message.drive_twist.linear.x = (self.joystick.controller_states["y_axis"] - 512) / 512 drive_message.drive_twist.linear.x = (self.joystick.controller_states["y_axis"] - 512) / 512.0
drive_message.drive_twist.angular.z = (self.joystick.controller_states["z_axis"] - 128) / 128 drive_message.drive_twist.angular.z = (self.joystick.controller_states["z_axis"] - 128) / 128.0
self.drive_command_publisher.publish(drive_message) self.drive_command_publisher.publish(drive_message)
# print self.joystick.controller_states["y_axis"], self.joystick.controller_states["z_axis"] # print self.joystick.controller_states["y_axis"], self.joystick.controller_states["z_axis"]