NVIDIA-AI-IOT / jetracer

An autonomous AI racecar using NVIDIA Jetson Nano
MIT License
1.07k stars 321 forks source link

Waveshare Steering Gain and Bias Issues #93

Closed magicbycalvin closed 2 years ago

magicbycalvin commented 3 years ago

I have encountered some issues with getting the demos working for the Waveshare version of the Jetracer. Originally I had issues with the throttle which was remedied by increasing the gain since the provided example produces a torque that is too low to get the wheels moving. Now my problem lies with the steering. When playing with the gain and bias values of the steering, it appears that I need to satisfy the following equation: 1.0 * gain + bias <= 1. That is a problem when you're trying to include a nonzero bias since the bias will then eat into the gain value. Unfortunately my research doesn't afford me the time to spend debugging this but after taking a little peek under the hood I noticed that the object controlling the steering servo is a "continuous_servo" type. Perhaps there are other things I'm not seeing that justify using a continuous servo object rather than a standard servo (despite the physical servo not being in continuous operation).

I would really appreciate it if someone could take a look at that or at least point me in the right direction for remedying the problem myself. Thanks!

In the meantime, I am attempting the following hack:

I also encountered the same two problems. My workaround for problem 1 was detaching the servo wheel from the servo and reattaching it after setting the car.steering to 0.

Originally posted by @cscscp in https://github.com/NVIDIA-AI-IOT/jetracer/issues/60#issuecomment-638001118