ARCS SDK API
0.24.0
|
力控接口抽象类 更多...
#include <force_control.h>
Public 成员函数 | |
ForceControl () | |
virtual | ~ForceControl () |
int | fcEnable () |
Start force control. 更多... | |
int | fcDisable () |
End force control. 更多... | |
bool | isFcEnabled () |
判断力控是否被使能 更多... | |
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) |
设置力控参考(目标)值 更多... | |
int | setDynamicModel (const std::vector< double > &m, const std::vector< double > &d, const std::vector< double > &k) |
设置力控动力学模型 更多... | |
DynamicsModel | getDynamicModel () |
获取力控动力学模型 更多... | |
int | setCondForce (const std::vector< double > &min, const std::vector< double > &max, bool outside, double timeout) |
设置力控终止条件:力,当测量的力在设置的范围之内,力控算法将保持运行,直到设置的条件不满足,力控将退出 更多... | |
int | setCondOrient (const std::vector< double > &frame, double max_angle, double max_rot, bool outside, double timeout) |
FCCondOrient is used to set up an end condition for the tool orientation. 更多... | |
int | setCondPlane (const std::vector< double > &plane, double timeout) |
指定力控有效平面,x-y平面,z方向有效 更多... | |
int | setCondCylinder (const std::vector< double > &axis, double radius, bool outside, double timeout) |
指定力控有效圆柱体,提供中心轴和圆柱半径,可以指定圆柱内部还是外部 更多... | |
int | setCondSphere (const std::vector< double > ¢er, double radius, bool outside, double timeout) |
指定力控有效球体,提供球心和半径,可以指定球体内部还是外部 更多... | |
int | setCondTcpSpeed (const std::vector< double > &min, const std::vector< double > &max, bool outside, double timeout) |
FCCondTCPSpeed is used to setup an end condition for the TCP speed. 更多... | |
int | setCondDistance (double distance, double timeout) |
力控终止条件-距离 更多... | |
int | setCondAdvanced (const std::string &type, const std::vector< double > &args, double timeout) |
高级力控终止条件 更多... | |
int | setCondActive () |
激活力控终止条件 更多... | |
bool | isCondFullfiled () |
力控终止条件是否已经满足 更多... | |
int | setSupvForce (const std::vector< double > &min, const std::vector< double > &max) |
FCSupvForce 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) |
FCSupvOrient is used to set up an supervision for the tool orientation. 更多... | |
int | setSupvPosBox (const std::vector< double > &frame, const Box &box) |
FCSupvPos 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) |
FCSupvReoriSpeed is used to set up reorientation speed supervision in Force Control. 更多... | |
int | setSupvTcpSpeed (const std::vector< double > &speed_limit, bool outside, double timeout) |
FCSupvTCPSpeed is used to set up TCP speed supervision in Force Control. 更多... | |
int | setLpFilter (const std::vector< double > &cutoff_freq) |
设置低通滤波器 更多... | |
int | resetLpFilter () |
重置低通滤波器 更多... | |
int | speedChangeEnable (double ref_force) |
The FCSpdChgAct 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) |
FCSpdChgTunSet is used to set FC SpeedChange system parameters to a new value. 更多... | |
int | setDamping (const std::vector< double > &damping, double ramp_time) |
FCSetDampingTune is used to tune the damping in the force control coordinate systems. 更多... | |
int | resetDamping () |
int | softFloatEnable () |
int | softFloatDisable () |
bool | isSoftFloatEnabled () |
返回是否开启了软浮动 更多... | |
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) |
设置软浮动参数 更多... | |
int | toolContact (const std::vector< bool > &direction) |
检测工具和外部物体的接触 更多... | |
Protected 属性 | |
void * | d_ { nullptr } |
力控接口抽象类
在文件 force_control.h 第 55 行定义.
arcs::common_interface::ForceControl::ForceControl | ( | ) |
|
virtual |
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.
失能力控。 fcDisable 被用于失能力控。 在成功失能力控之后,机器人将回到位置控制模式。
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.
使能力控。 fcEnable 被用于使能力控。 在力控被使能的同时, fcEnable 用于定义力控的坐标系,并调整力和力矩的阻尼。 如果在 fcEnable 中未指定坐标系, 则会创建一个默认的力控制坐标系,其方向与工作对象坐标系相同。 所有力控制监管功能都被 fcEnable 激活。
DynamicsModel arcs::common_interface::ForceControl::getDynamicModel | ( | ) |
获取力控动力学模型
bool arcs::common_interface::ForceControl::isCondFullfiled | ( | ) |
力控终止条件是否已经满足
bool arcs::common_interface::ForceControl::isFcEnabled | ( | ) |
判断力控是否被使能
bool arcs::common_interface::ForceControl::isSoftFloatEnabled | ( | ) |
返回是否开启了软浮动
int arcs::common_interface::ForceControl::resetDamping | ( | ) |
int arcs::common_interface::ForceControl::resetLpFilter | ( | ) |
重置低通滤波器
int arcs::common_interface::ForceControl::setCondActive | ( | ) |
激活力控终止条件
int arcs::common_interface::ForceControl::setCondAdvanced | ( | const std::string & | type, |
const std::vector< double > & | args, | ||
double | timeout | ||
) |
高级力控终止条件
type | |
args | |
timeout |
int arcs::common_interface::ForceControl::setCondCylinder | ( | const std::vector< double > & | axis, |
double | radius, | ||
bool | outside, | ||
double | timeout | ||
) |
指定力控有效圆柱体,提供中心轴和圆柱半径,可以指定圆柱内部还是外部
axis | |
radius | |
outside | |
timeout |
int arcs::common_interface::ForceControl::setCondDistance | ( | double | distance, |
double | timeout | ||
) |
力控终止条件-距离
distance | |
timeout |
int arcs::common_interface::ForceControl::setCondForce | ( | const std::vector< double > & | min, |
const std::vector< double > & | max, | ||
bool | outside, | ||
double | timeout | ||
) |
设置力控终止条件:力,当测量的力在设置的范围之内,力控算法将保持运行,直到设置的条件不满足,力控将退出
FCCondForce is used to set up an end condition based on measured force. 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 | 各方向最小的力/力矩 |
max | 各方向最大的力/力矩 |
outside | false 在设置条件的范围之内有效 true 在设置条件的范围之外有效 |
timeout | 时间限制,单位s(秒),从开始力控到达该时间时,不管是否满足力控终止条件,都会终止力控 |
int arcs::common_interface::ForceControl::setCondOrient | ( | const std::vector< double > & | frame, |
double | max_angle, | ||
double | max_rot, | ||
bool | outside, | ||
double | timeout | ||
) |
FCCondOrient is used to set up an end condition for the tool orientation.
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 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 |
int arcs::common_interface::ForceControl::setCondPlane | ( | const std::vector< double > & | plane, |
double | timeout | ||
) |
指定力控有效平面,x-y平面,z方向有效
FCCondPos is used to set up an end condition for the TCP position. 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 specified position is outside the specified limits.
A position condition is set up by defining a volume in space for the TCP position. Once activated the measured TCP position has to be within the specified volume (or outside, if the argument Outside is used).
plane={A,B,C,D} | 平面表示方法 Ax +By +Cz + D = 0 其中,n = (A, B, C)是平面的法向量, D 是将平面平移到坐标原点所需距离(所以D=0时,平面过原点) |
timeout |
int arcs::common_interface::ForceControl::setCondSphere | ( | const std::vector< double > & | center, |
double | radius, | ||
bool | outside, | ||
double | timeout | ||
) |
指定力控有效球体,提供球心和半径,可以指定球体内部还是外部
center | |
radius | |
outside | |
timeout |
int arcs::common_interface::ForceControl::setCondTcpSpeed | ( | const std::vector< double > & | min, |
const std::vector< double > & | max, | ||
bool | outside, | ||
double | timeout | ||
) |
FCCondTCPSpeed is used to setup an end condition for the TCP speed.
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 speed is outside the specified limits.
A TCP speed condition is setup 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 the done by using the switch argument Outside. The condition on TCP speed is specified in the work object coordinate system.
min | |
max | |
outside | |
timeout |
int arcs::common_interface::ForceControl::setDamping | ( | const std::vector< double > & | damping, |
double | ramp_time | ||
) |
FCSetDampingTune 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 |
int arcs::common_interface::ForceControl::setDynamicModel | ( | const std::vector< double > & | m, |
const std::vector< double > & | d, | ||
const std::vector< double > & | k | ||
) |
设置力控动力学模型
m | |
d | |
k |
int arcs::common_interface::ForceControl::setLpFilter | ( | const std::vector< double > & | cutoff_freq | ) |
设置低通滤波器
— force frame filter: 过滤测量到的力/力矩 +++ force loop filter: 力控输出参考速度的滤波器
FCSetLPFilterTune is used change the response of force loop according to description in Damping and LP-filter on page 103.
cutoff_freq |
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 | ||
) |
设置软浮动参数
joint_softfloat | |
select | |
stiff_percent | |
stiff_damp_ratio | |
force_threshold | |
force_limit |
int arcs::common_interface::ForceControl::setSupvForce | ( | const std::vector< double > & | min, |
const std::vector< double > & | max | ||
) |
FCSupvForce 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 |
int arcs::common_interface::ForceControl::setSupvOrient | ( | const std::vector< double > & | frame, |
double | max_angle, | ||
double | max_rot, | ||
bool | outside | ||
) |
FCSupvOrient 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 |
int arcs::common_interface::ForceControl::setSupvPosBox | ( | const std::vector< double > & | frame, |
const Box & | box | ||
) |
FCSupvPos 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 |
int arcs::common_interface::ForceControl::setSupvPosCylinder | ( | const std::vector< double > & | frame, |
const Cylinder & | cylinder | ||
) |
frame | |
cylinder |
int arcs::common_interface::ForceControl::setSupvPosSphere | ( | const std::vector< double > & | frame, |
const Sphere & | sphere | ||
) |
frame | |
sphere |
int arcs::common_interface::ForceControl::setSupvReoriSpeed | ( | const std::vector< double > & | speed_limit, |
bool | outside, | ||
double | timeout | ||
) |
FCSupvReoriSpeed 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 to 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 |
int arcs::common_interface::ForceControl::setSupvTcpSpeed | ( | const std::vector< double > & | speed_limit, |
bool | outside, | ||
double | timeout | ||
) |
FCSupvTCPSpeed 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 |
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 |
||
) |
设置力控参考(目标)值
feature | 参考几何特征,用于生成力控参考坐标系 |
compliance | 柔性轴(方向)选择 |
wrench | 目标力/力矩 |
limits | 速度限制 |
type | 力控参考坐标系类型 |
int arcs::common_interface::ForceControl::softFloatDisable | ( | ) |
int arcs::common_interface::ForceControl::softFloatEnable | ( | ) |
int arcs::common_interface::ForceControl::speedChangeDisable | ( | ) |
Deactivate FC SpeedChange function.
int arcs::common_interface::ForceControl::speedChangeEnable | ( | double | ref_force | ) |
The FCSpdChgAct 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 |
int arcs::common_interface::ForceControl::speedChangeTune | ( | int | speed_levels, |
double | speed_ratio_min | ||
) |
FCSpdChgTunSet is used to set FC SpeedChange system parameters to a new value.
speed_levels | |
speed_ratio_min |
int arcs::common_interface::ForceControl::toolContact | ( | const std::vector< bool > & | direction | ) |
检测工具和外部物体的接触
direction | 预期的接触方向,如果所有的元素为0,表示检测所有方向的接触 |
|
protected |
在文件 force_control.h 第 1054 行定义.