Hello,

I am working with an OAK-D-LITE camera, the version with a built-in IMU. I have a question about position and orientation of the IMU frame wrt. any of camera's frames.

I am going to attach it in ROS2 to a robot base and I would like to use also IMU for EKF. Current version of the OAK-D-LITE does not have a imu_frame published. I am able to modify description package by myself but I am not able to find a proper transformation of the imu frame. 

I found a file luxonis/depthai-boardsblob/main/boards/OAK-D-LITE.json which contains some transformations but I verified it with other cameras in ROS2 which supports IMU and IMU's transformation from that file does not match IMU's tranformation in ROS2.

Could you help me to localise that frame?

Best regards

    Published data on oak/imu/data topic provided by the ros2 humble driver give us earth acceleration in the +Y axis. Then I can not use it for robot_localization because it requires Z axis - up (so +9.81 in Z axis).

    5 days later

    Hi,
    sorry for the delayed response but I was out sick. We are planning to get IMU extrinsics directly from the firmware in V3 release of Depthai library targeted towards ROS2 Kilted release, so for now we didn't focus on updating URDFs as they will become obsolete in few months, although we can skip & add this in the next couple of days. One thing to keep in mind is that currently IMU data is being published in Left-Handed CS (due to legacy reasons), which might involve additional transformation, this is also something that we intend to change in Kilted.

    Thank you for the response. Should I republish IMU data after left-right handed CS transformation then or just transform the frame with name "frame_id" which is provided in header of IMU message?

    This is the tricky part, to have "proper" IMU data you would probably need to flip one of the signs, for example Y (unfortunately AFAIK ROS transforms don't support reflection in rotation since integrating it "invalidates" the rotation matrix), and additionally include additional transform (imu_frame->imu_extra_frame) to refer the data's frame_id to which would result in the proper IMU orientation w.r.t the camera frame.
    If that sounds a bit confusing, then yes, it currently is 😅 and that is why we are going to simplify things much in the next release, unfortunately making changes in current releases could potentially break things for users that use current format.