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.4 documentation) , that the signs etc. of imu data are important.
- Acceleration should be + 9.81m/s² in Z axis, (with upwards Z-axis)
- 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