vectornav
vectornav copied to clipboard
Bug | Orientation is in the wrong coordinate frame
Hello,
We are using a VN-100T, and we are getting a -π
roll when the IMU is flat on a surface. In other words, Z is pointing down.
From looking a little at the code we found a couple of issues:
- https://github.com/dawonn/vectornav/blob/933af893ab91986110dab2528a6fa6c913f4f932/vectornav/src/vn_sensor_msgs.cc#L181 Orientation is always converted to ENU even if
use_enu
is false. - The above conversion actually breaks the orientation and causes the above mentioned issue. From our tests, the quaternion that arrives is already in ENU, so this conversion is redundant (nevertheless a conversion should exist if
use_enu
is false to turn it into NED). - Pose is always converted to ECEF, and afaik should also be in ENU. https://github.com/dawonn/vectornav/blob/933af893ab91986110dab2528a6fa6c913f4f932/vectornav/src/vn_sensor_msgs.cc#L309.
I don't mind issuing a PR, just would like to get assurance I am not missing something.
Good eye, PRs are appreciated.
@dawonn created PR #122
Greetings, I have also been experiencing this issue when we bought a robot using a VectorNav IMU. My question is, seems that the PR was merged into ros2 branch. Have these changes been made on master branch as well? I'm currently working in Melodic but planning to update to Noetic...thanks from advance.
@AngeLoGa , PRs are welcome.