0
$\begingroup$

I recently added an MPU9250 9dof IMU to my robot and configured ros2_mpu9250_driver

How can I confirm the IMU and ROS2 node are working correctly, and the orientation output is configured correctly.

I see /imu topics:

$ ros2 topic echo --once --flow-style /imu
header:
  stamp:
    sec: 1701139672
    nanosec: 166159626
  frame_id: base_link
orientation:
  x: -0.00013199338433265485
  y: -0.003050688240073104
  z: -0.7370080372140175
  w: 0.6758770812514282
orientation_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
angular_velocity:
  x: 0.6774427480915985
  y: 3.1466335877862592
  z: -1.001618320610687
angular_velocity_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
linear_acceleration:
  x: 0.28355115234375006
  y: 0.042684038085936626
  z: 9.88417614990236
linear_acceleration_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---

but how can I visualize the orientation the IMU thinks versus the orientation from the wheel encoders /odom topic?

ps. the IMU QoS is set to sensor_data (best effort)

$\endgroup$
1
  • 1
    $\begingroup$ You mean something other than looking at the IMU topic? $\endgroup$
    – billy
    Commented Nov 27, 2023 at 6:31

2 Answers 2

1
$\begingroup$

Seems that imu_tools has a RViz plugin that can be used to visualize the IMU topic:

https://github.com/CCNYRoboticsLab/imu_tools

$\endgroup$
1
$\begingroup$

As given in this answer rqt_plot in ROS 2?, you can use rqt_plot in ROS1 or PlotJuggler https://plotjuggler.io in ROS2 to plot your vector components. You can also show the TFs in RViz.

$\endgroup$

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.