QB Robotics SoftHand2 Research General Manual page 40

Table of Contents

Advertisement

36  —  SOFTWARE
CMake project setup
In order to set up a CMake project, using the compiled files, that implements your own application, we
suggest to create a new project that has a structure similar to the following:
├── include
│ ├── qbrobotics_research_api
│ └── serial
├── libs
└── src
└── CMakeLists.txt
the folder include/qbrobotics_research_api must contain the following header files:
qbrobotics_research_api.h - present in the folder qbdevice-api-7.x.x/qbrobotics-driver/libs/
research/include/qbrobotics_research_api of qbdevice-api-7.x.x project.
qbrobotics_research_commands.h - present in the folder qbdevice-api-7.x.x/qbrobotics-driver/libs/
research/include/qbrobotics_research_api of qbdevice-api-7.x.x project.
qbsofthand2_research_api.h - present in the folder qbdevice-api-7.x.x/qbrobotics-driver/libs/
research/include/qbrobotics_research_api of qbdevice-api-7.x.x project.
the folder include/serial must contain the following header file:
serial.h - present in the folder qbdevice-api-7.x.x/serial/include
the folder libs must contain the compiled libraries obtained by following the instructions in the
previous paragraph.
the folder src must contain the main.cpp that exploits qbrobotics API functionalities.
The CMakeLists.txt has to configure the project to link against the compiled libraries.
Once the folders setup is finished you can compile your own application by executing the commands used
to compile the libraries in the previous folder.
An example of how to structure the project can be found in the
27
SH2R-v7
. This project explains also how to handle the communication with qb SoftHand2
Research and how to control it.
 
The Research devices, manufactured by qbrobotics, are open source as the company's aim is
to facilitate the work of our customers by allowing them to personalise the use of the device to
their liking.
Within the source code, however, there are functions that if used improperly can damage the
device and invalidate its warranty status.
What we ask is therefore that you only use the functions that you really need and make sure
you fully understand how they work before you use them.
Our Support Team is always at your disposal for any clarification you may need, you can
contact them at
https://bitbucket.org/qbrobotics/api-test-sh2r-v7/src/master/
27
mailto:support@qbrobotics.com
28
GENERAL MANUAL  —  SEP 8, 2022 — RELEASE: V1.0.2
support@qbrobotics.com
28
address.
Bitbucket repository API-test-

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SoftHand2 Research and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents