-
Notifications
You must be signed in to change notification settings - Fork 60
Description
Hi, Thank you for your time,
I have been experimenting with the phidgets_spatial driver and noticed some behavior regarding the coordinate frames that I would like clarification on.
I am using ros2 humble, on a Nvidia Jetson Xavier NX running ubuntu 22.04, and a PhidgetSpatial Precision 3/3/3 M0t0110_0 IMU.
I apologize ahead of time, new to ros2 and new to creating Issues.
Observations:
- Using the original Windows driver, I have verified that the sensor outputs are in NED frame:
Acceleration due to gravity: +9.8 m/s² along the sensor Z-axis.
- When I run ros2 topic echo with the ROS2 driver:
The acceleration appears to be in ENU frame.
Gravity is reported as -9.8 m/s² along Z.
This is consistent with REP-103, which is great, this is what I want. I do not have any fancy setup, and cannot fully verify that the acceleration and velocities are in ENU, but they do seem to be.
- The AHRS orientation, however, is still reported in NED frame. I am not sure how to show this in a picture, but using the rviz2 imu plugin the orientation is moving strangely to what teh sensor is actually doing, but the acceleration is still good:
When I apply TF rotations to correct the orientation to ENU, the acceleration values are effectively “rotated back” to NED, but the orientation now behaves correctly:
<joint name="joint_name" type="fixed">
<parent link="origin"/>
<child link="imu_link_ned"/>
<!-- Rotate to transform from NED to ENU as per REP-103 -->
<origin xyz="0 0 0.5" rpy="3.14159 0 -1.5708"/>
</joint>
Issue:
For sensor fusion, I would like all outputs, [acceleration, velocity, and orientation] to be consistently in ENU. Currently, only acceleration seems automatically converted, while orientation remains in NED. Not sure on velocity.
Temporary solution:
I plan to write a small republisher node that translates only the orientation to ENU for now.
Questions:
Am I correct in my observations, or am I missing something fundamental about how the driver handles frames, or about frames in general?
Would it make sense for the driver to provide all outputs in ENU to match ROS standards, or is there a recommended solution for converting NED orientation while keeping ENU acceleration?
This took me several hours to figure out, is there any way t clarify this for others?
I can provide screenshots to clarify what I mean if needed.
Thank you for your help and time!