UR机器人脚本函数(自己翻译)
conveyor pul decode(type, A, B)
Tells the robot controller to treat digital inputs number A and B as puls
for a conveyor encoder
告诉机器人控制器将数字输入A和B作为机脉输送给冲编码器
conveyor pul decode(1,4,5)
This example shows how to t up quadrature pul decoding with input
A = digital in[4] and inputgff
B = digital in[5]
垃圾篓
这个例子展示了如何设置正交脉冲解码当输入A=[4]和输入B = =[5]
conveyor pul decode(2,3)
This example shows how to t up rising and falling edge pul decoding
with input A = digital in[3]. Note that you do not have to t parameter B
(as it is not ud anyway).
end force mode()
重置机器人模式,从力模式到正常模式
force mode(task frame, lection vector, wrench, type, limits)
Set robot to be controlled in force mode设置机器人在力控制模式
Parameters(参数)
task frame:A po vector that defines the force
frame relative to the ba frame.(一个相对于基本结构的力的矢量)
lection vector: A 6d vector that may only contain 0 or 1.
1 means that the robot will be compliant
in the corresponding axis of the task
frame, 0 means the robot is not
compliant along/about that axis(6维向量可能只包含0或1。1意味着机器人将符合相应轴的任务框架,0表示机器人沿计着不兼容/轴)
get conveyor tick count()
Tells the tick count of the encoder, note that the controller interpolates
tick counts to get more accurate movements with low resolution
encoders(告诉编码器记录控制器的变化,使计数器在低分辨率下,获得更精确的运动)Return Value
The conveyor encoder tick count(返回值,输送编码器的计数)
让杜雅尔丹
tpos(q)
Set joint positions of simulated robot(设置模拟机器人的关节位置)
Parameters
q: joint positions
stop conveyor tracking()
Makes robot movement (movej etc.) follow the original trajectory instead
of the conveyor specified by track conveyor linear() or
track conveyor circular().(让机器人按原始轨迹运动,替代发送的直线或圆弧运动)
stopj(a)
Stop (linear in joint space)
Decellerate joint speeds to zero关节速度减少到零
Parameters
a: joint acceleration [rad/sˆ2] (of leading axis)(关节或主轴加速度)
t conveyor tick count(tick count)
Tells the robot controller about the tick count of the encoder(将计数编码器通知给机器人控制器). Thisfunction is uful for absolute encoders(此函数应用于绝对编码器), u conveyor pul decode() for
tting up a pul encoder. For circular conveyors, the value must be
between 0 and the nunber of ticks per revolution.
Parameters
tick count:Tick count of the conveyor (Integer)(传送计数(整型)
tpos(q)
Set joint positions of simulated robot(设置模拟机器人的关节位置)
Parameters
q: joint positions
track conveyor circular(center, ticks per revolution, rotate tool)
Makes robot movement (movej() etc.) track a circular conveyor.使机器人的运动遵循一个圆形轨迹
>>>track conveyor circular(p[0.5,0.5,0,0,0,0],500.0, fal)
The example code makes the robot track a circular conveyor with center
in p[0.5,0.5,0,0,0,0] of the robot ba coordinate system, where 500 ticks
on the encoder corresponds to one revolution of the circular conveyor
around the center.
Parameters
center: Po vector that determines the
center the conveyor in the ba
coordinate system of the robot.
ticks per revolution: How many tichs the encoder es
when the conveyor moves one
revolution.
rotate tool: Should the tool rotate with the
coneyor or stay in the orientation
specified by the trajectory (movel()obtain
etc.).
track conveyor
get joint torques()
Returns the torques of all joints(返回所有关节力矩)
英语4级查询The torque on the joints, corrected by the torque needed to move the
robot itlf (gravity, friction, etc.), returned as a vector of length 6.
Return Value
The joint torque vector in ; ([float])关节力矩向量(浮点型)
get target joint positions()
Returns the desired angular position of all joints(返回所有关节想要的角度
The angular target positions are expresd in radians and returned as a(角度为弧度形式,长度为6的变量)
vector of length 6. Note that the output might differ from the output of
get actual joint positions(), especially durring acceleration and heavy
loads.不同于get actual joint positions(),尤其在加速和有力装载
Return Value
The current target joint angular position vector in rad: [Ba,
Shoulder, Elbow, Wrist1, Wrist2, Wrist3]
get target tcp po()
Returns the current target tool po
appropriatelyReturns the 6d po reprenting the tool position and orientation
specified in the ba frame. The calculation of this po is bad on the
current target joint positions.
Return Value
The current target TCP vector; ([X, Y, Z, Rx, Ry, Rz])
powerdown()
Shutdown the robot, and power off the robot and controller.
t gravity(d)
Set the direction of the acceleration experienced by the robot. When(设置机器人加速度的方向,当机器人装载时,这个设定
the robot mounting is fixed, this corresponds to an accleration of g away
from the earth’s centre.
>>>t gravity([0, 9.82*sin(theta), 9.82*cos(theta)])
will t the acceleration for a robot that is rotated ”theta” radians aro und
the x-axis of the robot ba coordinate system
Parameters
d: 3D vector, describing the direction of the gravity, relative to
the ba of the robot.
t payload(m, CoG)
Set payload mass and center of gravity(设置装载的质量和重心)
buoyancy
四级成绩多少分算过Sets the mass and center of gravity (abbr. CoG) of the payload.
This function must be called, when the payload weight or weigh(当装载的质量应当考虑在内时,这个函数必须被设定,例如机器人抓取或放置重的工件时)
distribution changes significantly - I.e when the robot picks up or puts
down a heavy workpiece.
The CoG argument is optional - If not provided, the Tool Center Point(重心位置是可选项如
果不给出,工具中心点将作为重心)
(TCP) will be ud as the Center of Gravity (CoG). If the CoG argument is
omitted, later calls to t tcp(po) will change CoG to the new TCP.
The CoG is specified as a Vector, [CoGx, CoGy, CoGz], displacement,
from the toolmount.重心是一个矢量坐标(x,y,z),位移
Parameters
m: mass in kilograms(质量以公斤为单位)
CoG: Center of Gravity: [CoGx, CoGy, CoGz] in meters.重心单位米
ttcp(po)
Set the Tool Center Point(设置工具坐标原点)
Sets the transformation from the output flange coordinate system to the
TCP as a po.(设置连接法兰坐标系到工具坐标系的转换)
Parameters
po: A po describing the transformation.(转化后的位置)
sleep(t)
Sleep for an amount of time
Parameters
t: time [s]
sync()
Us up the remaining ”physical” time a thread has in the current frame(SYNC同步的意思)(主要用于处于无限循环状态下的的、停顿)beyond the a
textmsg(s1, s2=’’)
Send text message to log(向日志发送文本信息)
Send message with s1 and s2 concatenated to be shown on the GUI(发送信息S1或S2到示教器日志界面)
log-tab
Parameters
s1: message string, variables of other types (int, bool pos
etc.) can also be nt(字符串,变量(整型、布尔型等)也能发送)
s2: message string, variables of other types (int, bool pos
etc.) can also be nt
4.1 Functions
acos(f )
Returns the arc cosine of f(返回反余弦,单位弧度)
Returns the principal value of the arc cosine of f, expresd in radians. A
runtime error is raid if f lies outside the range [-1, 1].
Parameters
f: floating point value
Return Value
the arc cosine of f.
asin(f )(反正弦)
Returns the arc sine of f
Returns the principal value of the arc sine of f, expresd in radians. A runtime error is raid if f lies outside the range [-1, 1].
Parameters
f: floating point value
Return Value
the arc sine of f.
atan(f )(反正切)
Returns the arc tangent of f
Returns the principal value of the arc tangent of f, expresd in radians. Parameters
f: floating point value
Return Value
the arc tangent of f.
atan2(x, y)反正切,根据X/Y值
Returns the arc tangent of x/y
Returns the principal value of the arc tangent of x/y, expresd in radians. To compute the value, the function us the sign of both arguments to determine the quadrant.
Parameters
x: floating point value
y: floating point value
Return Value
the arc tangent of x/y.英语写信格式范文
ceil(f )(取整,f为浮点型)(四舍五入)
Returns the smallest integer value that is not less than f
Rounds floating point number to the smallest integer no greater than f. Parameters
f: floating point value
Return Value
rounded integer
cos(f )(余弦)
Returns the cosine of f
Returns the cosine of an angle of f radians.
Parameters
f: floating point value
Return Value
the cosine of f.