Last active
March 24, 2021 07:29
-
-
Save dattranfiot/324fb687baddb27c5d2a46f20ef0e5fc to your computer and use it in GitHub Desktop.
calibrate the throttle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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