SOFTCLAW —
39
•
•
•
•
•
•
•
•
Figure 14. —
qb SoftClaw URCap program example
6.3.7 URCap enabled script functions
Apart from the UI features described above, you can add some custom function in your robot program by
using our script methods:
int[] qbdevice.getClawMeasurements()
: returns a two-integer vector data; the first value is
the current motor position, while the second represents the motor current consumption expressed in
mA;
bool qbdevice.isReachable()
: returns "true" if the serial communication is active;
void qbdevice.setClawCtrlMode(int ctrl_id)
: set the control mode of the qb SoftClaw:
0
: position;
4
: deflection.
void qbdevice.setClawCommand
: this command is used to send control reference to the qb
SoftClaw. It works both in
position
and in
deflection
mode and the user has to pay attention on the
control mode selected.
In
deflection
it has to be used as
qbdevice.setClawCommand(int command, 0)
and it sends a
reference force command to the device; the integer parameter must be value in range [-2200 —
4200].
In
position
it has to be used as
qbdevice.setClawCommand(int command_pos, int
command_stiff)
and it sends a reference position and stiffness command to the device; the
position parameter must be value in range [0 — 4500], the stiffness parameter must be value in
range [0 — 32000].
These commands are meant to be used by expert users only.