Orientation of IMU in Rosbot 2.0 pro

Hi,
I am using Rosbot 2.0 pro, on ROS kinetic, with husarion firmware commit 9e2188fd35801f555f7ade8ea7a2b8bc6b4014fe. The reason for not updating is, that there are some old dependencies, which is why I need the mpu9250 → imu publisher, that was removed later.
I want to use IMU data in the robot_localization package, and they state here (Preparing Your Data for Use with robot_localization — robot_localization 2.7.3 documentation) , that the signs etc. of imu data are important.

  1. Acceleration should be + 9.81m/s² in Z axis, (with upwards Z-axis)
  2. turning the robot counter-clockwise should increase yaw angle, yaw velocity should be positive.

to 1: in my case linear acc. was -9.81 m/s², so i swapped the sign in msgs_conversion.cpp.
to 2: i calculated yaw,roll, pitch based on the quaternion (based on Conversion between quaternions and Euler angles - Wikipedia).
I found out that yaw increased counter -clockwise (which is good), not sure how to check yaw velocity yet.
However: I checked pitch, and roll values and i think they are reverted. Putting the robot nose down i have a high roll-value, and lifting one side (i.e. front and back wheel) results in high pitch value.
Can you confirm, that the imu is integrated into rosbot in a unusual way, which explains swapped values of roll & pitch, or can you point me out some advise, to proof that imu data is correct setup?

Kind regards
Knut

Hi Lascho,

Unfortunately the code you are using is quite outdated. After publishing the commit you’re talking about, we made some changes that address your issue. We cannot predict how it will behave with other products. If it’s possible, please upgrade your Ubuntu image using the one available on this page. I regret to inform you that otherwise we won’t be able to support your problem.

Best regards,
Paweł

Hi pkowalsk,
thank you for your message.
I have one question before considering to upgrade my system.
I used the old commit because it delivered a message conversion from old /mpu9250 reading to /imu.
when I updated to latest commit it did not work, (but still on Ubuntu 16.04) & ROS kinetic.
Can you confirm that the /imu data is accessible on the new platform i.e. Ubuntu 20.04 + ROS Noetic + Docker + Husarnet client?

Hi,
ROSbot no longer publishes this data on the /mpu9250 topic. All data from the mpu9250 sensor (or BNO055 in newer robots) are published on the /imu topic and are as follows:

Best regards,
Paweł