Items with no label
3335 Discussions

How to get the extrinsics from color camera to motion module (IMU) for zr300 camera?

QShi5
Beginner
1,407 Views

I have a realsense zr300 camera used for vision-inertial odometry, in which case the extrinsics matrix from color camera to motion module is needed.

So how can I get the extrinsics ?

I have tried the function

dev->get_motion_extrinsics_from(rs::stream::color)

provided by cross-platform library librealsense. Well the function returns error, I look into the function and find that the error comes from

throw std::runtime_error("Motion intrinsic is not valid");

But I can get the motion intrinsics using the function

dev->get_motion_intrinsics();

So how to solve the problem? Can I get the extrinsics directly from the library? If not, should I calibrate the extrinsics manually?

0 Kudos
3 Replies
MartyG
Honored Contributor III
223 Views

Researching the ZR300.cpp script, I note that it uses the following format:

rs_extrinsics zr300_camera::get_motion_extrinsics_from(rs_stream from) const

I wonder if you could get the information that you need this way? The majority of sources I came across during my research used this format to get motion extrinsics.

A Librealsense documentation page also has this reference:

https://software.intel.com/sites/products/realsense/camera/classrs_1_1device.html# a347cf03bc776900fc9ed10fd3c43b731 Intel® RealSense™ Cross Platform API (librealsense): rs::device Class Reference

0 Kudos
QShi5
Beginner
223 Views

Hi, MartyG

Thanks for your reply.

I'm using the Librealsense API you mentioned in this way:

dev->get_motion_extrinsics_from(rs::stream::color);

 

and get the error, obviously it does not work.

Debugging into the function "get_motion_extrinsics_from()", I find that it finally call the "rs_extrinsics zr300_camera::get_motion_extrinsics_from(rs_stream from) const" function.

Can you please share me some sources using that format to get motion extrinsics?

Many Thanks!

Qin Shi

0 Kudos
MartyG
Honored Contributor III
223 Views

Line 299 of the zr300.cpp script uses that exact code. This script seems to be the only place where this line can be found.

https://github.com/IntelRealSense/librealsense/blob/master/src/zr300.cpp librealsense/zr300.cpp at master · IntelRealSense/librealsense · GitHub

0 Kudos
Reply