Jetson nano running YOLO and control Odrive

Hi, guys. I am developing the object named ‘TWAS’. It works in YOLOv5 model by Jetson nano. When we detect any car, the odrive will control the Brushless Motor.
Now I have installed and runned the YOLOv5 in Windows. (for testing)
And detection part is great and awesome. It can provide the current video stream with the distances from different cars. However, the code about controlling the Motor switch parameter only will work one time. Then it goes into the loop…(downloading the json data from Odrive…)
Is anyone met the similar question before?



Hi! Can you post set_controller_param? Or upload your whole codebase?

Which ODrive and what ODrive firmware version is this?

Hi, guy. I solved this problem. However, I also need to get the Iq and the Torque value. Do you know where can I find it? I need to use it to be a feedback for my system.

Are you using CAN, UART, or USB?

I am using the USB.

Which ODrive is this? v3.6 or S1/Pro/Micro?

v3.5

It is a homemade development board with version 3.5 firmware installed. Odrivetool is functional.

Ah I see, you’ll have to check the v3.6 docs then. I don’t think there’s an actual torque estimate value, you’d need to take the Iq (Iq_measured) and multiply it by the torque constant.

Yes, I got it. Thank you so much. Did you follow the topic of traoezoidal?

I am considering which is better. You know, I try to control the handlebar of bicycle(motor). The difficult point is how to get the balance between manual and machine. I don’t think we should get to the setting position very fast, however it should generate a force (torque) to reminder us which side coming car. Do you have any idea?

Setting a PID parameter for vel_gain, vel-integrator and pos_gain was completed. And also I got some data which is suit for this project. However, is there any way to change the parameter by itself? I am not only saying just two group data, but also a self-adjusting.

Usually for HID applications, running in torque mode is a good idea – you can provide force feedback for the user.

Can you elaborate what you mean by “change the parameter by itself”? As in only set one parameter? Or as in have the ODrive self-tune?

The Odrive self-tune. I think that will be more intelligent. Why you consider a torque mode is good? Any special? I am trying to applying the position mode LOL.

If you’re trying to give force feedback / torque assist to a human, that should generally be in torque mode, maybe with an algorithm running on your Jetson to control how much torque to use. Or, you can use velocity mode, but should ideally have a vel_integrator_gain of 0 so that there’s a constant spring response.

Auto-tuning is a bit less useful than it may seem, unfortunately :slight_smile: but it may be functionality in the future.