mirror of
https://github.com/OSURoboticsClub/Rover_2017_2018.git
synced 2025-11-08 10:11:14 +00:00
Simple change to keep values in range for now.
This commit is contained in:
@@ -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.0
|
drive_message.drive_twist.linear.x = -(self.joystick.controller_states["y_axis"] - 512) / 1024.0
|
||||||
drive_message.drive_twist.angular.z = -(self.joystick.controller_states["z_axis"] - 128) / 128.0
|
drive_message.drive_twist.angular.z = -(self.joystick.controller_states["z_axis"] - 128) / 512.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"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user