一、什么是传送带跟踪?
传送带跟踪通常用于食品和包装行业。典型的应用有:跟踪巧克力、糖果、面包将其放进盒子内,或者摆放在一起。传送带不停的运动,根据机器视觉给出的位置信息,引导机器人进行抓取任务。下图是一个示意图:
待抓取的物体part经过相机拍照处理后,随着传送带带到机械手抓取范围内,机器人将会抓取物体并将其放到指定位置。
二、传送带跟踪过程
#mermaid-svg-138seXcSwBqjyifb .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-138seXcSwBqjyifb .label text{fill:#333}#mermaid-svg-138seXcSwBqjyifb .node rect,#mermaid-svg-138seXcSwBqjyifb .node circle,#mermaid-svg-138seXcSwBqjyifb .node ellipse,#mermaid-svg-138seXcSwBqjyifb .node polygon,#mermaid-svg-138seXcSwBqjyifb .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-138seXcSwBqjyifb .node .label{text-align:center;fill:#333}#mermaid-svg-138seXcSwBqjyifb .node.clickable{cursor:pointer}#mermaid-svg-138seXcSwBqjyifb .arrowheadPath{fill:#333}#mermaid-svg-138seXcSwBqjyifb .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-138seXcSwBqjyifb .flowchart-link{stroke:#333;fill:none}#mermaid-svg-138seXcSwBqjyifb .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-138seXcSwBqjyifb .edgeLabel rect{opacity:0.9}#mermaid-svg-138seXcSwBqjyifb .edgeLabel span{color:#333}#mermaid-svg-138seXcSwBqjyifb .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-138seXcSwBqjyifb .cluster text{fill:#333}#mermaid-svg-138seXcSwBqjyifb div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-138seXcSwBqjyifb .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-138seXcSwBqjyifb text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-138seXcSwBqjyifb .actor-line{stroke:grey}#mermaid-svg-138seXcSwBqjyifb .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-138seXcSwBqjyifb .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-138seXcSwBqjyifb #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-138seXcSwBqjyifb .sequenceNumber{fill:#fff}#mermaid-svg-138seXcSwBqjyifb #sequencenumber{fill:#333}#mermaid-svg-138seXcSwBqjyifb #crosshead path{fill:#333;stroke:#333}#mermaid-svg-138seXcSwBqjyifb .messageText{fill:#333;stroke:#333}#mermaid-svg-138seXcSwBqjyifb .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-138seXcSwBqjyifb .labelText,#mermaid-svg-138seXcSwBqjyifb .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-138seXcSwBqjyifb .loopText,#mermaid-svg-138seXcSwBqjyifb .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-138seXcSwBqjyifb .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-138seXcSwBqjyifb .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-138seXcSwBqjyifb .noteText,#mermaid-svg-138seXcSwBqjyifb .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-138seXcSwBqjyifb .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-138seXcSwBqjyifb .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-138seXcSwBqjyifb .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-138seXcSwBqjyifb .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-138seXcSwBqjyifb .section{stroke:none;opacity:0.2}#mermaid-svg-138seXcSwBqjyifb .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-138seXcSwBqjyifb .section2{fill:#fff400}#mermaid-svg-138seXcSwBqjyifb .section1,#mermaid-svg-138seXcSwBqjyifb .section3{fill:#fff;opacity:0.2}#mermaid-svg-138seXcSwBqjyifb .sectionTitle0{fill:#333}#mermaid-svg-138seXcSwBqjyifb .sectionTitle1{fill:#333}#mermaid-svg-138seXcSwBqjyifb .sectionTitle2{fill:#333}#mermaid-svg-138seXcSwBqjyifb .sectionTitle3{fill:#333}#mermaid-svg-138seXcSwBqjyifb .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-138seXcSwBqjyifb .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-138seXcSwBqjyifb .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-138seXcSwBqjyifb .grid path{stroke-width:0}#mermaid-svg-138seXcSwBqjyifb .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-138seXcSwBqjyifb .task{stroke-width:2}#mermaid-svg-138seXcSwBqjyifb .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-138seXcSwBqjyifb .taskText:not([font-size]){font-size:11px}#mermaid-svg-138seXcSwBqjyifb .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-138seXcSwBqjyifb .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-138seXcSwBqjyifb .task.clickable{cursor:pointer}#mermaid-svg-138seXcSwBqjyifb .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-138seXcSwBqjyifb .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-138seXcSwBqjyifb .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-138seXcSwBqjyifb .taskText0,#mermaid-svg-138seXcSwBqjyifb .taskText1,#mermaid-svg-138seXcSwBqjyifb .taskText2,#mermaid-svg-138seXcSwBqjyifb .taskText3{fill:#fff}#mermaid-svg-138seXcSwBqjyifb .task0,#mermaid-svg-138seXcSwBqjyifb .task1,#mermaid-svg-138seXcSwBqjyifb .task2,#mermaid-svg-138seXcSwBqjyifb .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-138seXcSwBqjyifb .taskTextOutside0,#mermaid-svg-138seXcSwBqjyifb .taskTextOutside2{fill:#000}#mermaid-svg-138seXcSwBqjyifb .taskTextOutside1,#mermaid-svg-138seXcSwBqjyifb .taskTextOutside3{fill:#000}#mermaid-svg-138seXcSwBqjyifb .active0,#mermaid-svg-138seXcSwBqjyifb .active1,#mermaid-svg-138seXcSwBqjyifb .active2,#mermaid-svg-138seXcSwBqjyifb .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-138seXcSwBqjyifb .activeText0,#mermaid-svg-138seXcSwBqjyifb .activeText1,#mermaid-svg-138seXcSwBqjyifb .activeText2,#mermaid-svg-138seXcSwBqjyifb .activeText3{fill:#000 !important}#mermaid-svg-138seXcSwBqjyifb .done0,#mermaid-svg-138seXcSwBqjyifb .done1,#mermaid-svg-138seXcSwBqjyifb .done2,#mermaid-svg-138seXcSwBqjyifb .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-138seXcSwBqjyifb .doneText0,#mermaid-svg-138seXcSwBqjyifb .doneText1,#mermaid-svg-138seXcSwBqjyifb .doneText2,#mermaid-svg-138seXcSwBqjyifb .doneText3{fill:#000 !important}#mermaid-svg-138seXcSwBqjyifb .crit0,#mermaid-svg-138seXcSwBqjyifb .crit1,#mermaid-svg-138seXcSwBqjyifb .crit2,#mermaid-svg-138seXcSwBqjyifb .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-138seXcSwBqjyifb .activeCrit0,#mermaid-svg-138seXcSwBqjyifb .activeCrit1,#mermaid-svg-138seXcSwBqjyifb .activeCrit2,#mermaid-svg-138seXcSwBqjyifb .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-138seXcSwBqjyifb .doneCrit0,#mermaid-svg-138seXcSwBqjyifb .doneCrit1,#mermaid-svg-138seXcSwBqjyifb .doneCrit2,#mermaid-svg-138seXcSwBqjyifb .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-138seXcSwBqjyifb .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-138seXcSwBqjyifb .milestoneText{font-style:italic}#mermaid-svg-138seXcSwBqjyifb .doneCritText0,#mermaid-svg-138seXcSwBqjyifb .doneCritText1,#mermaid-svg-138seXcSwBqjyifb .doneCritText2,#mermaid-svg-138seXcSwBqjyifb .doneCritText3{fill:#000 !important}#mermaid-svg-138seXcSwBqjyifb .activeCritText0,#mermaid-svg-138seXcSwBqjyifb .activeCritText1,#mermaid-svg-138seXcSwBqjyifb .activeCritText2,#mermaid-svg-138seXcSwBqjyifb .activeCritText3{fill:#000 !important}#mermaid-svg-138seXcSwBqjyifb .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-138seXcSwBqjyifb g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-138seXcSwBqjyifb g.classGroup text .title{font-weight:bolder}#mermaid-svg-138seXcSwBqjyifb g.clickable{cursor:pointer}#mermaid-svg-138seXcSwBqjyifb g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-138seXcSwBqjyifb g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-138seXcSwBqjyifb .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-138seXcSwBqjyifb .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-138seXcSwBqjyifb .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-138seXcSwBqjyifb .dashed-line{stroke-dasharray:3}#mermaid-svg-138seXcSwBqjyifb #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-138seXcSwBqjyifb #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-138seXcSwBqjyifb #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-138seXcSwBqjyifb #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-138seXcSwBqjyifb #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-138seXcSwBqjyifb #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-138seXcSwBqjyifb #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-138seXcSwBqjyifb #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-138seXcSwBqjyifb .commit-id,#mermaid-svg-138seXcSwBqjyifb .commit-msg,#mermaid-svg-138seXcSwBqjyifb .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-138seXcSwBqjyifb .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-138seXcSwBqjyifb .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-138seXcSwBqjyifb g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-138seXcSwBqjyifb g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-138seXcSwBqjyifb g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-138seXcSwBqjyifb g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-138seXcSwBqjyifb g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-138seXcSwBqjyifb g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-138seXcSwBqjyifb .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-138seXcSwBqjyifb .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-138seXcSwBqjyifb .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-138seXcSwBqjyifb .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-138seXcSwBqjyifb .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-138seXcSwBqjyifb .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-138seXcSwBqjyifb .edgeLabel text{fill:#333}#mermaid-svg-138seXcSwBqjyifb .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-138seXcSwBqjyifb .node circle.state-start{fill:black;stroke:black}#mermaid-svg-138seXcSwBqjyifb .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-138seXcSwBqjyifb #statediagram-barbEnd{fill:#9370db}#mermaid-svg-138seXcSwBqjyifb .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-138seXcSwBqjyifb .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-138seXcSwBqjyifb .statediagram-state .divider{stroke:#9370db}#mermaid-svg-138seXcSwBqjyifb .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-138seXcSwBqjyifb .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-138seXcSwBqjyifb .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-138seXcSwBqjyifb .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-138seXcSwBqjyifb .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-138seXcSwBqjyifb .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-138seXcSwBqjyifb .note-edge{stroke-dasharray:5}#mermaid-svg-138seXcSwBqjyifb .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-138seXcSwBqjyifb .error-icon{fill:#522}#mermaid-svg-138seXcSwBqjyifb .error-text{fill:#522;stroke:#522}#mermaid-svg-138seXcSwBqjyifb .edge-thickness-normal{stroke-width:2px}#mermaid-svg-138seXcSwBqjyifb .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-138seXcSwBqjyifb .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-138seXcSwBqjyifb .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-138seXcSwBqjyifb .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-138seXcSwBqjyifb .marker{fill:#333}#mermaid-svg-138seXcSwBqjyifb .marker.cross{stroke:#333}
:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}
#mermaid-svg-138seXcSwBqjyifb {
color: rgba(0, 0, 0, 0.75);
font: ;
}
视觉系统拍照
等待工件进入抓取区域
进行抓取
同步阶段
放置
视觉系统拍照的目的是为了给出工件在机械手坐标系下的瞬时位置,此时机械手可能尚未进入可抓取区域,机械手需要等待工件进入并进行抓取,同步阶段是为了保证物体已经被抓起,最后机械手将会完成抓取并放置的动作。
三、抓取策略
传送带速度如何设置?
- 如果工件比较密集,机械手可能会出现“漏抓”现象,适当降低传送带速度可以避免;
- 如果工件比较稀疏,机械手可能会出现“偷懒”现象,适当提升传送带速度可以避免;
3.1 PID式抓取策略
这一种形式机械手的目标位置实时刷新,使得机械手末端速度与皮带速度完全一致即可完成抓取。
3.2 位置预测策略
这个策略简单来说,就是在工件运行方向找到一个点,这个点使得机械手到该点的时间恰好等于传送带到该点的时间。如何寻找这个点是策略的主要目的,抓取点求取过程如下(注意这是建立在机械手坐标系
X
X
X轴和皮带运动方向同向的基础上的)。
工件进入视觉系统瞬间,相机将会给出此刻工件位置
P
P
P,经过
t
1
t_1
t1时间后,相机将会到达点
M
M
M,设传送带速度恒定,大小为
V
V
V,则有:
t
1
=
P
M
V
t_1=\frac{PM}{V}
t1=VPM
再来看机械手的运动,假设此时机械手的位置为
S
S
S,经过
t
2
t_2
t2时间机械手末端到同一个点
M
M
M,所以有:
t
2
=
f
(
S
M
)
t_2=f(SM)
t2=f(SM)
f
f
f计算规划时间的函数,如果
t
1
=
t
2
t_1=t_2
t1=t2,此时的
M
M
M就是抓取点:
P
M
V
−
f
(
S
M
)
=
0
\frac{PM}{V}-f(SM)=0
VPM−f(SM)=0
M
M
M点的坐标为
(
x
m
,
y
m
)
(x_m,y_m)
(xm,ym),
P
P
P点的坐标为
(
x
p
,
y
p
)
(x_p,y_p)
(xp,yp),因为传送带运动方向为“纯”
X
X
X方向,所以有:
M
=
(
x
m
,
y
p
)
M=(x_m,y_p)
M=(xm,yp) 显然
P
M
PM
PM是一个关于数
x
m
x_m
xm的方程,同理
S
M
SM
SM亦是如此。设他们之间的关系为
P
M
=
g
(
x
m
)
S
M
=
h
(
x
m
)
PM=g(x_m)\quad SM=h(x_m)
PM=g(xm)SM=h(xm),进而:
g
(
x
m
)
V
−
f
[
h
(
x
m
)
]
=
0
\frac{g(x_m)}{V}-f[h(x_m)]=0
Vg(xm)−f[h(xm)]=0 再抽象一下:
t
(
x
m
)
=
0
t(x_m)=0
t(xm)=0 求抓取点问题转换成求上述方程的零点,求零点的方法可以通过二分法计算,假设抓取的上限为
U
U
U,抓取的下限制为
D
D
D,计算流程如下: 
首先检查再指定上下游是否有解,如果没有解,直接退出循环;如果有解,根据二分法求出解的范围,每次求解的时候需要判断是否满足我们的误差要求
x
e
r
r
x_{err}
xerr,如果不满足继续二分,如果满足退出循环,此时的
x
d
x_d
xd或者
x
u
x_u
xu为所求抓取点的位置。
[1]王铮, 戴坚锋, 钱振宇,等. 面向传送带作业系统的机器人目标跟踪与抓取策略研究[J]. 计算机测量与控制, 2016, 24(11):6.