dawonn / vectornav

ROS Interface for the VectorNav IMU/GPS
145 stars 175 forks source link

Bug | Orientation is in the wrong coordinate frame #121

Open nakai-omer opened 1 year ago

nakai-omer commented 1 year ago

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. image From looking a little at the code we found a couple of issues: 1) 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. 2) 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). 3) 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.

dawonn commented 1 year ago

Good eye, PRs are appreciated.

nakai-omer commented 1 year ago

@dawonn created PR #122

AngeLoGa commented 10 months ago

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.

dawonn commented 10 months ago

@AngeLoGa , PRs are welcome.