Skip to content

Release/v1.5.1#1

Merged
zlin-flexiv merged 21 commits intomainfrom
release/v1.5.1
Aug 5, 2025
Merged

Release/v1.5.1#1
zlin-flexiv merged 21 commits intomainfrom
release/v1.5.1

Conversation

@zlin-flexiv
Copy link
Collaborator

This is a C# project that uses p/invoke to call the C++ Flexiv Rdk. It uses json to pass the FlexivDataTypes variable type, covering most of the functions in the C++ interface and excluding the Model class and the Scheduler class. Corresponding to Flexiv Rdk v1.5.1.

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can create multi sub-README files in multi-languages, then link the different sub files in the main README file.
refer to https://blog.csdn.net/m0_57236802/article/details/132600529

README.md Outdated
@@ -1 +1,9 @@
# flexiv_rdk_csharp No newline at end of file
# flexiv_rdk_csharp
## Project Introduction
Copy link
Collaborator

Choose a reason for hiding this comment

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

FlexivRdkCSharp

<Recommend adding the public license, you can pick a loose license like apache>
License

For C# developers to easily work with RDK, the APIs of RDK are wrapped in flexiv_rdk_csharp. It uses p/invoke to call most of the functions in the RDK C++ interface excluding the flexiv::rdk::Model and the flexiv::rdk::Scheduler.

References

Flexiv RDK main webpage contains important information like RDK user manual and network setup.

Compatibility

Supported OS Supported Visual Studio distribution
Windows10 Visual Studio 2019 <Is the professional version required or personal version?>

Getting Started

<Recommend listing the steps 1.2.3.... to guide the user to build the project from a newly booted windows system, which means that all the compiler and IDE were not installed, otherwise you will pay much effort to guide them ^_^ >

Example

<Recommend describing the provided examples, e.g. how to build and run >

Copy link
Collaborator

Choose a reason for hiding this comment

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

recommend renaming the file name with patten flexiv_rdk.OS platform-VS version.dll if this dll is only compatible with one OS and platform, e.g. flexiv_rdk.win64-vs2019.dll.
If it's compatible with multi-OS or plat form, then just name to FlexivRdk.
For compatibility with flexiv_rdk, you can describe the compatibility with rdk in your release note after you created a git tag.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok. I will adjust the name of the dynamic library

Copy link
Collaborator

Choose a reason for hiding this comment

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

This file is really long, recommend moving the lines not used.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is automatically generated by the IDE and is relatively stable and reliable

string robotSN = args[0];
try
{
var robot = new Robot(robotSN); // Instantiate robot interface
Copy link
Collaborator

Choose a reason for hiding this comment

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

recommend moving the comment line above the code

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, I'll adjust the comment position

string robotSN = args[0];
try
{
var robot = new Robot(robotSN); // Instantiate robot interface
Copy link
Collaborator

Choose a reason for hiding this comment

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

comment line position

Copy link
Collaborator

Choose a reason for hiding this comment

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

recommend naming the example files with the same style of flexiv_rdk/examples

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The capitalized file name is to comply with the norms recommended by the community, and when a new file is added, a namespace that conforms to the Pascal criterion will be automatically generated. For example, adding a new file under the "example" folder will generate the namespace FlexivRdkCSharp.Example. I will change the name of the sample program to the same as that in rdk c++

{"lockExternalAxes", 0 }
});
while (!(FlexivDataUtils.TryGet<int>(robot.GetPrimitiveStates(),
"reachedTarget", out var flag) && flag == 1)) // Wait for reached target
Copy link
Collaborator

Choose a reason for hiding this comment

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

comment line position

<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>D:\flexiv_rdk\rdk_install_v1.5.1\include\eigen3;D:\flexiv_rdk\rdk_install_v1.5.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Recommend removing the hardcoded include directory
D:\flexiv_rdk\rdk_install_v1.5.1\include\eigen3;D:\flexiv_rdk\rdk_install_v1.5.1\include;%(AdditionalIncludeDirectories

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If the user wants to compile the dynamic library by himself, this part of the configuration needs to be modified by himself. This is a fixed configuration in vs2019. The project already includes dynamic libraries that can be used directly, and users do not need to compile them by themselves. Unless I also add the static libraries compiled by RDK in the project and set the relative references.

<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>D:\flexiv_rdk\rdk_install_v1.5.1\lib;D:\flexiv_rdk\flexiv_rdk\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also here: <AdditionalLibraryDirectories>D:\flexiv_rdk\rdk_install_v1.5.1\lib;D:\flexiv_rdk\flexiv_rdk\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
Are there better ways to let user specify their env themselves?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The project configuration file can be ignored

@ZhipengZhang-flexiv ZhipengZhang-flexiv self-requested a review August 4, 2025 05:35
@zlin-flexiv zlin-flexiv merged commit 5e29a6b into main Aug 5, 2025
1 check passed
@zlin-flexiv zlin-flexiv deleted the release/v1.5.1 branch August 6, 2025 09:03
@zlin-flexiv zlin-flexiv restored the release/v1.5.1 branch August 6, 2025 09:08
@zlin-flexiv zlin-flexiv deleted the release/v1.5.1 branch August 6, 2025 09:15
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.

2 participants