Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gyroscope coordinates in c # #8746

Closed
anomal3 opened this issue Apr 6, 2021 · 5 comments
Closed

Gyroscope coordinates in c # #8746

anomal3 opened this issue Apr 6, 2021 · 5 comments

Comments

@anomal3
Copy link

anomal3 commented Apr 6, 2021


Required Info
Camera Model {D455 }
Firmware Version 05.12.12.100
Operating System & Version {Windows 10 LTSC
Platform PC
SDK Version { 2.43.0}
Language {C#/unity }
Segment {others }

Issue Description

Good afternoon friends. I found a great example that I need, but I cannot implement it in c #
link to Exaple! and link to source code C++

Woooow

I do not need such a graph in 3d
I just need the position coordinates.

Has anyone already done this? Pulling out the coordinates?

I'm talking about it
coords

If you know how to implement in c # please share an example with me

@MartyG-RealSense
Copy link
Collaborator

Hi @anomal3 There is not a lot of information available for accessing IMU streams with C#. There was a RealSense user who did so by using callbacks.

https://support.intelrealsense.com/hc/en-us/community/posts/360044035053-C-Time-out-with-D435i-IMU-data-enabled
https://support.intelrealsense.com/hc/en-us/community/posts/360044035053/comments/360011430533

An alternative approach suggested was to access the information through the RealSense SDK's Low-Level API (accessing the camera hardware directly).

#2996 (comment)

@anomal3
Copy link
Author

anomal3 commented Apr 6, 2021

Hi @anomal3 There is not a lot of information available for accessing IMU streams with C#. There was a RealSense user who did so by using callbacks.

https://support.intelrealsense.com/hc/en-us/community/posts/360044035053-C-Time-out-with-D435i-IMU-data-enabled
https://support.intelrealsense.com/hc/en-us/community/posts/360044035053/comments/360011430533

An alternative approach suggested was to access the information through the RealSense SDK's Low-Level API (accessing the camera hardware directly).

#2996 (comment)

thank you very much.
This is what I need. There is only a small BUT

var accelFrame = frameset.FirstOrDefault<Frame>(Stream.Accel, Format.MotionXyz32f).DisposeWith(frameset);
                    var b = Marshal.PtrToStructure<Vector3>(accelFrame.Data);

in win forms Error. PtrToStructure cannot be used with type arguments

If you use a console application, everything works fine.

Error

@MartyG-RealSense
Copy link
Collaborator

Thanks very much @anomal3 - I'm pleased that I could help! Do you require further assistance with this case, please?

@anomal3
Copy link
Author

anomal3 commented Apr 6, 2021

Thanks very much @anomal3 - I'm pleased that I could help! Do you require further assistance with this case, please?

Problems with PtrToStructure only
But in general, everything has been decided!

@MartyG-RealSense
Copy link
Collaborator

Great to hear. Please feel free to close the case with the Close Issue button underneath the comment writing box if you are satisfied with the outcome. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants