Skip to content

Instantly share code, notes, and snippets.

@dattranfiot
Last active March 24, 2021 07:29
Show Gist options
  • Select an option

  • Save dattranfiot/324fb687baddb27c5d2a46f20ef0e5fc to your computer and use it in GitHub Desktop.

Select an option

Save dattranfiot/324fb687baddb27c5d2a46f20ef0e5fc to your computer and use it in GitHub Desktop.
calibrate the throttle
from jetracer.nvidia_racecar import NvidiaRacecar
import time
STEERING_OFFSET = 0.1
STEERING_GAIN = -0.35
THROTTLE_GAIN = -0.2
def main():
car = NvidiaRacecar()
car.throttle_gain = THROTTLE_GAIN
car.throttle = 1
time.sleep(5)
car.throttle = -1
time.sleep(5)
car.throttle = 0
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment