How can I get the IMU data in the forms nav_msgs/Odometry and Sensor_msgs/IMU

asked 2018-06-09 16:09:05 -0500

kllysin gravatar image

updated 2018-06-11 10:16:25 -0500

Hi, I am trying to understand how to integrate an IMU (razor_imu_9dof) with ROS. I am using a driver that goes by the same name to get IMU data into ROS in the form of Yaw pitch and roll. I am very new to this and want to understand how I can get the same IMU data in the forms nav_msgs/Odometry and Sensor_msgs/IMU

Link to the packsge used for driver - http://wiki.ros.org/razor_imu_9dof

edit: I am trying to use this for ROS robot navigation package. I have an IMU and encoder on my robot. I need nav_msgs/Odometry. How can I get this?

edit retag flag offensive close merge delete

Comments

Doesn't the razor_imu_9dof driver already publish as Sensor_msgs/imu?

stevejp gravatar image stevejp  ( 2018-06-11 17:18:14 -0500 )edit

Why do you need it as Odometry? There is no translation information in the sensor. And yes, the razor driver does publish as sensor_msgs/Imu.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2018-06-12 03:08:36 -0500 )edit

The tutorial I followed shows only YPR data. Upon going through the source code itself, i found that i does give sensor_msgs/imu. I am trying to use Robot navigation stack which needs nav_msgs/Odometry. Would I need to add a wheel encoder to obtain translation information?

kllysin gravatar image kllysin  ( 2018-06-12 09:49:19 -0500 )edit

Yes. afaik wheel encoder are the most common source of odometry information.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2018-06-12 10:47:31 -0500 )edit