What if I want to add custom API to deepstream?

**• Hardware Platform (Jetson / GPU)**Jetson
• DeepStream Version6.1.1
**• JetPack Version (valid for Jetson only)**5.0.1

Dear all,I am trying to use deepstream to get the position of the detected objects.After that, the 2D coordinate will be transformed to 3D coordinate by using the camera’s internal parameters.

And after I get the coordinate,I want to control a robot arm to move to that position to grasp it.

The robot API is like:


These are header file and corresponding cpp file.
So,my question is,can I add the extra robot API to the deepstream folder? If I can, where should I add?
By the way,I am using deepstream_app sample :

What do you mean by “add the extra robot API to the deepstream folder”?

What kind of robot API do you want to add? What are the functions of the API?

deepstream-app is an independent app(process) and the robot API code you post shows that it is an independent app(process) too. Are you talking about how to exchange data and message between the two apps?

In the example I post,the robot API is via cmake to compile and it is on the ROS to operate.Here I may just want to use some simple function in that API to control the robot ,and I want to add that to deepstream_app sample code because I have get the position and angle parameter I need.
By the way, the funtion may be like:


which is a initial progress in the whole code snippet and the include file:

The JrtControl.h is the main used robot API.Others are some math APIs to apply coordinate transformation.

So can I just add such code snippet to deepstream_app sample ?

can I just add that h file to here?

There is no limitation of where to put your source code files and header files. You can write the correct makefile to make the source codes files to be built together.

So maybe I can just put the cpp file and header file under here?

They are just source codes, I don’t think the directory you put them will impact their functions. At least, there is no limitation from DeepStream point.

Ok,thank you, I will try that.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.