AUBO SDK  0.26.0
载入中...
搜索中...
未找到
arcs::common_interface::ForceControl类 参考

力控接口抽象类 更多...

#include <force_control.h>

Public 成员函数

 ForceControl ()
 
virtual ~ForceControl ()
 
int fcEnable ()
 使能力控。 fcEnable 被用于使能力控。 在力控被使能的同时, fcEnable 用于定义力控的坐标系,并调整力和力矩的阻尼。 如果在 fcEnable 中未指定坐标系, 则会创建一个默认的力控制坐标系,其方向与工作对象坐标系相同。 所有力控制监管功能都被 fcEnable 激活。
 
int fcDisable ()
 失能力控。 fcDisable 被用于失能力控。 在成功失能力控之后,机器人将回到位置控制模式。
 
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 setDynamicModel1 (const std::vector< double > &env_stiff, const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
 设置力控动力学模型
 
DynamicsModel fcCalDynamicModel (const std::vector< double > &env_stiff, const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
 计算力控动力学模型
 
int setDynamicModelSearch (const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
 设置力控搜孔场景下的动力学模型
 
int setDynamicModelInsert (const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
 设置力控插/拔孔场景下的动力学模型
 
int setDynamicModelContact (const std::vector< double > &env_stiff, const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
 设置力控接触场景下的动力学模型
 
int setDynamicModel (const std::vector< double > &m, const std::vector< double > &d, const std::vector< double > &k)
 设置力控动力学模型
 
int fcSetSensorThresholds (const std::vector< double > &thresholds)
 设置力控阈值
 
int fcSetSensorLimits (const std::vector< double > &limits)
 设置力控最大受力限制
 
std::vector< double > getFcSensorThresholds ()
 获取力控阈值
 
std::vector< double > getFcSensorLimits ()
 获取最大力限制
 
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)
 设置力控终止条件:姿态,当测量的姿态在设置的范围之内,力控算法将保持运行,直到设置的条件不满足,力控将退出.
 
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 > &center, double radius, bool outside, double timeout)
 指定力控有效球体,提供球心和半径,可以指定球体内部还是外部
 
int setCondTcpSpeed (const std::vector< double > &min, const std::vector< double > &max, bool outside, double timeout)
 设置TCP速度的终止条件。该条件可通过调用FCCondWaitWhile指令激活, 在指定条件为真时,程序将等待并保持执行。这样可以使参考力、力矩和运动继续, 直到速度超出指定范围。
 
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)
 setSupvForce 用于在力控中设置力监督。监督在通过 FCAct 指令激活力控时被激活。
 
int setSupvOrient (const std::vector< double > &frame, double max_angle, double max_rot, bool outside)
 setSupvOrient 用于设置工具姿态的监督条件。 当通过 FCAct 指令激活力控时,监督条件被激活。
 
int setSupvPosBox (const std::vector< double > &frame, const Box &box)
 setSupvPosBox 用于在力控中设置位置监督。监督在通过 FCAct 指令激活力控时被激活。 位置监督通过为TCP定义空间体积来设置。一旦激活,如果TCP超出该体积,监督将停止执行。
 
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 用于在力控中设置重新定向速度监督。监督在通过 FCAct 指令激活力控时被激活。
 
int setSupvTcpSpeed (const std::vector< double > &speed_limit, bool outside, double timeout)
 setSupvTcpSpeed 用于在力控中设置TCP速度监督。监督在通过 FCAct 指令激活力控时被激活。 TCP速度监督通过定义工作对象坐标系各方向上的最小和最大速度限制来设置。 一旦激活,如果检测到过高的TCP速度值,监督将停止执行。
 
int setLpFilter (const std::vector< double > &cutoff_freq)
 设置低通滤波器
 
int resetLpFilter ()
 重置低通滤波器
 
int speedChangeEnable (double ref_force)
 speedChangeEnable 用于激活 FC SpeedChange 功能,并设置期望的参考力和恢复行为。 当 FC SpeedChange 功能被激活时,机器人速度会根据测量信号与参考值的接近程度自动降低或提高。
 
int speedChangeDisable ()
 停用 FC SpeedChange 功能。
 
int speedChangeTune (int speed_levels, double speed_ratio_min)
 speedChangeTune 用于将 FC SpeedChange 系统参数设置为新值。
 
int setDamping (const std::vector< double > &damping, double ramp_time)
 setDamping 用于在力控坐标系中调整阻尼。可调参数包括扭矩x方向到扭矩z方向的阻尼(见第255页)以及力x方向到力z方向的阻尼(见第254页)。
 
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)
 检测工具和外部物体的接触
 
std::vector< double > getActualJointPositionsHistory (int steps)
 

Protected 属性

void * d_ { nullptr }
 

详细描述

力控接口抽象类

在文件 force_control.h91 行定义.

构造及析构函数说明

◆ ForceControl()

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

◆ ~ForceControl()

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

成员函数说明

◆ 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 
)

计算力控动力学模型

参数
env_stiff环境刚度,表示为接触轴方向上的工件刚度,取值范围[0, 1],默认为0
damp_scale表征阻尼水平的参数,取值范围[0, 1],默认为0.5
stiff_scale表征软硬程度的参数,取值范围[0, 1],默认为0.5
返回
力控动力学模型MDK AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
fcCalDynamicModel(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float], arg2: List[float]) -> Tuple[List[float], List[float], List[float]]
Lua函数原型
fcCalDynamicModel(env_stiff: table, damp_scale: table, stiff_scale: table) -> table

◆ fcDisable()

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

失能力控。 fcDisable 被用于失能力控。 在成功失能力控之后,机器人将回到位置控制模式。

返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
fcDisable(self: pyaubo_sdk.ForceControl) -> int
Lua函数原型
fcDisable() -> nil
JSON-RPC请求示例
{"jsonrpc":"2.0","method":"rob1.ForceControl.fcDisable","params":[],"id":1}
JSON-RPC响应示例
{"id":1,"jsonrpc":"2.0","result":0}

◆ fcEnable()

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

使能力控。 fcEnable 被用于使能力控。 在力控被使能的同时, fcEnable 用于定义力控的坐标系,并调整力和力矩的阻尼。 如果在 fcEnable 中未指定坐标系, 则会创建一个默认的力控制坐标系,其方向与工作对象坐标系相同。 所有力控制监管功能都被 fcEnable 激活。

返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
fcEnable(self: pyaubo_sdk.ForceControl) -> int
Lua函数原型
fcEnable() -> nil
JSON-RPC请求示例
{"jsonrpc":"2.0","method":"rob1.ForceControl.fcEnable","params":[],"id":1}
JSON-RPC响应示例
{"id":1,"jsonrpc":"2.0","result":0}

◆ fcSetSensorLimits()

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

设置力控最大受力限制

参数
limits力限制
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
fcSetSensorLimits(self: pyaubo_sdk.ForceControl, arg0: List[float]) -> int
Lua函数原型
fcSetSensorLimits(feature: table, compliance: table, wrench: table, limits: table, type: number) -> nil

◆ fcSetSensorThresholds()

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

设置力控阈值

参数
thresholds力控阈值
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
fcSetSensorThresholds(self: pyaubo_sdk.ForceControl, arg0: List[float]) -> int
Lua函数原型
fcSetSensorThresholds(feature: table, compliance: table, wrench: table, limits: table, type: number) -> nil

◆ getActualJointPositionsHistory()

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

获取历史关节角度

根据给定的周期步数,从关节状态历史中回退指定数量的周期,获取当时的关节角度数据。

参数
steps需要回退的周期数(单位:控制周期数),值越大表示获取越早的历史数据
返回
std::vector<double> 对应时间点的各关节角度(单位:弧度)

◆ getDynamicModel()

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

获取力控动力学模型

返回
力控动力学模型
异常
arcs::common_interface::AuboException
Python函数原型
getDynamicModel(self: pyaubo_sdk.ForceControl) -> Tuple[List[float], List[float], List[float]]
Lua函数原型
getDynamicModel() -> table
JSON-RPC请求示例
{"jsonrpc":"2.0","method":"rob1.ForceControl.getDynamicModel","params":[],"id":1}
JSON-RPC响应示例
{"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 ( )

获取最大力限制

返回
力控最大力限制
异常
arcs::common_interface::AuboException
Python函数原型
getFcSensorLimits(self: pyaubo_sdk.ForceControl) -> list
Lua函数原型
getFcSensorLimits() -> table

◆ getFcSensorThresholds()

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

获取力控阈值

返回
力控最小力阈值
异常
arcs::common_interface::AuboException
Python函数原型
getFcSensorThresholds(self: pyaubo_sdk.ForceControl) -> list
Lua函数原型
getFcSensorThresholds() -> table

◆ isCondFullfiled()

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

力控终止条件是否已经满足

返回
异常
arcs::common_interface::AuboException
Python函数原型
isCondFullfiled(self: pyaubo_sdk.ForceControl) -> bool
Lua函数原型
isCondFullfiled() -> boolean
JSON-RPC请求示例
{"jsonrpc":"2.0","method":"rob1.ForceControl.isCondFullfiled","params":[],"id":1}
JSON-RPC响应示例
{"id":1,"jsonrpc":"2.0","result":false}

◆ isFcEnabled()

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

判断力控是否被使能

返回
使能返回true,失能返回false
异常
arcs::common_interface::AuboException
Python函数原型
isFcEnabled(self: pyaubo_sdk.ForceControl) -> bool
Lua函数原型
isFcEnabled() -> boolean
JSON-RPC请求示例
{"jsonrpc":"2.0","method":"rob1.ForceControl.isFcEnabled","params":[],"id":1}
JSON-RPC响应示例
{"id":1,"jsonrpc":"2.0","result":false}

◆ isSoftFloatEnabled()

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

返回是否开启了软浮动

返回
异常
arcs::common_interface::AuboException
JSON-RPC请求示例
{"jsonrpc":"2.0","method":"rob1.ForceControl.isSoftFloatEnabled","params":[],"id":1}
JSON-RPC响应示例
{"id":1,"jsonrpc":"2.0","result":false}

◆ resetDamping()

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

重置阻尼参数

返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
resetDamping(self: pyaubo_sdk.ForceControl) -> int
Lua函数原型
resetDamping() -> nil
JSON-RPC请求示例
{"jsonrpc":"2.0","method":"rob1.ForceControl.resetDamping","params":[],"id":1}
JSON-RPC响应示例
{"id":1,"jsonrpc":"2.0","result":0}

◆ resetLpFilter()

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

重置低通滤波器

返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
resetLpFilter(self: pyaubo_sdk.ForceControl) -> int
Lua函数原型
resetLpFilter() -> nil
JSON-RPC请求示例
{"jsonrpc":"2.0","method":"rob1.ForceControl.resetLpFilter","params":[],"id":1}
JSON-RPC响应示例
{"id":1,"jsonrpc":"2.0","result":0}

◆ setCondActive()

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

激活力控终止条件

返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setCondActive(self: pyaubo_sdk.ForceControl) -> int
Lua函数原型
setCondActive() -> nil
JSON-RPC请求示例
{"jsonrpc":"2.0","method":"rob1.ForceControl.setCondActive","params":[],"id":1}
JSON-RPC响应示例
{"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 
)

高级力控终止条件

参数
type类型
args参数
timeout超时时间
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException

◆ setCondCylinder()

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

指定力控有效圆柱体,提供中心轴和圆柱半径,可以指定圆柱内部还是外部

参数
axis
radius
outside
timeout
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setCondCylinder(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float, arg2: bool, arg3: float) -> int
Lua函数原型
setCondCylinder(axis: table, radius: number, outside: boolean, timeout: number) -> nil

◆ setCondDistance()

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

力控终止条件-距离

参数
distance距离
timeout超时时间
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException

◆ setCondForce()

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

设置力控终止条件:力,当测量的力在设置的范围之内,力控算法将保持运行,直到设置的条件不满足,力控将退出

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各方向最大的力/力矩
outsidefalse 在设置条件的范围之内有效 true 在设置条件的范围之外有效
timeout时间限制,单位s(秒),从开始力控到达该时间时,不管是否满足力控终止条件,都会终止力控
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setCondForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float], arg2: bool, arg3: float) -> int
Lua函数原型
setCondForce(min: table, max: table, outside: boolean, timeout: number) -> nil

◆ 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 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
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setCondOrient(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float, arg2: float, arg3: bool, arg4: float) -> int
Lua函数原型
setCondOrient(frame: table, max_angle: number, max_rot: number, outside: boolean, timeout: number) -> nil

◆ setCondPlane()

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

指定力控有效平面,x-y平面,z方向有效

参数
plane={A,B,C,D}平面表示方法 Ax +By +Cz + D = 0 其中,n = (A, B, C)是平面的法向量, D 是将平面平移到坐标原点所需距离(所以D=0时,平面过原点)
timeout
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setCondPlane(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float) -> int
Lua函数原型
setCondPlane(plane: table, timeout: number) -> nil

◆ setCondSphere()

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

指定力控有效球体,提供球心和半径,可以指定球体内部还是外部

参数
center
radius
outside
timeout
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setCondSphere(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float, arg2: bool, arg3: float) -> int
Lua函数原型
setCondSphere(center: table, radius: number, outside: boolean, timeout: number) -> nil

◆ setCondTcpSpeed()

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

设置TCP速度的终止条件。该条件可通过调用FCCondWaitWhile指令激活, 在指定条件为真时,程序将等待并保持执行。这样可以使参考力、力矩和运动继续, 直到速度超出指定范围。

通过定义TCP在工作对象所有方向上的最小和最大速度限制来设置TCP速度条件。 一旦通过FCCondWaitWhile激活,程序将在测量速度处于指定范围内时继续等待。

也可以指定当速度超出指定范围时条件成立,通过使用outside参数实现。 TCP速度条件在工作对象坐标系中指定。

参数
min最小速度
max最大速度
outside是否在范围外有效
timeout超时时间
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setCondTcpSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float], arg2: bool, arg3: float) -> int
Lua函数原型
setCondTcpSpeed(min: table, max: table, outside: boolean, timeout: number) -> nil

◆ setDamping()

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

setDamping 用于在力控坐标系中调整阻尼。可调参数包括扭矩x方向到扭矩z方向的阻尼(见第255页)以及力x方向到力z方向的阻尼(见第254页)。

阻尼可以通过配置文件或FCAct指令设置。不同之处在于本指令可在力控激活时使用。FCSetDampingTune调整的是FCAct指令设置的实际值,而不是配置文件中的值。

参数
damping阻尼参数
ramp_time斜坡时间
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setDamping(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float) -> int
Lua函数原型
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 
)

设置力控动力学模型

参数
m质量参数
d阻尼参数
k刚度参数

参数单位说明:

  • 质量:
    • 笛卡尔空间:单位为 kg,长度为工作空间维度(一般为6),顺序为 [x, y, z, Rx, Ry, Rz]
    • 关节空间:单位为 kg·m²,长度为机器人自由度(一般为6),顺序为 [J1, J2, J3, J4, J5, J6]
  • 阻尼:
    • 笛卡尔空间:单位为 N·s/m,顺序为 [x, y, z, Rx, Ry, Rz]
    • 关节空间:单位为 N·m·s/rad,顺序为 [J1, J2, J3, J4, J5, J6]
  • 刚度:
    • 笛卡尔空间:单位为 N/m,顺序为 [x, y, z, Rx, Ry, Rz]
    • 关节空间:单位为 N·m/rad,顺序为 [J1, J2, J3, J4, J5, J6]
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setDynamicModel(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float], arg2: List[float]) -> int
Lua函数原型
setDynamicModel(m: table, d: table, k: table) -> nil

◆ 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 
)

设置力控动力学模型

参数
env_stiff环境刚度,表示为接触轴方向上的工件刚度,取值范围[0, 1],默认为0
damp_scale表征阻尼水平的参数,取值范围[0, 1],默认为0.5
stiff_scale表征软硬程度的参数,取值范围[0, 1],默认为0.5
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setDynamicModel1(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float], arg2: List[float]) -> int
Lua函数原型
setDynamicModel1(env_stiff: table, damp_scale: table, stiff_scale: table) -> nil

◆ 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 
)

设置力控接触场景下的动力学模型

参数
env_stiff表征环境刚度的参数,取值范围[0, 1],默认为0
damp_scale表征阻尼水平的参数,取值范围[0, 1],默认为0.5
stiff_scale表征软硬程度的参数,取值范围[0, 1],默认为0.5
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setDynamicModelContact(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float], arg2: List[float]) -> int
Lua函数原型
setDynamicModelContact(env_stiff: table, damp_scale: table, stiff_scale: table) -> nil

◆ setDynamicModelInsert()

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

设置力控插/拔孔场景下的动力学模型

参数
damp_scale表征阻尼水平的参数,取值范围[0, 1],默认为0.5
stiff_scale表征软硬程度的参数,取值范围[0, 1],默认为0.5
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setDynamicModelInsert(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float]) -> int
Lua函数原型
setDynamicModelInsert(damp_scale: table, stiff_scale: table) -> nil

◆ setDynamicModelSearch()

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

设置力控搜孔场景下的动力学模型

参数
damp_scale表征阻尼水平的参数,取值范围[0, 1],默认为0.5
stiff_scale表征软硬程度的参数,取值范围[0, 1],默认为0.5
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setDynamicModelSearch(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float]) -> int
Lua函数原型
setDynamicModelSearch(damp_scale: table, stiff_scale: table) -> nil

◆ setLpFilter()

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

设置低通滤波器

— force frame filter: 过滤测量到的力/力矩 +++ force loop filter: 力控输出参考速度的滤波器

参数
cutoff_freq截止频率
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setLpFilter(self: pyaubo_sdk.ForceControl, arg0: List[float]) -> int
Lua函数原型
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 
)

设置软浮动参数

参数
joint_softfloat是否在关节空间启用软浮动
select选择哪些自由度启用软浮动
stiff_percent刚度百分比
stiff_damp_ratio刚度阻尼比
force_threshold力阈值
force_limit力限制
返回
返回0表示成功,其他为错误码

◆ setSupvForce()

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

setSupvForce 用于在力控中设置力监督。监督在通过 FCAct 指令激活力控时被激活。

力监督通过在力控坐标系的各个方向上定义最小和最大力限制来设置。 一旦激活,如果力超出允许的范围,监督将停止执行。力监督在力控坐标系中指定。 该坐标系由用户通过 FCAct 指令设置。

参数
min最小力限制
max最大力限制
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setSupvForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float]) -> int
Lua函数原型
setSupvForce(min: table, max: table) -> nil

◆ setSupvOrient()

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

setSupvOrient 用于设置工具姿态的监督条件。 当通过 FCAct 指令激活力控时,监督条件被激活。

姿态监督通过定义相对于参考姿态的最大角度和最大旋转来设置。 参考姿态可以由工具当前的z方向定义,也可以通过指定相对于工作对象z方向的姿态来定义。

一旦激活,工具姿态必须在限制范围内,否则监督将停止执行。

参数
frame
max_angle
max_rot
outside
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setSupvOrient(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float, arg2: float, arg3: bool) -> int
Lua函数原型
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 用于在力控中设置位置监督。监督在通过 FCAct 指令激活力控时被激活。 位置监督通过为TCP定义空间体积来设置。一旦激活,如果TCP超出该体积,监督将停止执行。

参数
frame
box
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setSupvPosBox(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float[6]]) -> int
Lua函数原型
setSupvPosBox(frame: table, box: table) -> nil

◆ setSupvPosCylinder()

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

参数
frame
cylinder
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setSupvPosCylinder(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float[5]]) -> int
Lua函数原型
setSupvPosCylinder(frame: table, cylinder: table) -> nil

◆ setSupvPosSphere()

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

参数
frame
sphere
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setSupvPosSphere(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[float[3]]) -> int
Lua函数原型
setSupvPosSphere(frame: table, sphere: table) -> nil

◆ setSupvReoriSpeed()

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

setSupvReoriSpeed 用于在力控中设置重新定向速度监督。监督在通过 FCAct 指令激活力控时被激活。

重新定向速度监督通过定义工作对象坐标系轴周围重新定向速度的最小和最大限制来设置。 一旦激活,如果重新定向速度的值过高,监督将停止执行。

有两种速度监督:FCSupvReoriSpeed 和 FCSupvTCPSpeed,后者在第199页的 FCSupvTCPSpeed 部分有描述。 可能需要两种监督,因为:

  • 机器人轴可以在 TCP 静止时高速旋转。
  • 当 TCP 距离旋转轴较远时,轴的微小旋转可能导致 TCP 的高速运动。
参数
speed_limit速度限制
outside是否在范围外有效
timeout超时时间
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setSupvReoriSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: bool, arg2: float) -> int
Lua函数原型
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 用于在力控中设置TCP速度监督。监督在通过 FCAct 指令激活力控时被激活。 TCP速度监督通过定义工作对象坐标系各方向上的最小和最大速度限制来设置。 一旦激活,如果检测到过高的TCP速度值,监督将停止执行。

有两种速度监督:FCSupvTCPSpeed 和 FCSupvReoriSpeed,后者在第197页的 FCSupvReoriSpeed 部分有描述。

可能需要两种监督,因为:

  • 机器人轴可以在TCP静止时高速旋转。
  • 当TCP距离旋转轴较远时,轴的微小旋转可能导致TCP的高速运动。
参数
speed_limit速度限制
outside是否在范围外有效
timeout超时时间
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setSupvTcpSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: bool, arg2: float) -> int
Lua函数原型
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 
)

设置力控参考(目标)值

参数
feature参考几何特征,用于生成力控参考坐标系
compliance柔性轴(方向)选择
wrench目标力/力矩
limits速度限制
type力控参考坐标系类型

使用说明:

  1. 基坐标系: feature = {0,0,0,0,0,0} type = TaskFrameType::NONE
  2. 法兰坐标系: feature = {0,0,0,0,0,0} type = TaskFrameType::TOOL_FORCE
  3. TCP坐标系: feature = tcp_offset type = TaskFrameType::TOOL_FORCE
  4. 用户坐标系(FRAME_FORCE): type = TaskFrameType::FRAME_FORCE feature 设为用户定义的参考坐标,例如 getTcpPose() 表示以当前 TCP 坐标作为力控坐标系。
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
setTargetForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: List[bool], arg2: List[float], arg3: List[float], arg4: arcs::common_interface::TaskFrameType) -> int
Lua函数原型
setTargetForce(feature: table, compliance: table, wrench: table, limits: table, type: number) -> nil

◆ softFloatDisable()

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

停用软浮动功能。

返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
JSON-RPC请求示例
{"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatDisable","params":[],"id":1}
JSON-RPC响应示例
{"id":1,"jsonrpc":"2.0","result":-1}

◆ softFloatEnable()

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

启用软浮动功能。

返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
JSON-RPC请求示例
{"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatEnable","params":[],"id":1}
JSON-RPC响应示例
{"id":1,"jsonrpc":"2.0","result":0}

◆ speedChangeDisable()

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

停用 FC SpeedChange 功能。

返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
speedChangeDisable(self: pyaubo_sdk.ForceControl) -> int
Lua函数原型
speedChangeDisable() -> nil
JSON-RPC请求示例
{"jsonrpc":"2.0","method":"rob1.ForceControl.speedChangeDisable","params":[],"id":1}
JSON-RPC响应示例
{"id":1,"jsonrpc":"2.0","result":0}

◆ speedChangeEnable()

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

speedChangeEnable 用于激活 FC SpeedChange 功能,并设置期望的参考力和恢复行为。 当 FC SpeedChange 功能被激活时,机器人速度会根据测量信号与参考值的接近程度自动降低或提高。

参数
ref_force参考力
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
speedChangeEnable(self: pyaubo_sdk.ForceControl, arg0: float) -> int
Lua函数原型
speedChangeEnable(ref_force: number) -> nil

◆ speedChangeTune()

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

speedChangeTune 用于将 FC SpeedChange 系统参数设置为新值。

参数
speed_levels速度级别
speed_ratio_min最小速度比例
返回
成功返回0;失败返回错误码 AUBO_BUSY AUBO_BAD_STATE -AUBO_INVL_ARGUMENT -AUBO_BAD_STATE
异常
arcs::common_interface::AuboException
Python函数原型
speedChangeTune(self: pyaubo_sdk.ForceControl, arg0: int, arg1: float) -> int
Lua函数原型
speedChangeTune(speed_levels: number, speed_ratio_min: number) -> nil

◆ toolContact()

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

检测工具和外部物体的接触

参数
direction预期的接触方向,如果所有的元素为0,表示检测所有方向的接触
返回
返回从当前点回退到碰撞开始点的周期步数,如果返回值为0,表示没有接触

类成员变量说明

◆ d_

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

在文件 force_control.h2379 行定义.


该类的文档由以下文件生成: