Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

added another callback in imu_ned_enu based on euler angle changes. T… #1

Merged
merged 2 commits into from
Mar 10, 2023

Conversation

mzhouURI
Copy link
Collaborator

@mzhouURI mzhouURI commented Jan 4, 2023

I updated the imu_ned_enu node.
The previous one has some problem in roll and pitch.
so i created another callback function where

  • The roll, pitch yaw is first obtained form the Qua. (in NED frame)
  • then we apply roll pitch and yaw offset (or reverse sign) to get the correct orientation in ENU.
  • convert rpy back to Qua (in ENU) and replace the value in imu msg
  • publish to a new topic /imu/data
  • added a param for frame_id. so the new imu data in enu can have a different frame_id

I tested with alpha_rise_auv https://github.com/GSO-soslab/alpha_rise_auv
The orientation of baselink and imu links are correct, and the rotation are correct compared to the stonefish UI.

…ested with RViz and Stonefish using Alpha_rise_auv repo
@incebellipipo
Copy link
Contributor

  1. Instead of using pi as 3.14..... you should use M_PI for pi, M_PI_2 for pi/2

  2. You don't need to have a separate frame id, a different topic name would suffice. Unless the described orientation is also not changing.

  3. I used this Check frame conversions (NED->ENU ROS) mavlink/mavros#49 (comment) to convert NED to ENU. To reduce the number of Quaternion -> Euler -> Quaternion conversions. I can try to make sure that can apply first. But your method looks rather safe and should work.

@mzhouURI
Copy link
Collaborator Author

mzhouURI commented Jan 6, 2023

I changed the 3.14.... related things to M_PI and M_PI_2.
Fixed a small complain for the target frame_id

@mzhouURI
Copy link
Collaborator Author

Update:
I will revert my change.
and have my way of converting imu in a new node.
user could define roll, pitch, yaw offset or reverse in rosparam.

Once it is tested, i will update and request a pull request review

@linzha0 linzha0 merged commit 5f55dea into noetic-devel Mar 10, 2023
@mzhouURI mzhouURI deleted the dev branch March 24, 2024 23:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants