12.1. Force Sensor Configuration
Prototype | FT_SetConfig(company,device,softversion=0,bus=0) |
Description | Force Sensor Configuration |
Required Parameters |
|
Default parameters |
|
Return Value | Error Code Success-0 Failure- errcode |
12.2. Get Force Sensor Configuration
Prototype | FT_GetConfig() |
Description | Get Force Sensor Configuration |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
12.3. Force sensor activation
Prototype | FT_Activate(state) |
Description | Force sensor activation |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
12.4. Force Sensor Zeroing
Prototype | FT_SetZero(state) |
Description | Force Transducer Zeroing |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
12.5. Setting the force transducer reference coordinate system
Changed in version python: SDK-v2.0.5
prototype | FT_SetRCS(ref,coord=[0,0,0,0,0,0,0]) |
Description | Setting the force transducer reference coordinate system |
Mandatory parameters |
|
Default parameters |
|
Return Value | Error Code Success-0 Failure- errcode |
12.6. Setting the load weight under the force transducer
New in version python: SDK-v2.0.5
Prototype | SetForceSensorPayload(weight) |
Description | Set the load weight under the force transducer |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
12.7. Setting the load center of mass under the force transducer
New in version python: SDK-v2.0.5
Prototype | SetForceSensorPayloadCog(x,y,z) |
Description | Setting the center of mass of the load under the force transducer |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
12.8. Getting the load weight under the force transducer
New in version python: SDK-v2.0.5
Prototype | GetForceSensorPayload() |
Description | Get the weight of the load under the force transducer. |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
12.9. Obtaining the center of mass of the load under the force transducer
New in version python: SDK-v2.0.5
Prototype | GetForceSensorPayloadCog() |
Description | Getting the center of mass of the load under the force transducer |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
12.10. Automatic zeroing of force sensors
New in version python: SDK-v2.0.5
Prototype | ForceSensorAutoComputeLoad() |
Description | Automatic zeroing of force sensors |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
12.11. Obtaining force/torque data in the reference coordinate system
Prototype | FT_GetForceTorqueRCS() |
Description | Get force/torque data in reference coordinate system |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
12.12. Obtaining Force Sensor Raw Force/Torque Data
Prototype | FT_GetForceTorqueOrigin() |
Description | Get force sensor raw force/torque data |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
12.13. Force sensor configuration and automatic zero correction code example
from fairino import Robot
# Establish a connection with the robot controller and return a robot object if the connection is successful
robot = Robot.RPC('192.168.58.2')
company = 24
device = 0
softversion = 0
bus = 1
index = 1
robot.FT_SetConfig(company, device, softversion, bus)
time.sleep(1)
error,[company, device, softversion, bus] = robot.FT_GetConfig()
print(f"FT config:{company},{device},{softversion},{bus}")
time.sleep(1)
robot.FT_Activate(0)
time.sleep(1)
robot.FT_Activate(1)
time.sleep(1)
time.sleep(1)
robot.FT_SetZero(0)
time.sleep(1)
error,ft = robot.FT_GetForceTorqueOrigin()
print(f"ft origin:{ft[0]},{ft[1]},{ft[2]},{ft[3]},{ft[4]},{ft[5]}")
robot.FT_SetZero(1)
time.sleep(1)
ftCoord = [0, 0, 0, 0, 0, 0]
robot.FT_SetRCS(0, ftCoord)
robot.SetForceSensorPayload(0.824)
robot.SetForceSensorPayloadCog(0.778, 2.554, 48.765)
error,weight = robot.GetForceSensorPayload()
error,x, y, z = robot.GetForceSensorPayloadCog()
print(f"the FT load is {weight}, {x} {y} {z}")
robot.SetForceSensorPayload(0)
robot.SetForceSensorPayloadCog(0, 0, 0)
error,computeWeight, tran = robot.ForceSensorAutoComputeLoad()
print(f"the result is weight {computeWeight} pos is {tran[0]} {tran[1]} {tran[2]}")
robot.CloseRPC()
12.14. Load weight identification records
Prototype | FT_PdIdenRecord(tool_id) |
Description | Load weight identification record |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
12.15. Load weight identification calculation
Prototype | FT_PdIdenCompute() |
Description | Load weight identification calculation |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
12.16. Load center of mass identification records
prototype | FT_PdCogIdenRecord(tool_id,index) |
Description | Load center of mass identification record |
Mandatory parameter |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
12.17. Load center of mass identification calculation
Prototype | FT_PdCogIdenCompute() |
Description | Load center of mass identification calculation |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|