librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

About world coordinates of D435 in realsense-viewer

Open kubrakaracan opened this issue 8 years ago • 5 comments

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)


Required Info
Camera Model { D435 }
Firmware Version (05.09.14.00)
Operating System & Version Linux (Ubuntu 16)
Kernel Version (Linux Only) (4.15.32)
Platform PC
SDK Version { legacy / 2.<15> }
Language {C/C#/labview/nodejs/opencv/pcl/python/unity }
Segment {Robot/Smartphone/VR/AR/others }

Issue Description

Hi, in projection in Realsense SDK 2.0 it is written that the positive x-axis points to the right, the positive y-axis points down, and the positive z-axis points forward. However, in realsense-viewer the coordinate system looks different ( x to left, y points up). What is the reason for that? I also shared a ss for making my question clear. Thanks in advance. screenshot from 2018-08-28 14-42-25

kubrakaracan avatar Aug 28 '18 11:08 kubrakaracan

I don't have the answer for this question, but the I noticed that the axis orientation is also not the same between the Viewer visualization and the point cloud capture itself. So, as you said, there is indeed a difference between the different axis definitions.

Point cloud in the Viewer (lets assume X goes to the right, Y up and Z forward for the depth) : image

Same point cloud in Meshlab (the coordinates are not really what you would expect from the Viewer as Y is pointing down, but they match with what the documentation says) : image

AntoineWefit avatar Aug 28 '18 13:08 AntoineWefit

[Realsense Customer Engineering Team Comment] The points are calculated by rs2_deproject_pixel_to_point. https://github.com/IntelRealSense/librealsense/blob/master/include/librealsense2/rsutil.h#L50

and in other hands, the green axis points to Y-, in the realsense-viewer. https://github.com/IntelRealSense/librealsense/blob/master/common/rendering.h#L1210

That is the difference what you see.

[Realsense Customer Engineering Team Comment] @kubrakaracan Any other questions about this ticket? Looking forward to your update. Thanks!

Thank you for your answer! but I meant to say that why y-axis points to upward in realsense-viewer render? Should it point to downward as written in the document? I also checked the rendering algorithm you posted, and it is also written in positive manner. if y-axis points upward then x-axis in realsense-viewer points inversely?

kubrakaracan avatar Nov 04 '18 09:11 kubrakaracan

I got the point now, thank you so much !!

kubrakaracan avatar Nov 05 '18 13:11 kubrakaracan