ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How to integrate ROS and MPU6050 with Raspberry pi 4

asked 2022-06-18 09:24:06 -0500

sougata91 gravatar image

How can I integrate ROS and MPU6050 with Raspberry pi 4? I am using ubuntu 20.04 and ROS Noetic. Please suggest me. I am not getting the correct information to integrate with raspberry pi.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2022-06-20 04:47:10 -0500

hank880907 gravatar image

ROS packages generally accepts senor_msgs/imu messages. To fill the message, you will need:

  1. Quaternion orientation: This is usually done by fusing accelerometer, gyroscope and magnetometer. For MPU6050, due to the lack of magnetometer, it is not possible to derive “absolute” orientation. However, it is still possible to derive a “relative” orientation. But without magnetometer, the problem become under constrained, which makes the math very tricky.
  2. acceleration in m/s^2. When the imu sits flat on the table, it should measure +9.81 on the z axis.
  3. Angular acceleration: basically the reading from gyroscope in rad/s.
edit flag offensive delete link more


Can you please provide me codes with the package folder that I can run to check published data from IMU? I am not getting any useful links for this.

sougata91 gravatar image sougata91  ( 2022-06-21 01:00:23 -0500 )edit

You need to write the code yourself.

hank880907 gravatar image hank880907  ( 2022-06-26 19:38:59 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2022-06-18 09:24:06 -0500

Seen: 324 times

Last updated: Jun 18 '22