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

C# example for pose stream (for T265 device) #8860

Merged
merged 3 commits into from
Jun 6, 2021

Conversation

SergeySPF
Copy link
Contributor

No description provided.

@SergeySPF SergeySPF closed this Apr 20, 2021
@SergeySPF SergeySPF reopened this Apr 20, 2021
@maloel maloel requested a review from Nir-Az May 25, 2021 08:08
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Intel(R) RealSense(TM) SDK C# Wrapper Tutorial-1")]
Copy link
Collaborator

@Nir-Az Nir-Az May 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tutorial-5

[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Intel(R) Corporation")]
[assembly: AssemblyProduct("Intel(R) RealSense(TM) SDK C# Wrapper")]
[assembly: AssemblyCopyright("Copyright � 2017, Intel Corporation. All rights reserved")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2021

Pose data = frame.As<PoseFrame>().PoseData;

// Print the x, y, z values of the translation, relative to initial position
Console.WriteLine("Device Position: {0} {1} {2} (meters)", data.translation.x.ToString("N3"), data.translation.y.ToString("N3"), data.translation.z.ToString("N3"));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not override the printed line same as in C++ example?
"\r"

Console.WriteLine("Device Position: {0} {1} {2} (meters)", data.translation.x.ToString("N3"), data.translation.y.ToString("N3"), data.translation.z.ToString("N3"));
}

Thread.Sleep(100);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried running this example,
it keeps exit on an exception from "wait_for_frames()",
The exception is frame did not arrived in 5000 [ms].
It happens for me after ~30 seconds

Do you see it?

It does not happen on the C++ example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed C# example

Copy link
Collaborator

@Nir-Az Nir-Az left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks goods.

@maloel maloel merged commit b79b5ea into IntelRealSense:development Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants