orbbec / OrbbecSDK_CSharp

3 stars 1 forks source link

C# wrapper completeness and problems with adding missing methods #3

Open vartid-ak opened 1 month ago

vartid-ak commented 1 month ago

Hi,

Thank you for this wrapper. It helped a lot.

When we implemented our solution, sometimes we found some methods we wanted to use, but we could not find in the C# wrapper. Finally we were able to substitute them with another method calls, but it would be good to know if this wrapper complete or some methods still need to be added, and if so, than will you add them, or it is better if we do it ourselves.

We tried to extend the C# wrapper (src/obNative.cs) by adding methods defined in the OrbbecSDK/include/libosensor/.h files. E.g. We tried to add wrapper for
`ob_extrinsic ob_stream_profile_get_extrinsic_to(ob_stream_profile
source, ob_stream_profile *target, ob_error **error); which is defined in theOrbbecSDK/include/libosensor/StreamProfile.h` file. But it can't be found in the dll. (we tried the version in https://github.com/orbbec/OrbbecSDK_CSharp repo, and the latest SDK too

Where can we find the list of methods which should be presented in the dll-s as exported ones?

Thank you,

András

jb455 commented 1 month ago

Hi, I started to add intrinsic/extrinsic getters in my fork but I realised you can get them out already after starting the pipeline using: CameraParam cameraParams = pipeline.GetCameraParam();

James

vartid-ak commented 1 month ago

Thanks James,

I also used CameraParam cameraParams = pipeline.GetCameraParam();

But I'm a bit confused because as I feel the C# wrapper methods, the documentation, C++ sample codes , the dll content and the .h files are not in sync.

There are method in .h files which are not in the dll as exported methods. Are they obsolete and to be removed from .h file or should have been exported in the dll?

Is the C# wrapper complete? So, when we can’t find something in it (e.g., from a C++ example), is there some other method which implements that functionality, or should we sometimes add a new wrapper method to the C# wrapper ourselves?

zhonghong322 commented 1 month ago

Thanks James,

I also used CameraParam cameraParams = pipeline.GetCameraParam();

But I'm a bit confused because as I feel the C# wrapper methods, the documentation, C++ sample codes , the dll content and the .h files are not in sync.

There are method in .h files which are not in the dll as exported methods. Are they obsolete and to be removed from .h file or should have been exported in the dll?

Is the C# wrapper complete? So, when we can’t find something in it (e.g., from a C++ example), is there some other method which implements that functionality, or should we sometimes add a new wrapper method to the C# wrapper ourselves?

We will go to enhance this C# code and fix the issue in October.