Skip to content

flexivrobotics/flexiv_rdk_csharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flexiv_rdk_csharp

Project Introduction

This project is a Windows 10 solution using Visual Studio 2019, which calls the C++ interfaces from flexiv_rdk via P-Invoke and wraps them with some C# interfaces. The FlexivRobotCSharp folder contains a C# project, with the Examples folder housing example programs that utilize the interfaces from FlexivRdk. The FlexivRdk folder contains the C# wrappers for these interfaces, which call the functions from FlexivRobotDll. The Program.cs file is the test program, which uses examples from the Examples folder. The FlexivRobotDll folder is a C++ project that wraps the C++ interfaces from flexiv_rdk and generates a dynamic library from its static library. The ReleaseDll folder contains the precompiled dynamic libraries.

Usage

To use the current C# project, simply use the .cs files from the FlexivRobotCSharp/FlexivRdk folder and place the dynamic libraries from the ReleaseDll folder in the directory where the generated C# .exe file is located. The project has already set the output paths of FlexivRobotCSharp and FlexivRobotDll to the same folder, with FlexivRobotCSharp set as the startup project. Building FlexivRobotDll will generate the required dynamic libraries. In its project settings, you can replace the C/C++ additional include directories, linker additional library directories, and additional dependencies with your own local settings. Users can extend the interfaces as needed.

项目介绍

本项目是一个Windows10 下Visual Studio 2019的解决方案,使用P-Invoke方式调用flexiv_rdk中的C++接口,封装了一些C#接口。FlexivRobotCSharp文件夹是一个C#项目,其中Examples文件夹下是示例程序,使用FlexivRdk中的接口。FlexivRdk文件夹下是封装的C#接口,调用FlexivRobotDll中的接口。Program.cs是测试程序,使用Examples中的例程。FlexivRobotDll文件夹是一个C++项目,用于包装flexiv_rdk的C++接口,根据其静态库生成动态库。ReleaseDll文件夹下包含已经编译好的动态链接库。

使用方法

当前C#项目直接使用FlexivRobotCSharp/FlexivRdk文件夹下的.cs文件,将ReleaseDll下的动态链接库放到当前C#生成.exe文件的目录,即可运行。当前项目已将FlexivRobotCSharpFlexivRobotDll输出路径设置为同一个文件夹,将FlexivRobotCSharp设为启动项目。对FlexivRobotDll生成会得到所需的动态链接库,在其项目属性中可以将C/C++附加包含目录,链接器中的附加库目录和附加依赖项中的配置项换成自己的本地设置。用户可以自行扩展所需要的接口。

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages