Last active
March 24, 2021 06:57
-
-
Save dattranfiot/9fb916b88af99a1bbfba3f08235e2ee3 to your computer and use it in GitHub Desktop.
calibrate the steering
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 numpy as np | |
| import time | |
| STEERING_OFFSET = 0.1 | |
| STEERING_GAIN = -0.35 | |
| def main(): | |
| car = NvidiaRacecar() | |
| car.steering_offset = STEERING_OFFSET | |
| car.steering_gain = STEERING_GAIN | |
| for s in np.arange(-1.0, 1.1, 0.1): | |
| car.steering = s | |
| print(s) | |
| time.sleep(1) | |
| if __name__ == "__main__": | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment