You are here

Use IMU for keeping direction

1 post / 0 new
arnolde
Offline
Last seen: 3 weeks 3 days ago
VESC FreeVESC Platinum
Joined: 2023-01-11 16:12
Posts: 2
Use IMU for keeping direction

I'm building a large robot (>100kg) for farming tasks. First usecase will be autonomously raking the sand smooth on a 20x40m riding arena.

It has a 2-wheel rear drive (left+right motors with free swivel wheels at the front) and skid steering / tank steering. I use a dual VESC and an ESP32 for controlling it, steered via bluetooth with a PS3 controller. It works well so far with 2-stick-steering, but now I want to switch to 1-stick steering (Y axis for speed, X axis for steering), in preparation for the following step which will be automomous driving.

I have a BNO055 (9dof IMU with compass) all ready to use and just wanted to start coding the ESP to modulate the motor RPMs to keep driving in a straight line (=keep the yaw heading constant) when there is no X input. But then I remembered that the VESC can also deal with IMU input. I can switch to another, supported one, no problem. But so far I only see balancing applications. But my application would be to accept a forward/reverse speed and angular turning speed, and translate that to movement, automatically correcting the drives to compensate the driving error, accoring to the IMU yaw data.

Is that possible too?

If not, would you recommend rather setting the RPM (which would at least utilize the VESC's PID controlling) or the current/dutycycle (which would require my own PID implementation, which I'd like to avoid)?

I currently use UART for ESP32-VESC communication but I'm now switching to CAN.