You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am curently stuck by a simple error when I try to run the road following notebook on my JetRacer.
I created my dataset and trained my road following model. Then, I optimized the model and got my "road_following_model_trt.pth" file.
I first faced an I2C issue, because the program was on default and used 0x60 bus. But when i checked, I saw that my motors were on 0x40 and 0x42.
So i tried like this :
car = NvidiaRacecar(i2c_address1=0x42, i2c_address2=0x40)
but I got an I/O error on 0x42 address, so i used only the 0x40 like this :
car = NvidiaRacecar(i2c_address1=0x40, i2c_address2=0x40)
It solved temporally my problem, but now i'm stuck with and "Out of range" issue on my car.steering.
I tried to Clamp my value between [-1;1] but it doesnt worked.
Then, I tried to modify directly the library by modifying "adafruit_pca9685.py" file.
I changed this :
def duty_cycle(self, value):
if not 0 <= value <= 0xFFFF:
raise ValueError("Out of range")
if value == 0xFFFF:
self._pca.pwm_regs[self._index] = (0x1000, 0)
else:
# Shift our value by four because the PCA9685 is only 12 bits but our value is 16
value = (value + 1) >> 4
self._pca.pwm_regs[self._index] = (0, value)
for this :
def duty_cycle(self, value):
if not 0 <= value <= 0xFFFF:
print(f"DEBUG: duty_cycle value out of range: {value}, clamping")
value = max(0, min(value, 0xFFFF))
if value == 0xFFFF:
self._pca.pwm_regs[self._index] = (0x1000, 0)
else:
# Shift our value by four because the PCA9685 is only 12 bits but our value is 16
value = (value + 1) >> 4
self._pca.pwm_regs[self._index] = (0, value)
(chat gpt advice)
That didn't solved my problem either...
That's why I am asking you if someone is willing to help me ?
Maybe it happens because i used same I2C address for both of my servo and motor, but I couldn't find any other solutions.
Thant you very much for your help and for your time !
Have a nice day !
Eliott.
The text was updated successfully, but these errors were encountered:
Hello everyone !
I am curently stuck by a simple error when I try to run the road following notebook on my JetRacer.
I created my dataset and trained my road following model. Then, I optimized the model and got my "road_following_model_trt.pth" file.
I first faced an I2C issue, because the program was on default and used 0x60 bus. But when i checked, I saw that my motors were on 0x40 and 0x42.
So i tried like this :
car = NvidiaRacecar(i2c_address1=0x42, i2c_address2=0x40)
but I got an I/O error on 0x42 address, so i used only the 0x40 like this :
car = NvidiaRacecar(i2c_address1=0x40, i2c_address2=0x40)
It solved temporally my problem, but now i'm stuck with and "Out of range" issue on my car.steering.
I tried to Clamp my value between [-1;1] but it doesnt worked.
Then, I tried to modify directly the library by modifying "adafruit_pca9685.py" file.
I changed this :
def duty_cycle(self, value):
if not 0 <= value <= 0xFFFF:
raise ValueError("Out of range")
for this :
def duty_cycle(self, value):
if not 0 <= value <= 0xFFFF:
print(f"DEBUG: duty_cycle value out of range: {value}, clamping")
value = max(0, min(value, 0xFFFF))
(chat gpt advice)
That didn't solved my problem either...
That's why I am asking you if someone is willing to help me ?
Maybe it happens because i used same I2C address for both of my servo and motor, but I couldn't find any other solutions.
Thant you very much for your help and for your time !
Have a nice day !
Eliott.
The text was updated successfully, but these errors were encountered: