Skip to content

Instantly share code, notes, and snippets.

@Gizmotronn
Created September 3, 2019 02:03
Show Gist options
  • Save Gizmotronn/2b3c3a9597dcabf0002dc8c712f6f597 to your computer and use it in GitHub Desktop.
Save Gizmotronn/2b3c3a9597dcabf0002dc8c712f6f597 to your computer and use it in GitHub Desktop.
NASA-JPL/Open-Source-Rover
#!/usr/bin/env python
import rospy
import time
import math
class Robot():
'''
Robot class contains all the math and motor control algorithms to move the rover
In order to call command the robot the only method necessary is the sendCommands() method
with drive velocity and turning amount
'''
def __init__(self):
distances = rospy.get_param('mech_dist','7.254,10.5,10.5,10.073').split(",")
self.d1 = float(distances[0])
self.d2 = float(distances[1])
self.d3 = float(distances[2])
self.d4 = float(distances[3])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment