NVIDIA-AI-IOT / jetracer

An autonomous AI racecar using NVIDIA Jetson Nano
MIT License
1.06k stars 319 forks source link

Basic motion problems JetRacer #60

Closed Traxan closed 2 years ago

Traxan commented 4 years ago

Hello everyone,

I had a problems with basic_motion notebook.

  1. During calibration no matter what numbers I put in car.steering_gain and car.steering_offset my servo does not turn to right. Maximum motion to the right is natural straight run position (which should be on '0' value). Maximum left motion touches chassis and it looks like it would turn more down if there is not a chassis plate.
  2. Second problem is about throttle. Contrariwise to the instinctive thinking, when I put negative value the car moves forward and opposite with positive value it moves backward.

Thank you in advance for any hints. Greetings

krissdap commented 4 years ago

For question 2, you can set throttle_gain to negative value, that way the throttle should behave in opposite direction.

cscscp commented 4 years ago

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.

rszym88 commented 4 years ago

I was in the same boat. After messing with the steering values too much, I eventually went ahead with cscscp's soltion. It works just fine now.

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.

YaBr11 commented 4 years ago

I had the same problem with the "wrong" direction of rotation of the motor. Besides setting the throttle gain to a negative value, you can also switch two cables from the brushless motor to electrically change the direction of rotation. For me this was the better fix, because my ESC internally reduced the reverse throttle. This led to a much faster reverse speed, than the normal speed with the software fix.

With some ESCs you can also change the direction of rotationin the ESC settings, but I haven't tried that yet.

DeepLJoerg commented 3 years ago

Please note the throttle is directly mapped to the RC car. When the car is stopped and a negative throttle is set, it will reverse. If the car is moving forward and a negative throttle is set, it will brake.

pbalbastre commented 3 years ago

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.

How do you do this? I'm having the same problem, throttle works fine but steering only moves a little bit the first time and after that is not moving anymore.

DeepLJoerg commented 3 years ago

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.

How do you do this? I'm having the same problem, throttle works fine but steering only moves a little bit the first time and after that is not moving anymore.

I have had the same problem. If your steering does not work anymore, what is the display at the Jetracer showing? Mine went black, so the servo must have been crashed. I detached the servo and no problem occurred - e.g. motherboard works. A new servo solved the problem, no everything is fine.

Please consider that the servo may be corrupt.

pbalbastre commented 3 years ago

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.

How do you do this? I'm having the same problem, throttle works fine but steering only moves a little bit the first time and after that is not moving anymore.

I have had the same problem. If your steering does not work anymore, what is the display at the Jetracer showing? Mine went black, so the servo must have been crashed. I detached the servo and no problem occurred - e.g. motherboard works. A new servo solved the problem, no everything is fine.

Please consider that the servo may be corrupt.

The steering moves in C++ but not in Python.

DeepLJoerg commented 3 years ago

The steering moves in C++ but not in Python. What is the OLED display at the Jetracer saying in Python and in C++. Any difference?

pbalbastre commented 3 years ago

Sorry for the late reply. The screen is showing usual info both in Python and C++. No difference.