Navigation with OAK-D IMU

12 views
Skip to first unread message

James H Phelan

unread,
Dec 21, 2025, 6:43:28 PM (2 days ago) Dec 21
to HomeBrew Robotics Club

Team,

I'm working with the OAK-D on the stingray.

Since in has a built-in IMU, I thought I'd give it a try.

In Rviz2 its orientation is far from that of the robot.  (see attachment 1.)

I went a couple rounds in VSCode with CoPilot/Claude-Sonnet-4.5 which assured me that since the IMU published its orientation, the EKF would figure it all all so don't worry about the Rviz2 orientation.

However in practice, the robot appears disoriented and travels in the opposite direction. (see video attachment 2.)

Has anyone else used the OAK-D IMU?  Does it line up in Rviz?  How did you get it to do so?

Does it behave in action?  Any particular configuration tricks?

James

-- 
James H Phelan
"Nihil est sine ratione cur potius sit quam non sit"
Leibniz
Screenshot from 2025-12-19 08-24-02.png
Screencast from 2025-12-21 17-13-39.webm

James H Phelan

unread,
Dec 21, 2025, 7:06:04 PM (2 days ago) Dec 21
to hbrob...@googlegroups.com

attached ekf_odom_params.yaml fyi.

James H Phelan
"Nihil est sine ratione cur potius sit quam non sit"
Leibniz
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/hbrobotics/75d6568b-6df6-4ad9-b547-8e3c57b247fd%40hal-pc.org.
ekf_odom_params.yaml

Marco Walther

unread,
Dec 21, 2025, 8:00:41 PM (2 days ago) Dec 21
to hbrob...@googlegroups.com
On 12/21/25 16:05, 'James H Phelan' via HomeBrew Robotics Club wrote:
> attached ekf_odom_params.yaml fyi.

Is the chain of transforms from the Oak-D IMU to the robot 'base frame'
correct? t looks like something believes , it's different from what it
actually is?!

-- Marco
>> hbrobotics/75d6568b-6df6-4ad9-b547-8e3c57b247fd%40hal-pc.org <https://
>> groups.google.com/d/msgid/hbrobotics/75d6568b-6df6-4ad9-
>> b547-8e3c57b247fd%40hal-pc.org?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hbrobotics+...@googlegroups.com
> <mailto:hbrobotics+...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> hbrobotics/9376ab5f-dde6-4038-a523-57cc8200860a%40hal-pc.org <https://
> groups.google.com/d/msgid/hbrobotics/9376ab5f-dde6-4038-
> a523-57cc8200860a%40hal-pc.org?utm_medium=email&utm_source=footer>.

Sergei Grichine

unread,
Dec 21, 2025, 8:11:30 PM (2 days ago) Dec 21
to hbrob...@googlegroups.com
James,

I would rotate it in URDF till it aligns with the robot like on the following picture:


BTW, I don't know about Claude, but Chrome "AI Mode" is lightning fast and usually very helpful. ChatGPT.com is very slow, but often a good help too. Both are free.

Best Regards,
-- Sergei


James H Phelan

unread,
Dec 21, 2025, 9:24:09 PM (2 days ago) Dec 21
to hbrob...@googlegroups.com

see attached TF frames.  That's what it seems to me, but I don't see were.

James

James H Phelan
"Nihil est sine ratione cur potius sit quam non sit"
Leibniz
frames_2025-12-21_19.58.44.pdf

James H Phelan

unread,
Dec 21, 2025, 9:50:49 PM (2 days ago) Dec 21
to hbrob...@googlegroups.com

Sergei,

I could rotate the BNO055 axes to fit easily.  The OAK-D is different since it's integral to the camera.

I really don't understand why the OAK-D IMU axes aren't exactly the same as the camera except, perhaps, a final video frame rotation.  

I went through all kinds of hoops with VSCode/Claude trying to orient the IMU axes and it just took me deeper into the weeds.  Claude is usually the best coder and in VSCode has the advantage of being able to see, modify, run and evaluate the output of the code.  I may give another AI a try.

James

James H Phelan
"Nihil est sine ratione cur potius sit quam non sit"
Leibniz

Chris Albertson

unread,
Dec 21, 2025, 10:14:15 PM (2 days ago) Dec 21
to hbrob...@googlegroups.com

On Dec 21, 2025, at 3:43 PM, 'James H Phelan' via HomeBrew Robotics Club <hbrob...@googlegroups.com> wrote:

 with CoPilot/Claude-Sonnet-4.5 which assured me that since the IMU published its orientation, the EKF would figure it all all so don't worry about the Rviz2 orientation.

Don't believe what AI’s tell you without doing your own fact-checking.  My favorite AI story so far is when it gave me a detailed academic-sounding analysis of Beethoven’s 13th symphony.

You are going to have to get the IMU-to-Base transforms right.  EKF is not going to figure out the IMU is mounted upside down and backward all on its own.

This is the best video on the theory of rotation matrices I have seen.   It is part of a “101” intro course on robotics at ASU.  Once you know the theory, the ROS TF system is not so hard

The next video in the series extends the concept to Homogeneous Transformation Matrix and DH parameters.  You will need this later part for any robot with arms and legs, but the basic rotations are needed to move from camera or IMU to world coordinates.   The instructor makes this usually confusing subject really simple.  She’s a professional mechanical engineering instructor, not some random YouTuber; she’s good.



Michael Wimble

unread,
Dec 21, 2025, 10:33:51 PM (2 days ago) Dec 21
to hbrob...@googlegroups.com
Having the IMU in the TF tree is good, but that graph doesn’t show you the orientation. Viewing it in rviz2 will show you if the 3 axis are aligned rotation-wise with the base_link frame. I’m not where I can do the experiment myself right now. But, if you need to rotate the OakD’s IMU frame, just add another frame to the URDF whose parent is the OakdD IMU frame, and add the needed rotation to this new, child frame. Then just have the EKF node read from that frame. Or does EKF get configured by topic names? If so, just create a trivial node to read the OakD imu data and republish it with the needed rotation. Personally, I’d add in Sergei’s new BMO sensor (85? 88?) and use that sensor, but the OakD IMU is already there and is already fused well.

James H Phelan

unread,
Dec 22, 2025, 12:02:58 PM (19 hours ago) Dec 22
to hbrob...@googlegroups.com

Michael,

The EKF just listens to the topic, I think, and, supposedly, that publishes the orientation and it's supposed to figure it all out according to Claude.

The first attached pic in the original message is of the orientation in Rviz.

The EKF .yaml is in the second message.

The AI tried adding links/frames and rotating them but nothing changed in Rviz.

The support for the BNO085 is pending reopening of the Fab Lab after New Years.

But surely (?) someone else has made use of the OAK-D IMU without having to write some convoluted translation node that Claude was attempting?

James H Phelan
"Nihil est sine ratione cur potius sit quam non sit"
Leibniz
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.

Marco Walther

unread,
Dec 22, 2025, 12:16:12 PM (18 hours ago) Dec 22
to hbrob...@googlegroups.com
On 12/22/25 09:02, 'James H Phelan' via HomeBrew Robotics Club wrote:
> Michael,
>
> The EKF just listens to the topic, I think, and, supposedly, that
> publishes the orientation and it's supposed to figure it all out
> according to Claude.
>
> The first attached pic in the original message is of the orientation in
> Rviz.
>
> The EKF .yaml is in the second message.
>
> The AI tried adding links/frames and rotating them but nothing changed
> in Rviz.
>
> The support for the BNO085 is pending reopening of the Fab Lab after New
> Years.
>
> But /surely/ (?) someone else has made use of the OAK-D IMU without
> having to write some convoluted translation node that Claude was attempting?

You have seen (and handled) the following note from the docs?
"Note on Extrinsics
If your camera has uncalibrated IMU, a warning will be shown, and IMU
will be published with zero rotation and translation.
You can override this behavior by setting camera.i_tf_imu_from_descr:
true. This will publish default IMU extrinsics from URDF based on camera
model."

https://docs.luxonis.com/software/ros/depthai-ros/driver/

-- Marco
>> hbrobotics/55A192D4-B525-4CC9-BB13-2D946E826D84%40gmail.com <https://
>> groups.google.com/d/msgid/hbrobotics/55A192D4-B525-4CC9-
>> BB13-2D946E826D84%40gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hbrobotics+...@googlegroups.com
> <mailto:hbrobotics+...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> hbrobotics/f619d6eb-1a7a-4007-8c7c-b94999edb63e%40hal-pc.org <https://
> groups.google.com/d/msgid/hbrobotics/f619d6eb-1a7a-4007-8c7c-
> b94999edb63e%40hal-pc.org?utm_medium=email&utm_source=footer>.

James H Phelan

unread,
Dec 22, 2025, 6:27:48 PM (12 hours ago) Dec 22
to hbrob...@googlegroups.com

Thanks, Marco!

I'll have to dig into this.

James

James H Phelan
"Nihil est sine ratione cur potius sit quam non sit"
Leibniz

Sergei Grichine

unread,
Dec 22, 2025, 7:14:19 PM (11 hours ago) Dec 22
to hbrob...@googlegroups.com
James,

Not sure what you meant by "The support for the BNO085 is pending reopening of the Fab Lab after New Years."


Best Regards,
-- Sergei


Chris Albertson

unread,
Dec 22, 2025, 7:52:11 PM (11 hours ago) Dec 22
to hbrob...@googlegroups.com
There is a two semester “Intro to robotics” class you can take as Arizona State Uniitverty (ASU) either for credit and get a grade or for free on-line. The instructor is the best I’ve seen.

Here is the main page where they lay out the full two semesters: https://www.robogrok.com/index.html

This is the part about rotation matrix: https://www.robogrok.com/1-1-3_Rotation_Matrices.php




James H Phelan

unread,
Dec 22, 2025, 11:04:38 PM (8 hours ago) Dec 22
to hbrob...@googlegroups.com

Sergei,

I mean the little piece of plastic that supports the IMU between the wheel axles. 

The screw spacing for the BNO085 is different than the BNO055 so I'm making a new one.

James H Phelan
"Nihil est sine ratione cur potius sit quam non sit"
Leibniz
Reply all
Reply to author
Forward
0 new messages