Getting IMU data via ROS

Hi.

I’m trying to get IMU data of the rover model through ROS.
However, when I run sitl with ros wrappers, it the imu topics do not show up.

The rover model uses libgazebo_imu_plugin, and Gazebo document says we should use libgazebo_ros_imu.

What is the difference between the two plugins?
And how can I change libgazebo_imu_plugin to libbazebo_ros_imu?

@Keunwoo_Park the libgazebo_ros_imu has a ROS dependency where the libgazebo_imu_plugin is doesn’t and is hosted under PX4/sitl_gazebo repo

You can take two approaches:

  • use mavros to get imu topics via mavlink from PX4
  • Subscribe to the imu messages directly