AUBO SDK  0.26.0
Loading...
Searching...
No Matches
arcs::common_interface::ForceControl Class Reference

Abstract class for force control interface More...

#include <force_control.h>

Public Member Functions

 ForceControl ()
 
virtual ~ForceControl ()
 
int fcEnable ()
 Start force control
 
int fcDisable ()
 End force control
 
bool isFcEnabled ()
 Check if force control is enabled
 
int setTargetForce (const std::vector< double > &feature, const std::vector< bool > &compliance, const std::vector< double > &wrench, const std::vector< double > &limits, TaskFrameType type=TaskFrameType::FRAME_FORCE)
 Set force control reference (target) value
 
int setDynamicModel1 (const std::vector< double > &env_stiff, const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
 Set force control dynamics model
 
DynamicsModel fcCalDynamicModel (const std::vector< double > &env_stiff, const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
 Calculate force control dynamics model
 
int setDynamicModelSearch (const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
 Set force control dynamics model for hole searching scenario
 
int setDynamicModelInsert (const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
 Set force control dynamics model for insertion/extraction scenario
 
int setDynamicModelContact (const std::vector< double > &env_stiff, const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
 Set force control dynamics model for contact scenario
 
int setDynamicModel (const std::vector< double > &m, const std::vector< double > &d, const std::vector< double > &k)
 Set force control dynamics model
 
int fcSetSensorThresholds (const std::vector< double > &thresholds)
 Set force control thresholds
 
int fcSetSensorLimits (const std::vector< double > &limits)
 Set force control maximum force limits
 
std::vector< double > getFcSensorThresholds ()
 Get force control thresholds
 
std::vector< double > getFcSensorLimits ()
 Get maximum force limits
 
DynamicsModel getDynamicModel ()
 Get force control dynamics model
 
int setCondForce (const std::vector< double > &min, const std::vector< double > &max, bool outside, double timeout)
 Set force control termination condition: Force.
 
int setCondOrient (const std::vector< double > &frame, double max_angle, double max_rot, bool outside, double timeout)
 setCondOrient is used to set up an end condition for the tool orientation.
 
int setCondPlane (const std::vector< double > &plane, double timeout)
 Specify a valid force control plane, x-y plane, z direction is valid
 
int setCondCylinder (const std::vector< double > &axis, double radius, bool outside, double timeout)
 Specify a valid force control cylinder by providing the central axis and cylinder radius, and specify whether the inside or outside of the cylinder is valid.
 
int setCondSphere (const std::vector< double > &center, double radius, bool outside, double timeout)
 Specify a valid force control sphere by providing the center and radius, and specify whether the inside or outside of the sphere is valid.
 
int setCondTcpSpeed (const std::vector< double > &min, const std::vector< double > &max, bool outside, double timeout)
 setCondTcpSpeed is used to setup an end condition for the TCP speed.
 
int setCondDistance (double distance, double timeout)
 Force control termination condition - distance
 
int setCondAdvanced (const std::string &type, const std::vector< double > &args, double timeout)
 Advanced force control termination condition
 
int setCondActive ()
 Activate force control termination condition
 
bool isCondFullfiled ()
 Check if the force control termination condition has been fulfilled
 
int setSupvForce (const std::vector< double > &min, const std::vector< double > &max)
 setSupvForce is used to set up force supervision in Force Control.
 
int setSupvOrient (const std::vector< double > &frame, double max_angle, double max_rot, bool outside)
 setSupvOrient is used to set up an supervision for the tool orientation.
 
int setSupvPosBox (const std::vector< double > &frame, const Box &box)
 setSupvPosBox is used to set up position supervision in Force Control.
 
int setSupvPosCylinder (const std::vector< double > &frame, const Cylinder &cylinder)
 
int setSupvPosSphere (const std::vector< double > &frame, const Sphere &sphere)
 
int setSupvReoriSpeed (const std::vector< double > &speed_limit, bool outside, double timeout)
 setSupvReoriSpeed is used to set up reorientation speed supervision in Force Control.
 
int setSupvTcpSpeed (const std::vector< double > &speed_limit, bool outside, double timeout)
 setSupvTcpSpeed is used to set up TCP speed supervision in Force Control.
 
int setLpFilter (const std::vector< double > &cutoff_freq)
 Set low-pass filter
 
int resetLpFilter ()
 Reset low-pass filter
 
int speedChangeEnable (double ref_force)
 The speedChangeEnable is used to activate FC SpeedChange function with desired reference and recover behavior.
 
int speedChangeDisable ()
 Deactivate FC SpeedChange function.
 
int speedChangeTune (int speed_levels, double speed_ratio_min)
 speedChangeTune is used to set FC SpeedChange system parameters to a new value.
 
int setDamping (const std::vector< double > &damping, double ramp_time)
 setDamping is used to tune the damping in the force control coordinate systems.
 
int resetDamping ()
 Reset damping parameters
 
int softFloatEnable ()
 Enable soft float function.
 
int softFloatDisable ()
 Disable soft float function.
 
bool isSoftFloatEnabled ()
 Returns whether soft float is enabled
 
int setSoftFloatParams (bool joint_space, const std::vector< bool > &select, const std::vector< double > &stiff_percent, const std::vector< double > &stiff_damp_ratio, const std::vector< double > &force_threshold, const std::vector< double > &force_limit)
 Set soft float parameters
 
int toolContact (const std::vector< bool > &direction)
 Detect contact between the tool and external objects
 
std::vector< double > getActualJointPositionsHistory (int steps)
 

Protected Attributes

void * d_ { nullptr }
 

Detailed Description

Abstract class for force control interface

Definition at line 91 of file force_control.h.

Constructor & Destructor Documentation

◆ ForceControl()

arcs::common_interface::ForceControl::ForceControl ( )

◆ ~ForceControl()

virtual arcs::common_interface::ForceControl::~ForceControl ( )
virtual

Member Function Documentation

◆ fcCalDynamicModel()

DynamicsModel arcs::common_interface::ForceControl::fcCalDynamicModel ( const std::vector< double > &  env_stiff,
const std::vector< double > &  damp_scale,
const std::vector< double > &  stiff_scale 
)

Calculate force control dynamics model

Parameters
env_stiffEnvironment stiffness, representing the workpiece stiffness in the contact axis direction, range [0, 1], default 0
damp_scaleParameter representing damping level, range [0, 1], default 0.5
stiff_scaleParameter representing stiffness level, range [0, 1], default 0.5
Returns
Force control dynamics model MDK AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
fcCalDynamicModel(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float], arg2: List[float]) -> Tuple[List[float], List[float], List[float]]
Lua Function Prototype
fcCalDynamicModel(env_stiff: table, damp_scale: table, stiff_scale: table) -> table
Lua example
fc_table = fcCalDynamicModel({0,0,0,0,0,0},{0.5,0.5,0.5,0.5,0.5,0.5},{0.5,0.5,0.5,0.5,0.5,0.5})

◆ fcDisable()

int arcs::common_interface::ForceControl::fcDisable ( )

End force control

fcDisable is used to disable Force Control. After a successful deactivation the robot is back in position control.

Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
fcDisable(self: pyaubo_sdk.ForceControl) -> int
Lua Function Prototype
fcDisable() -> nil
Lua example
fcDisable()
JSON-RPC Request example
{"jsonrpc":"2.0","method":"rob1.ForceControl.fcDisable","params":[],"id":1}
JSON-RPC Response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ fcEnable()

int arcs::common_interface::ForceControl::fcEnable ( )

Start force control

fcEnable is used to enable Force Control. At the same time as Force Control is enabled, fcEnable is used to define the coordinate system for Force Control, and tune the force and torque damping. If a coordinate system is not specified in fcEnable a default force control coordinate system is created with the same orientation as the work object coordinate system. All Force Control supervisions are activated by fcEnable.

Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
fcEnable(self: pyaubo_sdk.ForceControl) -> int
Lua Function Prototype
fcEnable() -> nil
Lua example
fcEnable()
JSON-RPC Request example
{"jsonrpc":"2.0","method":"rob1.ForceControl.fcEnable","params":[],"id":1}
JSON-RPC Response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ fcSetSensorLimits()

int arcs::common_interface::ForceControl::fcSetSensorLimits ( const std::vector< double > &  limits)

Set force control maximum force limits

Parameters
limitsForce limits
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
fcSetSensorLimits(self: pyaubo_sdk.ForceControl, arg0: List[float]) -> int
Lua Function Prototype
fcSetSensorLimits(limits: table) -> nil
Lua example
fcSetSensorLimits({200.0,200.0,200.0,50.0,50.0,50.0})

◆ fcSetSensorThresholds()

int arcs::common_interface::ForceControl::fcSetSensorThresholds ( const std::vector< double > &  thresholds)

Set force control thresholds

Parameters
thresholdsForce control thresholds
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
fcSetSensorThresholds(self: pyaubo_sdk.ForceControl, arg0: List[float]) -> int
Lua Function Prototype
fcSetSensorThresholds(thresholds: table) -> nil
Lua example
fcSetSensorThresholds({1.0,1.0,1.0,0.5,0.5,0.5})

◆ getActualJointPositionsHistory()

std::vector< double > arcs::common_interface::ForceControl::getActualJointPositionsHistory ( int  steps)

Get historical joint positions

According to the given number of cycle steps, go back the specified number of cycles from the joint state history to obtain the joint position data at that time.

Parameters
stepsNumber of cycles to go back (unit: control cycles), the larger the value, the earlier the historical data is obtained
Returns
std::vector<double> Joint positions (unit: radians) at the corresponding time point

◆ getDynamicModel()

DynamicsModel arcs::common_interface::ForceControl::getDynamicModel ( )

Get force control dynamics model

Returns
Force control dynamics model
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
getDynamicModel(self: pyaubo_sdk.ForceControl) -> Tuple[List[float], List[float], List[float]]
Lua Function Prototype
getDynamicModel() -> table
Lua example
Fc_Model = getDynamicModel()
JSON-RPC Request example
{"jsonrpc":"2.0","method":"rob1.ForceControl.getDynamicModel","params":[],"id":1}
JSON-RPC Response example
{"id":1,"jsonrpc":"2.0","result":[[],[20.0,20.0,20.0,5.0,5.0,5.0],[]]}

◆ getFcSensorLimits()

std::vector< double > arcs::common_interface::ForceControl::getFcSensorLimits ( )

Get maximum force limits

Returns
Force control maximum force limits
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
getFcSensorLimits(self: pyaubo_sdk.ForceControl) -> list
Lua Function Prototype
getFcSensorLimits() -> table
Lua example
Fc_Limits = getFcSensorLimits()

◆ getFcSensorThresholds()

std::vector< double > arcs::common_interface::ForceControl::getFcSensorThresholds ( )

Get force control thresholds

Returns
Minimum force control thresholds
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
getFcSensorThresholds(self: pyaubo_sdk.ForceControl) -> list
Lua Function Prototype
getFcSensorThresholds() -> table
Lua example
Fc_Thresholds = getFcSensorThresholds()

◆ isCondFullfiled()

bool arcs::common_interface::ForceControl::isCondFullfiled ( )

Check if the force control termination condition has been fulfilled

Returns
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
isCondFullfiled(self: pyaubo_sdk.ForceControl) -> bool
Lua Function Prototype
isCondFullfiled() -> boolean
Lua example
status = isCondFullfiled()
JSON-RPC Request example
{"jsonrpc":"2.0","method":"rob1.ForceControl.isCondFullfiled","params":[],"id":1}
JSON-RPC Response example
{"id":1,"jsonrpc":"2.0","result":false}

◆ isFcEnabled()

bool arcs::common_interface::ForceControl::isFcEnabled ( )

Check if force control is enabled

Returns
Returns true if enabled, false if disabled
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
isFcEnabled(self: pyaubo_sdk.ForceControl) -> bool
Lua Function Prototype
isFcEnabled() -> boolean
Lua example
Fc_status = isFcEnabled()
JSON-RPC Request example
{"jsonrpc":"2.0","method":"rob1.ForceControl.isFcEnabled","params":[],"id":1}
JSON-RPC Response example
{"id":1,"jsonrpc":"2.0","result":false}

◆ isSoftFloatEnabled()

bool arcs::common_interface::ForceControl::isSoftFloatEnabled ( )

Returns whether soft float is enabled

Returns
Exceptions
arcs::common_interface::AuboException
JSON-RPC Request example
{"jsonrpc":"2.0","method":"rob1.ForceControl.isSoftFloatEnabled","params":[],"id":1}
JSON-RPC Response example
{"id":1,"jsonrpc":"2.0","result":false}

◆ resetDamping()

int arcs::common_interface::ForceControl::resetDamping ( )

Reset damping parameters

Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
resetDamping(self: pyaubo_sdk.ForceControl) -> int
Lua Function Prototype
resetDamping() -> nil
JSON-RPC Request example
{"jsonrpc":"2.0","method":"rob1.ForceControl.resetDamping","params":[],"id":1}
JSON-RPC Response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ resetLpFilter()

int arcs::common_interface::ForceControl::resetLpFilter ( )

Reset low-pass filter

Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
resetLpFilter(self: pyaubo_sdk.ForceControl) -> int
Lua Function Prototype
resetLpFilter() -> nil
JSON-RPC Request example
{"jsonrpc":"2.0","method":"rob1.ForceControl.resetLpFilter","params":[],"id":1}
JSON-RPC Response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setCondActive()

int arcs::common_interface::ForceControl::setCondActive ( )

Activate force control termination condition

Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setCondActive(self: pyaubo_sdk.ForceControl) -> int
Lua Function Prototype
setCondActive() -> nil
Lua example
setCondActive()
JSON-RPC Request example
{"jsonrpc":"2.0","method":"rob1.ForceControl.setCondActive","params":[],"id":1}
JSON-RPC Response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setCondAdvanced()

int arcs::common_interface::ForceControl::setCondAdvanced ( const std::string &  type,
const std::vector< double > &  args,
double  timeout 
)

Advanced force control termination condition

Parameters
typeType
argsArguments
timeoutTimeout
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Lua Function Prototype
setCondAdvanced(type: number, args: table, timeout: number)
Lua example
setCondAdvanced(1, {0,1,0,0,0,0},10)

◆ setCondCylinder()

int arcs::common_interface::ForceControl::setCondCylinder ( const std::vector< double > &  axis,
double  radius,
bool  outside,
double  timeout 
)

Specify a valid force control cylinder by providing the central axis and cylinder radius, and specify whether the inside or outside of the cylinder is valid.

Parameters
axis
radius
outside
timeout
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setCondCylinder(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float, arg2: bool, arg3: float) -> int
Lua Function Prototype
setCondCylinder(axis: table, radius: number, outside: boolean, timeout: number) -> nil
Lua example
setCondCylinder({0,1,0},10.0,true,5,0)

◆ setCondDistance()

int arcs::common_interface::ForceControl::setCondDistance ( double  distance,
double  timeout 
)

Force control termination condition - distance

Parameters
distanceDistance
timeoutTimeout
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Lua Function Prototype
setCondDistance(distance: number, timeout: number)
Lua example
setCondDistance(0.2, 10.0)

◆ setCondForce()

int arcs::common_interface::ForceControl::setCondForce ( const std::vector< double > &  min,
const std::vector< double > &  max,
bool  outside,
double  timeout 
)

Set force control termination condition: Force.

When the measured force is within the specified range, the force control algorithm will continue to run until the set condition is not met, at which point force control will exit.

The condition is lateractivated by calling the instruction FCCondWaitWhile, which will wait and hold the program execution while the specified condition is true. This allows the reference force, torque and movement to continue until the force is outside the specified limits.

A force condition is set up by defining minimum and maximum limits for the force in the directions of the force control coordinate system. Once activated with FCCondWaitWhile, the program execution will continue to wait while the measured force is within its specified limits.

It is possible to specify that the condition is fulfilled when the force is outside the specified limits instead. This is done by using the switch argument Outside. The condition on force is specified in the force control coordinate system. This coordinate system is setup by the user in the instruction FCAct.

Parameters
minMinimum force/torque in each direction
maxMaximum force/torque in each direction
outsidefalse: valid within the specified range true: valid outside the specified range
timeoutTime limit in seconds; when this time is reached from the start of force control, force control will terminate regardless of whether the end condition is met
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setCondForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float], arg2: bool, arg3: float) -> int
Lua Function Prototype
setCondForce(min: table, max: table, outside: boolean, timeout: number) -> nil
Lua example
setCondForce({0.1,0.1,0.1,0.1,0.1,0.1},{50,50,50,5,5,5},{true,true,true,true,true,true},10)

◆ setCondOrient()

int arcs::common_interface::ForceControl::setCondOrient ( const std::vector< double > &  frame,
double  max_angle,
double  max_rot,
bool  outside,
double  timeout 
)

setCondOrient is used to set up an end condition for the tool orientation.

The condition will wait and hold the program execution while the specified condition is true. This allows the reference force, torque and movement to continue until the orientation is outside the specified limits.

An orientation condition is set up by defining a maximum angle and a maximum rotation from a reference orientation. The reference orientation is either defined by the current z direction of the tool, or by specifying an orientation in relation to the z direction of the work object.

Once activated, the tool orientation must be within the limits (or outside, if the argument Outside is used).

Parameters
frame
max_angle
max_rot
outside
timeout
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setCondOrient(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float, arg2: float, arg3: bool, arg4: float) -> int
Lua Function Prototype
setCondOrient(frame: table, max_angle: number, max_rot: number, outside: boolean, timeout: number) -> nil
Lua example
setCondOrient({0.1, 0.3, 0.1, 0.3142, 0.0, 1.571},30.0,20.0,true,10.0)

◆ setCondPlane()

int arcs::common_interface::ForceControl::setCondPlane ( const std::vector< double > &  plane,
double  timeout 
)

Specify a valid force control plane, x-y plane, z direction is valid

Parameters
plane={A,B,C,D}Plane equation: Ax + By + Cz + D = 0 where n = (A, B, C) is the normal vector of the plane, D is the distance required to move the plane to the origin (so D=0 means the plane passes through the origin)
timeout
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setCondPlane(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float) -> int
Lua Function Prototype
setCondPlane(plane: table, timeout: number) -> nil
Lua example
setCondPlane({0.1, 0.3, 0.1, 0.3},10.0)

◆ setCondSphere()

int arcs::common_interface::ForceControl::setCondSphere ( const std::vector< double > &  center,
double  radius,
bool  outside,
double  timeout 
)

Specify a valid force control sphere by providing the center and radius, and specify whether the inside or outside of the sphere is valid.

Parameters
center
radius
outside
timeout
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setCondSphere(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float, arg2: bool, arg3: float) -> int
Lua Function Prototype
setCondSphere(center: table, radius: number, outside: boolean, timeout: number) -> nil
Lua example
setCondSphere({0.2, 0.5, 0.1, 1.57, 0, 0},10.0,true,5,0)

◆ setCondTcpSpeed()

int arcs::common_interface::ForceControl::setCondTcpSpeed ( const std::vector< double > &  min,
const std::vector< double > &  max,
bool  outside,
double  timeout 
)

setCondTcpSpeed is used to setup an end condition for the TCP speed.

The condition is later activated by calling the instruction FCCondWaitWhile, which will wait and hold the program execution while the specified condition is true. This allows the reference force, torque and movement to continue until the speed is outside the specified limits.

A TCP speed condition is set up by defining minimum and maximum limits for the TCP speed in all directions of the work object. Once activated with FCCondWaitWhile, the program execution will continue to wait while the measured speed is within its specified limits.

It is possible to specify that the condition is fulfilled when the speed is outside the specified limits instead. This is done by using the switch argument Outside. The condition on TCP speed is specified in the work object coordinate system.

Parameters
min
max
outside
timeout
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setCondTcpSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float], arg2: bool, arg3: float) -> int
Lua Function Prototype
setCondTcpSpeed(min: table, max: table, outside: boolean, timeout: number) -> nil
Lua example
setCondTcpSpeed({0.2, 0.2, 0.2, 0.2, 0.2, 0.2},{1.2, 1.2, 1.2, 1.2, 1.2, 1.2},true,5,0)

◆ setDamping()

int arcs::common_interface::ForceControl::setDamping ( const std::vector< double > &  damping,
double  ramp_time 
)

setDamping is used to tune the damping in the force control coordinate systems.

The parameters tuned are those described in Damping in Torque x Direction - Damping in Torque z Direction on page 255 and Damping in Force x Direction - Damping in Force z Direction on page 254.

Damping can be set in the configuration file or by the instruction FCAct. The difference is that this instruction can be used when force control is active. FCSetDampingTune tunes the actual values set by the instruction FCAct, not the value in the configuration file.

Parameters
damping
ramp_time
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setDamping(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float) -> int
Lua Function Prototype
setDamping(damping: table, ramp_time: number) -> nil

◆ setDynamicModel()

int arcs::common_interface::ForceControl::setDynamicModel ( const std::vector< double > &  m,
const std::vector< double > &  d,
const std::vector< double > &  k 
)

Set force control dynamics model

Parameters
mMass parameters
dDamping parameters
kStiffness parameters

Parameter unit description:

  • Mass:
    • Cartesian space: unit is kg, length is 6, order is [x, y, z, Rx, Ry, Rz]
    • Joint space: unit is kg·m², length is 6, order is [J1, J2, J3, J4, J5, J6]
  • Damping:
    • Cartesian space: unit is N·s/m, order is [x, y, z, Rx, Ry, Rz]
    • Joint space: unit is N·m·s/rad, order is [J1, J2, J3, J4, J5, J6]
  • Stiffness:
    • Cartesian space: unit is N/m, order is [x, y, z, Rx, Ry, Rz]
    • Joint space: unit is N·m/rad, order is [J1, J2, J3, J4, J5, J6]
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setDynamicModel(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float], arg2: List[float]) -> int
Lua Function Prototype
setDynamicModel(m: table, d: table, k: table) -> nil
Lua example
setDynamicModel({20.0, 20.0, 20.0, 10.0, 10.0, 10.0},{2000, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0})

◆ setDynamicModel1()

int arcs::common_interface::ForceControl::setDynamicModel1 ( const std::vector< double > &  env_stiff,
const std::vector< double > &  damp_scale,
const std::vector< double > &  stiff_scale 
)

Set force control dynamics model

Parameters
env_stiffEnvironment stiffness, representing the workpiece stiffness in the contact axis direction, range [0, 1], default 0
damp_scaleParameter representing damping level, range [0, 1], default 0.5
stiff_scaleParameter representing stiffness level, range [0, 1], default 0.5
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setDynamicModel1(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float], arg2: List[float]) -> int
Lua Function Prototype
setDynamicModel1(env_stiff: table, damp_scale: table, stiff_scale: table) -> nil
Lua example
setDynamicModel1({0,0,0,0,0,0},{0.5,0.5,0.5,0.5,0.5,0.5},{0.5,0.5,0.5,0.5,0.5,0.5})

◆ setDynamicModelContact()

int arcs::common_interface::ForceControl::setDynamicModelContact ( const std::vector< double > &  env_stiff,
const std::vector< double > &  damp_scale,
const std::vector< double > &  stiff_scale 
)

Set force control dynamics model for contact scenario

Parameters
env_stiffParameter representing environment stiffness, range [0, 1], default 0
damp_scaleParameter representing damping level, range [0, 1], default 0.5
stiff_scaleParameter representing stiffness level, range [0, 1], default 0.5
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setDynamicModelContact(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float], arg2: List[float]) -> int
Lua Function Prototype
setDynamicModelContact(env_stiff: table, damp_scale: table, stiff_scale: table) -> nil
Lua example
setDynamicModelContact({0,0,0,0,0,0},{0.5,0.5,0.5,0.5,0.5,0.5},{0.5,0.5,0.5,0.5,0.5,0.5})

◆ setDynamicModelInsert()

int arcs::common_interface::ForceControl::setDynamicModelInsert ( const std::vector< double > &  damp_scale,
const std::vector< double > &  stiff_scale 
)

Set force control dynamics model for insertion/extraction scenario

Parameters
damp_scaleParameter representing damping level, range [0, 1], default 0.5
stiff_scaleParameter representing stiffness level, range [0, 1], default 0.5
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setDynamicModelInsert(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float]) -> int
Lua Function Prototype
setDynamicModelInsert(damp_scale: table, stiff_scale: table) -> nil
Lua example
setDynamicModelInsert({0.5,0.5,0.5,0.5,0.5,0.5},{0.5,0.5,0.5,0.5,0.5,0.5})

◆ setDynamicModelSearch()

int arcs::common_interface::ForceControl::setDynamicModelSearch ( const std::vector< double > &  damp_scale,
const std::vector< double > &  stiff_scale 
)

Set force control dynamics model for hole searching scenario

Parameters
damp_scaleParameter representing damping level, range [0, 1], default 0.5
stiff_scaleParameter representing stiffness level, range [0, 1], default 0.5
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setDynamicModelSearch(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float]) -> int
Lua Function Prototype
setDynamicModelSearch(damp_scale: table, stiff_scale: table) -> nil
Lua example
setDynamicModelSearch({0.5,0.5,0.5,0.5,0.5,0.5},{0.5,0.5,0.5,0.5,0.5,0.5})

◆ setLpFilter()

int arcs::common_interface::ForceControl::setLpFilter ( const std::vector< double > &  cutoff_freq)

Set low-pass filter

— force frame filter: filter measured force/torque +++ force loop filter: filter for force control output reference speed

FCSetLPFilterTune is used to change the response of force loop according to the description in Damping and LP-filter on page 103.

Parameters
cutoff_freqCutoff frequency
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setLpFilter(self: pyaubo_sdk.ForceControl, arg0: List[float]) -> int
Lua Function Prototype
setLpFilter(cutoff_freq: table) -> nil

◆ setSoftFloatParams()

int arcs::common_interface::ForceControl::setSoftFloatParams ( bool  joint_space,
const std::vector< bool > &  select,
const std::vector< double > &  stiff_percent,
const std::vector< double > &  stiff_damp_ratio,
const std::vector< double > &  force_threshold,
const std::vector< double > &  force_limit 
)

Set soft float parameters

Parameters
joint_softfloatWhether to enable soft float in joint space
selectSelect which degrees of freedom to enable soft float
stiff_percentStiffness percentage
stiff_damp_ratioStiffness damping ratio
force_thresholdForce threshold
force_limitForce limit
Returns
Return 0 if succeeded, otherwise error code

◆ setSupvForce()

int arcs::common_interface::ForceControl::setSupvForce ( const std::vector< double > &  min,
const std::vector< double > &  max 
)

setSupvForce is used to set up force supervision in Force Control.

The supervision is activated when Force Control is activated with the instruction FCAct.

The force supervision is set up by defining minimum and maximum limits for the force in the directions of the force control coordinate system. Once activated, the supervision will stop the execution if the force is outside the allowed values. The force supervision is specified in the force control coordinate system. This coordinate system is setup by the user with the instruction FCAct.

Parameters
min
max
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setSupvForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float]) -> int
Lua Function Prototype
setSupvForce(min: table, max: table) -> nil
Lua example
setSupvForce({0.1 ,0.1 ,0.1 ,0.1 ,0.1 ,0.1}, {10.0 ,10.0 ,10.0 ,10.0 ,10.0 ,10.0})

◆ setSupvOrient()

int arcs::common_interface::ForceControl::setSupvOrient ( const std::vector< double > &  frame,
double  max_angle,
double  max_rot,
bool  outside 
)

setSupvOrient is used to set up an supervision for the tool orientation.

The supervision is activated when Force Control is activated with the instruction FCAct.

An orientation supervision is set up by defining a maximum angle and a maximum rotation from a reference orientation. The reference orientation is either defined by the current z direction of the tool, or by specifying an orientation in relation to the z direction of the work object.

Once activated, the tool orientation must be within the limits otherwise the supervision will stop the execution.

Parameters
frame
max_angle
max_rot
outside
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setSupvOrient(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float, arg2: float, arg3: bool) -> int
Lua Function Prototype
setSupvOrient(frame: table, max_angle: number, max_rot: number, outside: boolean) -> nil

◆ setSupvPosBox()

int arcs::common_interface::ForceControl::setSupvPosBox ( const std::vector< double > &  frame,
const Box box 
)

setSupvPosBox is used to set up position supervision in Force Control.

Supervision is activated when Force Control is activated with the instruction FCAct. Position supervision is set up by defining a volume in space for the TCP. Once activated, the supervision will stop the execution if the TCP is outside this volume.

Parameters
frame
box
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setSupvPosBox(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float[6]]) -> int
Lua Function Prototype
setSupvPosBox(frame: table, box: table) -> nil

◆ setSupvPosCylinder()

int arcs::common_interface::ForceControl::setSupvPosCylinder ( const std::vector< double > &  frame,
const Cylinder cylinder 
)

Parameters
frame
cylinder
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setSupvPosCylinder(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float[5]]) -> int
Lua Function Prototype
setSupvPosCylinder(frame: table, cylinder: table) -> nil

◆ setSupvPosSphere()

int arcs::common_interface::ForceControl::setSupvPosSphere ( const std::vector< double > &  frame,
const Sphere sphere 
)

Parameters
frame
sphere
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setSupvPosSphere(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float[3]]) -> int
Lua Function Prototype
setSupvPosSphere(frame: table, sphere: table) -> nil

◆ setSupvReoriSpeed()

int arcs::common_interface::ForceControl::setSupvReoriSpeed ( const std::vector< double > &  speed_limit,
bool  outside,
double  timeout 
)

setSupvReoriSpeed is used to set up reorientation speed supervision in Force Control.

The supervision is activated when Force Control is activated with the instruction FCAct.

The reorientation speed supervision is set up by defining minimum and maximum limits for the reorientation speed around the axis of the work object coordinate system. Once activated, the supervision will stop the execution if the values of the reorientation speed are too high.

There are two speed supervisions: FCSupvReoriSpeed and FCSupvTCPSpeed, which is described in section FCSupvTCPSpeed on page 199. Both supervisions may be required because:

  • A robot axis can rotate with high speed while the TCP is stationary.
  • The TCP can be far from the rotating axis and a small axis rotation may result in a high speed movement of the TCP.
Parameters
speed_limit
outside
timeout
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setSupvReoriSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: bool, arg2: float) -> int
Lua Function Prototype
setSupvReoriSpeed(speed_limit: table, outside: boolean, timeout: number) -> nil

◆ setSupvTcpSpeed()

int arcs::common_interface::ForceControl::setSupvTcpSpeed ( const std::vector< double > &  speed_limit,
bool  outside,
double  timeout 
)

setSupvTcpSpeed is used to set up TCP speed supervision in Force Control.

The supervision is activated when Force Control is activated with the instruction FCAct. The TCP speed supervision is set up by defining minimum and maximum limits for the TCP speed in the directions of the work object coordinate system. Once activated, the supervision will stop the execution if too high TCP speed values are detected.

There are two speed supervisions: FCSupvTCPSpeed and FCSupvReoriSpeed, which is described in section FCSupvReoriSpeed on page 197.

Both supervisions may be required because:

  • A robot axis can rotate with high speed while the TCP is stationary.
  • The TCP can be far from the rotating axis and a small axis rotation may result in a high speed movement of the TCP.
Parameters
speed_limit
outside
timeout
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setSupvTcpSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: bool, arg2: float) -> int
Lua Function Prototype
setSupvTcpSpeed(speed_limit: table, outside: boolean, timeout: number) -> nil

◆ setTargetForce()

int arcs::common_interface::ForceControl::setTargetForce ( const std::vector< double > &  feature,
const std::vector< bool > &  compliance,
const std::vector< double > &  wrench,
const std::vector< double > &  limits,
TaskFrameType  type = TaskFrameType::FRAME_FORCE 
)

Set force control reference (target) value

Parameters
featureReference geometric feature for generating force control reference frame
complianceCompliance axis (direction) selection
wrenchTarget force/torque
limitsVelocity limits
typeForce control reference frame type

Usage Examples:

  1. Base Coordinate Frame: feature = {0,0,0,0,0,0} type = TaskFrameType::NONE
  2. Flange Coordinate Frame: feature = {0,0,0,0,0,0} type = TaskFrameType::TOOL_FORCE
  3. TCP Coordinate Frame: feature = tcp_offset type = TaskFrameType::TOOL_FORCE
  4. User Coordinate Frame (FRAME_FORCE): type = TaskFrameType::FRAME_FORCE feature should be the user-defined reference frame, for example, getTcpPose() means setting the force control frame to current TCP pose.
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
setTargetForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[bool], arg2: List[float], arg3: List[float], arg4: arcs::common_interface::TaskFrameType) -> int
Lua Function Prototype
setTargetForce(feature: table, compliance: table, wrench: table, limits: table, type: number) -> nil
Lua example
setTargetForce({0,0,0,0,0,0},{true,false,false,false,false,false},{10,0,0,0,0,0},{0,0,0,0,0,0},4)

◆ softFloatDisable()

int arcs::common_interface::ForceControl::softFloatDisable ( )

Disable soft float function.

Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
JSON-RPC Request example
{"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatDisable","params":[],"id":1}
JSON-RPC Response example
{"id":1,"jsonrpc":"2.0","result":-1}

◆ softFloatEnable()

int arcs::common_interface::ForceControl::softFloatEnable ( )

Enable soft float function.

Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
JSON-RPC Request example
{"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatEnable","params":[],"id":1}
JSON-RPC Response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ speedChangeDisable()

int arcs::common_interface::ForceControl::speedChangeDisable ( )

Deactivate FC SpeedChange function.

Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
speedChangeDisable(self: pyaubo_sdk.ForceControl) -> int
Lua Function Prototype
speedChangeDisable() -> nil
JSON-RPC Request example
{"jsonrpc":"2.0","method":"rob1.ForceControl.speedChangeDisable","params":[],"id":1}
JSON-RPC Response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ speedChangeEnable()

int arcs::common_interface::ForceControl::speedChangeEnable ( double  ref_force)

The speedChangeEnable is used to activate FC SpeedChange function with desired reference and recover behavior.

When FC SpeedChange function is active, the robot speed will be reduced/increased in order to keep the measured signal close to the reference.

Parameters
ref_force
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
speedChangeEnable(self: pyaubo_sdk.ForceControl, arg0: float) -> int
Lua Function Prototype
speedChangeEnable(ref_force: number) -> nil

◆ speedChangeTune()

int arcs::common_interface::ForceControl::speedChangeTune ( int  speed_levels,
double  speed_ratio_min 
)

speedChangeTune is used to set FC SpeedChange system parameters to a new value.

Parameters
speed_levels
speed_ratio_min
Returns
Return 0 if succeeded; return error code if failed AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
Exceptions
arcs::common_interface::AuboException
Python Function Prototype
speedChangeTune(self: pyaubo_sdk.ForceControl, arg0: int, arg1: float) -> int
Lua Function Prototype
speedChangeTune(speed_levels: number, speed_ratio_min: number) -> nil

◆ toolContact()

int arcs::common_interface::ForceControl::toolContact ( const std::vector< bool > &  direction)

Detect contact between the tool and external objects

Parameters
directionExpected contact direction. If all elements are 0, detect contact in all directions.
Returns
Returns the number of cycle steps back from the current point to the collision start point. If the return value is 0, no contact is detected.

Member Data Documentation

◆ d_

void* arcs::common_interface::ForceControl::d_ { nullptr }
protected

Definition at line 2568 of file force_control.h.


The documentation for this class was generated from the following file: