21
15 luglio 2019
6
Working with qb SoftHand Industry
For the API the description of the class functions is:
namespace qbsofthand_industry_api_
class qbSoftHandIndustryAPI
qbSoftHandIndustryAPI()
Initialize the qb SoftHand Industry API handler by opening the proper
UDP socket and by testing its communication. The constructor tries to
connect to the qb SoftHand Industry for at most 30 seconds and then
returns. Through the method 'isInitialized()' is possible to test whether
the initialization succeeded or not. The default IPv4 address used for
the UDP socket connection is 192.168.1.110.
qbSoftHandIndustryAPI(const std::string &device_ip)
Initialize the qb SoftHand Industry API handler by opening the proper
UDP socket and by testing its communication. The constructor tries to
connect to the qb SoftHand Industry for at most 30 seconds and then
returns. Through the method 'isInitialized()' is possible to test whether
the initialization succeeded or not.
device_ip
The IPv4 address used for the UDP socket connection. It must
be a valid IPv4 address.
~qbSoftHandIndustryAPI()
Close the UDP socket and perform the proper shutdown procedures.
float getCurrent()
Get the actual qb SoftHand Industry motor torque in percent value
w.r.t. the maximum value.
float getPosition()
Get the actual qb SoftHand Industry motor position in percent value
w.r.t. the maximum value.
float getVelocity()