5
$\begingroup$

I have an arduino wired to an MPU6050 breakout board. The arduino continuously collects accelerometer and gyroscope data from the MPU6050 and calculates angle and velocity.

Simply plotting the vector components (x,y,z) of this data does not allow one to reason about the motion of the sensor or robot. It's possible, though not easy, to do sanity checks (Is the sensor oriented as expected? Is gravity working?). But it's very difficult to look at a x,y,z plot of accelerometer log data and imagine what the robot did for instance.

I was wondering if there is some sort of tool or Python library to visualise accelerometer and gyro, or IMU data? (I'm looking for something like this- https://youtu.be/6ijArKE8vKU)

$\endgroup$
5
  • 1
    $\begingroup$ Have a look at this question. $\endgroup$
    – Jakob
    Jun 16, 2016 at 7:08
  • 1
    $\begingroup$ I think the op is specifically interested in how to visualize the 3D vectors associated with these transducers. I've had the same problem myself in the past and am looking forward to the answers. $\endgroup$
    – hauptmech
    Jun 16, 2016 at 8:34
  • $\begingroup$ @hauptmech yes that's exactly what I'm looking for! $\endgroup$ Jun 16, 2016 at 8:36
  • $\begingroup$ I've added some detail to clarify, let me know if it's enough. Line plots are insufficient for this type of data. When I've tried to deal with this, I usually fire up a heavyweight solution, like ros rviz. Commercial IMU's, ground station software and camera gimbals software often present the data with 3D models animated with the data. youtube.com/watch?v=DtUdlfKq6_U There are approaches to do 3D plots youtube.com/watch?v=6ijArKE8vKU but depending on the size of the dataset and context of the data, there may be better approaches than what first come to mind. $\endgroup$
    – hauptmech
    Jun 17, 2016 at 2:26
  • 1
    $\begingroup$ @hauptmech yes. Exactly!! I'm looking for something like this- youtube.com/watch?v=6ijArKE8vKU $\endgroup$ Jun 17, 2016 at 22:10

1 Answer 1

1
$\begingroup$

I'm sure you've tried this, but if you follow the links in that YouTube video, you'll see that its author has posted the source code. See:

Yes, it's written in MATLAB, but "for anything MATLAB can do, there's a corresponding Python library". :) In particular, you might want to investigate the quaternion package(s) in NumPy -- that's where the magic happens.

That should get you started.

$\endgroup$
1
  • $\begingroup$ Do you know how can I count steps via Python? Already, I have the data, but I can not count peaks. $\endgroup$
    – E A
    Nov 16, 2017 at 16:49

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.