SOFTCLAW —
30
20
https://qbrobotics.com/product/qb-softclaw/
std::cout <<
"INFO: \tstrong grasp"
<< std::endl;
usleep(5000000);
commands[0] = -2200;
// fully open value
commands[1] = 0;
// must be always 0
commSetPosStiff(&file_descriptor, device_id, commands);
std::cout <<
"INFO: \tqb SoftClaw fully open"
<< std::endl;
usleep(1000000);
// ...
commActivate(&file_descriptor, device_id, FALSE);
//deactivate motor
usleep(10000);
result = commGetActivate(&file_descriptor, device_id, &status);
if
(result != 0) {
std::cout <<
"ERROR: fails while deactivating motor"
<< std::endl;
return
-1;
}
std::cout <<
"Demo finished..."
<< std::endl;
closeRS485(&file_descriptor);
return
0;
}
To compile the previous example, first of all follow the steps described
. Secondly we suggest to create a new .cpp file (e.g.
above. At this point create a new folder, for example named
include,
in which you have to copy
qbmove_communications.h
and
commands.h
. Then copy and paste the generated static
library
"libqbmove_comm.a"
in
the folder containing the code and
in a
terminal shell execute the
commands:
g++ claw_example.cpp libqbmove_comm.a -o claw_example
. /claw_example
6.3 Configuration GUI
6.3.1 Installation
You can download our GUI from our
(download area).
To install all the requirements for your specific operating system, please refer to
For Linux users: use
chmod +x
on a the downloaded file and make it executable. Right click
on your script and chose
Properties
->
Permissions
->
Allow executing file as program
,
leaves you with the exact same result as the command in terminal.