I want to plot a map( with matplotlib or any other library ) using a wheel encoder and IMU data.

Eg:- For every 10cm robot moves it should draw line (in a graph) and draw angles depending on the data received from the IMU.

I'm using python in Raspberry pi.

How can I achieve this function? Is there any algorithm for this? I googled for a couple of hours but still found nothing.

  • 1
    $\begingroup$ I think you didn't check enough, it is pretty easy at least the first steps. What you should check out are 1) forward kinematics (for wheeled robots) to get position from encoder measurement and 2) sensor fusion in order to use also the data from IMU. $\endgroup$
    – nionios
    Aug 23, 2019 at 12:55
  • $\begingroup$ Thanks.Forward kinematics didn't come in mind as they are mostly used in robotic arm manipulation. I will research on it. $\endgroup$
    – smc
    Aug 23, 2019 at 17:30

1 Answer 1


You should maybe look at SLAM. Sinultaneous Localization and Mapping. There are really robust ROS packages which might help you in doing it. However, usially SLAM uses cameras, LIDARs, kinect-like sensors. But you could try if you can find some sort of implementation with IMU and Encoder.

For example I found this Or this

I hope this might be useful for you.


Your Answer

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

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