Items with no label
3335 Discussions

I want to know is there a way to exact the roll pitch yaw angle of the camera through Python SDK.

ygao16
Beginner
3,878 Views

Hi, guys

I want to know is there a way to exact the roll, pitch, yaw angle of the camera through Python SDK. Also, is there any complete documents for me to refer all the methods in the SDK? From the Github example I can only learn limited info.

0 Kudos
1 Solution
MartyG
Honored Contributor III
2,669 Views

If you mean the documentation directory page is blank, that is its normal appearance for its front page, with menus at the top of the page. You then use the menus to search the SDK function names.

 

If you want to get the physical pitch, roll and yaw of the camera, I believe you will need a camera model that has an Inertial Measurement Unit. The D435i camera has an IMU but the standard D435 model does not.

 

In the past week, Intel published a guide to getting IMU data with the D435i and T265 models. The T265 has an IMU like the D435i but does not have depth sensing built in, so would not be a suitable choice if your project needed depth data as well as yaw-pitch-roll.

 

https://realsense.intel.com/how-to-getting-imu-data-from-d435i-and-t265/?language=en_US

 

View solution in original post

4 Replies
MartyG
Honored Contributor III
2,669 Views

I did an extensive search but the only reference for Python I could find where it was used was a Python example called opencv_pointcloud_viewer.py. Even in C++ the pitch and yaw are only referenced in one point-cloud example script.

 

The first reference to setting up pitch and yaw is at line 37 of the script, which I have created a jump-link to. You can see the other references easily in the script by doing a 'find' operation on the browser page for the word 'yaw' or 'pitch' so these words are highlighted.

 

https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/opencv_pointcloud_viewer.py#L37

 

In regard to searching for SDK instructions, the menu-driven documentation by user UnaNancyOwen is the best available. It draws the information directly from the official documentation sources and arranges it into a user-friendly format.

 

https://unanancyowen.github.io/librealsense2_apireference/

0 Kudos
ygao16
Beginner
2,669 Views

Marty

Thanks so much for your reply! I have checked the example you've mentioned, that pitch, yaw, roll angle is not the pitch, roll, yaw angle of the camera, they are the orientation angle of the perspective view. You can change them by dragging the display window. The second links you've provided me direct me to a black page somehow. :(

I think we should be able to directly get the Euler angle of the camera. I just don't know how.

Best

Yuan

0 Kudos
MartyG
Honored Contributor III
2,670 Views

If you mean the documentation directory page is blank, that is its normal appearance for its front page, with menus at the top of the page. You then use the menus to search the SDK function names.

 

If you want to get the physical pitch, roll and yaw of the camera, I believe you will need a camera model that has an Inertial Measurement Unit. The D435i camera has an IMU but the standard D435 model does not.

 

In the past week, Intel published a guide to getting IMU data with the D435i and T265 models. The T265 has an IMU like the D435i but does not have depth sensing built in, so would not be a suitable choice if your project needed depth data as well as yaw-pitch-roll.

 

https://realsense.intel.com/how-to-getting-imu-data-from-d435i-and-t265/?language=en_US

 

ygao16
Beginner
2,669 Views

Thank you so much! My sensor is D435i, I think I should be able to extract the Euler angle. I'll have a try today.

0 Kudos
Reply