跳到主要内容

東京大学 情報理工学系研究科 創造情報学専攻 2011年8月実施 筆記試験 第3問

Author​

itsuitsuki

Description​

Official examination, archived Japanese PDF. As shown in Figure 1, there is a robot arm which has rotational joints at three points OO, EE and WW, and a two-fingered hand at the end HH on an XX-YY two-dimensional plane. The position of the hand HH is (hx,hy)(h_x, h_y) and the orientation of the hand HH is hθh_\theta, the joint angles are θ1,θ2\theta_1, \theta_2 and θ3\theta_3, and the lengths of the links are OE=l1,EW=l2\mathrm{OE}=l_1, \mathrm{EW}=l_2 and WH=l3\mathrm{WH}=l_3. Answer the following questions:

(1) Write equations for the coordinates (wx,wy)(w_x, w_y) of the joint WW in terms of the joint angles θ1\theta_1 and θ2\theta_2.

(2) As shown in Figure 2, θ(−π<θ≤π)\theta (-\pi<\theta\le\pi) is defined as the angle from the axis XX to the line OP\mathrm{OP}, where the point PP has the coordinates (x,y)(x, y). Describe the definition of the function atan(y,x)\mathrm{atan}(y, x) that calculates θ\theta from (x,y)(x, y) (where (x,y)≠(0,0)(x, y)\neq(0, 0)) using tan⁡−1(a)(−π2≤tan⁡−1(a)≤π2)\tan^{-1}(a) (-\frac{\pi}{2}\le\tan^{-1}(a)\le\frac{\pi}{2}).

(3) Describe the procedure which provides the joint angle θ1(−π<θ1≤π)\theta_1 (-\pi<\theta_1\le\pi) and θ2(−π<θ2≤π)\theta_2 (-\pi<\theta_2\le\pi) from the coordinates (wx,wy)(w_x, w_y) of the joint WW using atan(y,x)\mathrm{atan}(y, x). The procedure should take account of all the constraints on possible values of the joint angles θ1\theta_1 and θ2\theta_2.

(4) Write equations for the position (hx,hy)(h_x, h_y) and the orientation hθh_\theta of the hand HH in terms of the joint angles θ1,θ2\theta_1, \theta_2 and θ3\theta_3.

(5) Describe the procedure which provides the joint angles θ1(−π<θ1≤π),θ2(−π<θ2≤π)\theta_1 (-\pi<\theta_1\le\pi), \theta_2 (-\pi<\theta_2\le\pi) and θ3(−π<θ3≤π)\theta_3 (-\pi<\theta_3\le\pi) from the position (hx,hy)(h_x, h_y) and the orientation hθ(−π<hθ≤π)h_\theta (-\pi<h_\theta\le\pi) of the hand HH.

(6) As shown in Figure 3, the hand is located at the point PP and two objects are located at QQ and RR. Explain a method to generate the trajectory of the joint angles of the robot arm to grasp the object QQ without colliding with the object RR.

题目描述​

如图 1,在二维 XX-YY 平面内有一条机械臂,在 O,E,WO,E,W 三点设转动关节,末端 HH 装有双指手爪。手爪位置为 (hx,hy)(h_x,h_y),朝向为 hθh_\theta;关节角为 θ1,θ2,θ3\theta_1,\theta_2,\theta_3;连杆长度为

OE‾=l1,EW‾=l2,WH‾=l3.\overline{OE}=l_1,\qquad \overline{EW}=l_2,\qquad \overline{WH}=l_3.
  1. 用 θ1,θ2\theta_1,\theta_2 写出关节 WW 的坐标 (wx,wy)(w_x,w_y)。

  2. 如图 2,对点 P(x,y)≠(0,0)P(x,y)\ne(0,0),定义 θ\theta(−π<θ≤π-\pi<\theta\le\pi)为从 XX 轴到直线 OPOP 的角。仅使用取值范围为

    −π2≤tan⁡−1(a)≤π2-\frac\pi2\le\tan^{-1}(a)\le\frac\pi2

    的反正切函数,分情况定义由 (x,y)(x,y) 计算 θ\theta 的函数 atan⁡(y,x)\operatorname{atan}(y,x)。

  3. 使用 atan⁡(y,x)\operatorname{atan}(y,x),说明如何由 WW 的坐标求 θ1,θ2\theta_1,\theta_2,二者均须满足 −π<θi≤π-\pi<\theta_i\le\pi,并完整考虑关节角所有可能取值约束。

  4. 用 θ1,θ2,θ3\theta_1,\theta_2,\theta_3 写出手爪 HH 的位置 (hx,hy)(h_x,h_y) 与朝向 hθh_\theta。

  5. 说明如何由给定的 (hx,hy)(h_x,h_y) 和 −π<hθ≤π-\pi<h_\theta\le\pi 求三关节角 θ1,θ2,θ3\theta_1,\theta_2,\theta_3,每个角均限制在 (−π,π](-\pi,\pi]。

  6. 如图 3,手爪起始位于 PP,目标物体位于 QQ,障碍物位于 RR。说明如何生成机械臂的关节角轨迹,使其不与 RR 碰撞并最终抓取 QQ。

Kai​

The three joint angles in Figure 1 are relative, counterclockwise angles. Assume l1,l2,l3>0l_1,l_2,l_3>0. Write wrap⁡(α)\operatorname{wrap}(\alpha) for the unique representative of α\alpha modulo 2π2\pi in (−π,π](-\pi,\pi]; in particular −π-\pi is represented by π\pi.

(1) Position of WW​

The absolute directions of the first and second links are θ1\theta_1 and θ1+θ2\theta_1+\theta_2, respectively. Therefore

wx=l1cos⁡θ1+l2cos⁡(θ1+θ2),wy=l1sin⁡θ1+l2sin⁡(θ1+θ2).\boxed{w_x=l_1\cos\theta_1+l_2\cos(\theta_1+\theta_2),\qquad w_y=l_1\sin\theta_1+l_2\sin(\theta_1+\theta_2).}

(2) Two-argument arctangent​

For (x,y)≠(0,0)(x,y)\ne(0,0), define

atan⁡(y,x)={tan⁡−1(y/x),x>0,tan⁡−1(y/x)+π,x<0, y≥0,tan⁡−1(y/x)−π,x<0, y<0,π/2,x=0, y>0,−π/2,x=0, y<0.\boxed{\operatorname{atan}(y,x)= \begin{cases} \tan^{-1}(y/x),&x>0,\\ \tan^{-1}(y/x)+\pi,&x<0,\ y\ge0,\\ \tan^{-1}(y/x)-\pi,&x<0,\ y<0,\\ \pi/2,&x=0,\ y>0,\\ -\pi/2,&x=0,\ y<0. \end{cases}}

In particular the negative XX axis has angle π\pi, and no division by zero is used on the YY axis. The function is undefined at the origin.

Let r2=wx2+wy2r^2=w_x^2+w_y^2. By taking the squared norm in (1),

r2=l12+l22+2l1l2cos⁡θ2.r^2=l_1^2+l_2^2+2l_1l_2\cos\theta_2.

A solution exists exactly when

∣l1−l2∣≤r≤l1+l2.|l_1-l_2|\le r\le l_1+l_2.

For a reachable point with r>0r>0, compute

c=r2−l12−l222l1l2,s=±1−c2.c=\frac{r^2-l_1^2-l_2^2}{2l_1l_2},\qquad s=\pm\sqrt{1-c^2}.

For each sign, set

θ2=atan⁡(s,c),θ1=wrap⁡ ⁣[atan⁡(wy,wx)−atan⁡(l2s,l1+l2c)].\boxed{\begin{aligned} \theta_2&=\operatorname{atan}(s,c),\\ \theta_1&=\operatorname{wrap}\!\left[ \operatorname{atan}(w_y,w_x)-\operatorname{atan}(l_2s,l_1+l_2c) \right]. \end{aligned}}

These follow from wx+iwy=eiθ1(l1+l2eiθ2)w_x+iw_y=e^{i\theta_1}(l_1+l_2e^{i\theta_2}). Normally the two signs give the two elbow configurations. At c=1c=1 or c=−1c=-1, the branches coincide modulo 2π2\pi, so retain just one distinct solution; use θ2=π\theta_2=\pi when c=−1c=-1.

The excluded exceptional case r=0r=0 is reachable only when l1=l2l_1=l_2. Then θ2=π\theta_2=\pi and every θ1∈(−π,π]\theta_1\in(-\pi,\pi] is a solution. One must handle this separately instead of calling atan⁡(0,0)\operatorname{atan}(0,0). Unreachable targets yield no solution. In floating-point implementation, clamp cc to [−1,1][-1,1] only for a small roundoff error after the reachability check, not for a genuinely unreachable target.

(4) Hand pose​

Let α=θ1+θ2+θ3\alpha=\theta_1+\theta_2+\theta_3. The final link points along the hand's orientation, so

hx=l1cos⁡θ1+l2cos⁡(θ1+θ2)+l3cos⁡α,hy=l1sin⁡θ1+l2sin⁡(θ1+θ2)+l3sin⁡α,hθ=wrap⁡(α).\boxed{\begin{aligned} h_x&=l_1\cos\theta_1+l_2\cos(\theta_1+\theta_2)+l_3\cos\alpha,\\ h_y&=l_1\sin\theta_1+l_2\sin(\theta_1+\theta_2)+l_3\sin\alpha,\\ h_\theta&=\operatorname{wrap}(\alpha). \end{aligned}}

(5) Inverse kinematics of the full hand pose​

First subtract the final link, whose absolute orientation is specified:

wx=hx−l3cos⁡hθ,wy=hy−l3sin⁡hθ.w_x=h_x-l_3\cos h_\theta,\qquad w_y=h_y-l_3\sin h_\theta.

Apply all reachability, branch and degenerate-case rules from (3) to obtain (θ1,θ2)(\theta_1,\theta_2). For each resulting pair choose

θ3=wrap⁡(hθ−θ1−θ2).\boxed{\theta_3=\operatorname{wrap}(h_\theta-\theta_1-\theta_2).}

With no further mechanical joint limits stated, this gives every solution in the required principal-angle intervals. When l1=l2l_1=l_2 and W=OW=O, there is a one-parameter family: arbitrary θ1\theta_1, θ2=π\theta_2=\pi, and θ3\theta_3 as above. If the wrist point is unreachable, the requested pose is unreachable even when the hand position alone might be reachable with another orientation.

(6) Collision-free joint trajectory​

Work in configuration space q=(θ1,θ2,θ3)q=(\theta_1,\theta_2,\theta_3), with periodic angular coordinates. For each configuration compute all link segments and the two-finger geometry from forward kinematics. A configuration is forbidden if any link or part of the hand intersects RR, or if self-collision or an actual joint limit occurs. Include a clearance margin for the arm's finite thickness and uncertainty. Checking only the hand position would allow an intermediate link to strike RR.

Choose a grasp pose at QQ with an appropriate approach orientation and finger opening. Solve (5) to obtain all possible goal configurations; choose an accessible branch, not merely the one closest in end-effector position. Model contact with QQ separately: it is allowed at the intended grasp surfaces during the final approach, while unintended contact earlier in the motion remains forbidden.

Construct a collision-free configuration-space path from the given initial configuration at PP to one of these goals, for example using a discretized search, a probabilistic roadmap or an RRT. Test the entire interpolating segment for each proposed edge, with continuous collision checking or conservative subdivision; collision-free endpoints alone do not suffice. Then shorten or smooth the path only while preserving clearance, and time-parameterize it to satisfy velocity and acceleration limits. Use continuous, unwrapped angle values during motion so that crossing the π/−π\pi/-\pi representation boundary does not introduce a spurious 2π2\pi jump. Follow the path, approach QQ, and close the fingers. A failed finite-resolution or finite-sample search is not itself proof that no feasible path exists.