Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acceleration values reported with wrong sign #373

Open
scrouthtv opened this issue Jan 22, 2025 · 1 comment
Open

Acceleration values reported with wrong sign #373

scrouthtv opened this issue Jan 22, 2025 · 1 comment
Labels
bug Something isn't working New This issue is new, and should not be marked as stale

Comments

@scrouthtv
Copy link

Describe the bug
I am experiencing a regression in the ros2 branch, where Y and Z acceleration values are reported with the wrong sign.

To Reproduce
Steps to reproduce the behavior:

  1. Checkout branch ros2
  2. Run node with this configuration file:
microstrain_inertial_driver:
  ros__parameters:
    port: /dev/ttyUSB0
  1. Confirm that the driver is publishing wrong acceleration values when exposing the IMU to gravity:

X value is correct:
Image
Y value has the wrong sign:
Image
Z value also has the wrong sign:
Image

  1. I've validated the raw sensor data to verify that the sensor is working ok:

With X vector pointing upwards, I received this packet:

0e 04 3f 80 08 e9 39 59 80 62 bb 19 03 43
 -> x = 1.0002719
 -> y = 0.00020742559
 -> z = -0.0023347891

With Y vector pointing upwards, I received this packet:

0e 04 3b 4e 03 72 3f 80 22 91 bb 83 09 8a
 -> x = 0.003143516
 -> y = 1.0010549
 -> z = -0.00399894

With Z vector pointing upwards, I received this packet:

  0e 04 bc 44 9c ca 3b a9 79 b7 3f 80 0a 6a
 -> x = -0.012000272
 -> y = 0.0051719802
 -> z = 1.0003178
  1. Now I furthermore tested the ros2-3.x.x branch where everything is working as expected. I am currently not able to comprehend the entire version history since then, but I'd recommend writing some unit tests, e.g. using the above packets as examples and do a regression test.

Expected behavior
The driver would be reporting +1g = +9.81 m/s2 in whatever direction is currently pointing upwards.

Environment (please complete the following information):

  • OS: Linux ubuntu 5.15.148-tegra 3dm-gx5-10 #1 SMP PREEMPT Tue Jan 7 17:14:38 PST 2025 aarch64 aarch64 aarch64 GNU/Linux
  • Architecture: arm64
  • ROS Version: ROS2 humble
  • Sensor(s): 3DM-GX-25 (s/n 6253-...)

Launch Parameters

microstrain_inertial_driver:
  ros__parameters:
    port: /dev/ttyUSB0
@scrouthtv scrouthtv added the bug Something isn't working label Jan 22, 2025
@github-actions github-actions bot added the New This issue is new, and should not be marked as stale label Jan 22, 2025
@scrouthtv
Copy link
Author

ETA: I haven't tested whether gyro and attitude data is also affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working New This issue is new, and should not be marked as stale
Projects
None yet
Development

No branches or pull requests

1 participant