Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

C# support #136

Closed
6 tasks done
joylital opened this issue Mar 13, 2019 · 11 comments
Closed
6 tasks done

C# support #136

joylital opened this issue Mar 13, 2019 · 11 comments
Assignees
Labels
CSharp This issue affects only the C# Wrapper Enhancement New feature or request Triage Approved The Issue has been approved by an Azure Kinect team member.
Milestone

Comments

@joylital
Copy link

joylital commented Mar 13, 2019

  • .NET Standard wrapper
  • Functional tests
  • Unit tests
  • CI Automation
  • NuGet Packaging
  • SDK Packaging

C# support

Target .NET Frameworks

  • .NET Framework (desktop apps)
  • .NET Core (Windows and Linux)

Target UI Framewoks

  • WPF
  • WinForms
@joylital joylital added the Enhancement New feature or request label Mar 13, 2019
@joylital joylital added this to the 1.1.0 milestone Mar 13, 2019
@Brent-A Brent-A self-assigned this Mar 19, 2019
@Brent-A
Copy link
Contributor

Brent-A commented Mar 19, 2019

The current proposal is to implement C# support as a managed .NET Standard wrapper that uses P/Invoke to interface with k4a.dll and k4arecord.dll. We can then have additional framework specific assemblies for WPF/WinForms/etc. that reference and extend the core functionality.

We need to avoid changes in the public headers and APIs that might impact the managed marshalling, since we don't have a good method to validate correctness for all of the API usages.

We need build system support to ensure that the C# is compiled and tested as part of the normal CI.

@Brent-A
Copy link
Contributor

Brent-A commented Apr 8, 2019

An implementation is underway in feature/csharp

@Brent-A
Copy link
Contributor

Brent-A commented Apr 26, 2019

Currently the wrapper is "feature complete" for the basic live API, but not yet implemented for recording or playback. There is some functional and unit test coverage, but more to come.

For the C# API design the biggest point of consideration is access to the underlying raw memory and ensuring managed code safety in the application. We can expose a direct IntPtr referencing the buffer, and expose APIs to copy data in/out of IntPtrs, however this is not a safe operation in managed code and requires that the caller be very careful with the lifetime of the managed objects to avoid memory corruption.

The current design goal is to provide a safe by default implementation which allows the caller to stream, process, and render data in a reasonably performant manner, but still provide access to users who are willing to use unsafe blocks to access the data directly when needed.

@cdedmonds cdedmonds modified the milestones: 1.1.0, 1.2.0 Apr 29, 2019
@Brent-A Brent-A added the Triage Approved The Issue has been approved by an Azure Kinect team member. label May 7, 2019
@vpenades
Copy link

@Brent-A I have some thoughts for the C# wrapper:

I've noticed the body tracking SDK uses some structures of the Kinect4A DK, in particular it uses k4a_result_t, k4a_calibration_t, k4a_wait_result_t, k4a_capture_t , and might use others too...

I don't know if it's possible, but it could be interesting if the new Body tracker could be used offline, even without a device plugged, for which it could be interesting to use the body tracker without dragging the whole Microsoft.Azure.Kinect.Sensor.... so I was thinking if it could be possible to split the project into two assemblies.... something that would only containt the core, exchangeable types (so it could be used separately) and another one for the actual API.

About accessing IntPtr* .... its something we do use in our current implementation of Kinect2 for performance reasons, if such an API is considered, it could be nice if the exposed API uses ReadOnlySpan instead of IntPtr*

@DerekMa-WP DerekMa-WP added the CSharp This issue affects only the C# Wrapper label Jul 31, 2019
@DerekMa-WP
Copy link
Contributor

The bulk of the C# support is in develop now and we are mostly working on cleanup, bugs, and documentation. Closing this issue out in favor of individual issues for the remaining work.

@Sn34k
Copy link

Sn34k commented Aug 15, 2019

By Chance is this SDK for the V2 Kinect Sensor!?

@DerekMa-WP
Copy link
Contributor

This SDK only supports the Azure Kinect DK. It does not support the Kinect for Windows v2.

@hcghanta
Copy link

When can I expect the C# wrapper for Body Tracking SDK?

@dhgokul
Copy link

dhgokul commented Oct 22, 2019

@MsDerekMa Any updates on C# wrapper for Body Tracking ?

@dhgokul
Copy link

dhgokul commented Oct 22, 2019

Guys check it below link,it may be useful
https://ivatilca.wordpress.com/2019/08/22/first-azure-kinect-app-c-api-vs-c-k4a-nuget-package/ - Explain both how to use C API and C# API

@DerekMa-WP
Copy link
Contributor

@dhgokul as noted in #689, we don't have the the C# wrapper for Body Tracking planned. We are tracking the request on the feedback site, https://feedback.azure.com/forums/920053-azure-kinect-dk/suggestions/38661742-bodytracking-c-wrapper, to help us understand interest levels.

jmachowinski pushed a commit to jmachowinski/Azure-Kinect-Sensor-SDK that referenced this issue Sep 21, 2020
* Integrate with the latest rosonwindows_ci template.

* borrow a fix from GitHub workflow.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CSharp This issue affects only the C# Wrapper Enhancement New feature or request Triage Approved The Issue has been approved by an Azure Kinect team member.
Projects
None yet
Development

No branches or pull requests

8 participants