0
$\begingroup$

i got a task for which i need to drive a certain distance and move around an object. I finally managed that my robot goes almost straight but i think its enough. But now i gotta tackle the problem how to turn my robot by 90° at certain points. Can someone give me some advise how i can program the turning of the robot? For measurements i got wheel encoders and an IMU but i dont have any experience using the IMU. Thanks you for reading :)

$\endgroup$

1 Answer 1

1
$\begingroup$

Usually IMUs have only an accelerometer and a Gyro. Gyro gives the angular rates around x,y and z axes. The gyro can help to measure the rotated angle around z axis. But this is not very accurate method since gyro gives the angular rate to calculate the rotated angle by multiplying from the sample time.

$\theta = \omega_z*\Delta t$

Calculating the absolute rotation is not possible unless you use an magnetometer. My personal advice is to use the wheel encoders to calculate the rotated angle using the following method.

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.