![]() |
AUBO SDK
0.26.0
|
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 > ¢er, 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 } |
Abstract class for force control interface
Definition at line 91 of file force_control.h.
| arcs::common_interface::ForceControl::ForceControl | ( | ) |
|
virtual |
| 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
| env_stiff | Environment stiffness, representing the workpiece stiffness in the contact axis direction, range [0, 1], default 0 |
| damp_scale | Parameter representing damping level, range [0, 1], default 0.5 |
| stiff_scale | Parameter representing stiffness level, range [0, 1], default 0.5 |
| arcs::common_interface::AuboException |
| 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.
| arcs::common_interface::AuboException |
| 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.
| arcs::common_interface::AuboException |
| int arcs::common_interface::ForceControl::fcSetSensorLimits | ( | const std::vector< double > & | limits | ) |
Set force control maximum force limits
| limits | Force limits |
| arcs::common_interface::AuboException |
| int arcs::common_interface::ForceControl::fcSetSensorThresholds | ( | const std::vector< double > & | thresholds | ) |
Set force control thresholds
| thresholds | Force control thresholds |
| arcs::common_interface::AuboException |
| 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.
| steps | Number of cycles to go back (unit: control cycles), the larger the value, the earlier the historical data is obtained |
| DynamicsModel arcs::common_interface::ForceControl::getDynamicModel | ( | ) |
Get force control dynamics model
| arcs::common_interface::AuboException |
| std::vector< double > arcs::common_interface::ForceControl::getFcSensorLimits | ( | ) |
Get maximum force limits
| arcs::common_interface::AuboException |
| std::vector< double > arcs::common_interface::ForceControl::getFcSensorThresholds | ( | ) |
Get force control thresholds
| arcs::common_interface::AuboException |
| bool arcs::common_interface::ForceControl::isCondFullfiled | ( | ) |
Check if the force control termination condition has been fulfilled
| arcs::common_interface::AuboException |
| bool arcs::common_interface::ForceControl::isFcEnabled | ( | ) |
Check if force control is enabled
| arcs::common_interface::AuboException |
| bool arcs::common_interface::ForceControl::isSoftFloatEnabled | ( | ) |
Returns whether soft float is enabled
| arcs::common_interface::AuboException |
| int arcs::common_interface::ForceControl::resetDamping | ( | ) |
Reset damping parameters
| arcs::common_interface::AuboException |
| int arcs::common_interface::ForceControl::resetLpFilter | ( | ) |
Reset low-pass filter
| arcs::common_interface::AuboException |
| int arcs::common_interface::ForceControl::setCondActive | ( | ) |
Activate force control termination condition
| arcs::common_interface::AuboException |
| int arcs::common_interface::ForceControl::setCondAdvanced | ( | const std::string & | type, |
| const std::vector< double > & | args, | ||
| double | timeout | ||
| ) |
Advanced force control termination condition
| type | Type |
| args | Arguments |
| timeout | Timeout |
| arcs::common_interface::AuboException |
| 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.
| axis | |
| radius | |
| outside | |
| timeout |
| arcs::common_interface::AuboException |
| int arcs::common_interface::ForceControl::setCondDistance | ( | double | distance, |
| double | timeout | ||
| ) |
Force control termination condition - distance
| distance | Distance |
| timeout | Timeout |
| arcs::common_interface::AuboException |
| 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.
| min | Minimum force/torque in each direction |
| max | Maximum force/torque in each direction |
| outside | false: valid within the specified range true: valid outside the specified range |
| timeout | Time 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 |
| arcs::common_interface::AuboException |
| 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).
| frame | |
| max_angle | |
| max_rot | |
| outside | |
| timeout |
| arcs::common_interface::AuboException |
| 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
| 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 |
| arcs::common_interface::AuboException |
| 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.
| center | |
| radius | |
| outside | |
| timeout |
| arcs::common_interface::AuboException |
| 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.
| min | |
| max | |
| outside | |
| timeout |
| arcs::common_interface::AuboException |
| 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.
| damping | |
| ramp_time |
| arcs::common_interface::AuboException |
| 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
| m | Mass parameters |
| d | Damping parameters |
| k | Stiffness parameters |
Parameter unit description:
| arcs::common_interface::AuboException |
| 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
| env_stiff | Environment stiffness, representing the workpiece stiffness in the contact axis direction, range [0, 1], default 0 |
| damp_scale | Parameter representing damping level, range [0, 1], default 0.5 |
| stiff_scale | Parameter representing stiffness level, range [0, 1], default 0.5 |
| arcs::common_interface::AuboException |
| 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
| env_stiff | Parameter representing environment stiffness, range [0, 1], default 0 |
| damp_scale | Parameter representing damping level, range [0, 1], default 0.5 |
| stiff_scale | Parameter representing stiffness level, range [0, 1], default 0.5 |
| arcs::common_interface::AuboException |
| 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
| damp_scale | Parameter representing damping level, range [0, 1], default 0.5 |
| stiff_scale | Parameter representing stiffness level, range [0, 1], default 0.5 |
| arcs::common_interface::AuboException |
| 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
| damp_scale | Parameter representing damping level, range [0, 1], default 0.5 |
| stiff_scale | Parameter representing stiffness level, range [0, 1], default 0.5 |
| arcs::common_interface::AuboException |
| 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.
| cutoff_freq | Cutoff frequency |
| arcs::common_interface::AuboException |
| 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
| joint_softfloat | Whether to enable soft float in joint space |
| select | Select which degrees of freedom to enable soft float |
| stiff_percent | Stiffness percentage |
| stiff_damp_ratio | Stiffness damping ratio |
| force_threshold | Force threshold |
| force_limit | Force limit |
| 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.
| min | |
| max |
| arcs::common_interface::AuboException |
| 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.
| frame | |
| max_angle | |
| max_rot | |
| outside |
| arcs::common_interface::AuboException |
| 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.
| frame | |
| box |
| arcs::common_interface::AuboException |
| int arcs::common_interface::ForceControl::setSupvPosCylinder | ( | const std::vector< double > & | frame, |
| const Cylinder & | cylinder | ||
| ) |
| frame | |
| cylinder |
| arcs::common_interface::AuboException |
| int arcs::common_interface::ForceControl::setSupvPosSphere | ( | const std::vector< double > & | frame, |
| const Sphere & | sphere | ||
| ) |
| frame | |
| sphere |
| arcs::common_interface::AuboException |
| 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:
| speed_limit | |
| outside | |
| timeout |
| arcs::common_interface::AuboException |
| 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:
| speed_limit | |
| outside | |
| timeout |
| arcs::common_interface::AuboException |
| 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
| feature | Reference geometric feature for generating force control reference frame |
| compliance | Compliance axis (direction) selection |
| wrench | Target force/torque |
| limits | Velocity limits |
| type | Force control reference frame type |
Usage Examples:
| arcs::common_interface::AuboException |
| int arcs::common_interface::ForceControl::softFloatDisable | ( | ) |
Disable soft float function.
| arcs::common_interface::AuboException |
| int arcs::common_interface::ForceControl::softFloatEnable | ( | ) |
Enable soft float function.
| arcs::common_interface::AuboException |
| int arcs::common_interface::ForceControl::speedChangeDisable | ( | ) |
Deactivate FC SpeedChange function.
| arcs::common_interface::AuboException |
| 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.
| ref_force |
| arcs::common_interface::AuboException |
| 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.
| speed_levels | |
| speed_ratio_min |
| arcs::common_interface::AuboException |
| int arcs::common_interface::ForceControl::toolContact | ( | const std::vector< bool > & | direction | ) |
Detect contact between the tool and external objects
| direction | Expected contact direction. If all elements are 0, detect contact in all directions. |
|
protected |
Definition at line 2568 of file force_control.h.