向下的四元数 [0.5, 0.5, 0.5, -0.5] 将局部 Y 闭合方向映射到全局 X,这可能适合 X 宽度较小的物体。辣椒看起来大致呈圆柱形,因此沿 X 或 Y 闭合应该都可以。中心玩具看起来沿图像垂直方向拉长,可能是全局 Y,因此沿 X 方向横跨其宽度抓取似乎合适。手表看起来表带也沿 Y 拉长,表盘靠近图像底部。我可以沿 X 方向横跨表带抓取,但中心附近可能有一个开口孔,手指可能会伸进去。沿 X 方向抓取表壳,靠近全局 Y 更负的一端,似乎更稳定。其圆形表盘在 X 方向看起来约 0.04米宽。这些物体可能都很小。
我仍然需要更好地估计桌面高度。我或许可以利用图像、标定和已知的指尖几何来检查物体基准平面。在头部图像中,左指尖大约出现在像素 (95, 243) 和 (151, 250)。初始时,张开的手指从第六连杆沿全局 +Y 方向指向,并保持在 z = 0.9215米,使其指尖大约在 y = -0.195米。对于点 (-0.3, -0.195, 0.9215),我估计相机坐标为 x = -0.3,y = -0.866 × 0.215 - 0.5 × (-0.3864) = 0.0071,z = 0.5 × 0.215 - 0.866 × (-0.3864) = 0.4421。这投影到 u = 124.4 和 v = 235.4。图像中的指尖似乎也大约在 (96, 244) 和 (147, 245);它们的间距可能反映局部 Y 张开带来的约 ±0.04米的 X 方向展开。y 约 -0.195米、z 约 0.92米的指尖投影在 v = 235 附近。z = 0.75–0.80米的物体投影在垂直像素 240–295 附近,因此 0.75米的桌面高度仍然合理。
篮子边缘可能在 z = 0.85 或 0.88米,其底部在 z = 0.75米。左侧篮子大致跨越像素 x = 124–257 和 y = 140–213,其中心大约在 (190, 178)。我估计该中心在世界坐标为 x = -0.26米,y = 0.11米,z = 0.83米。如果 z = 0.75米,其前部底部在垂直像素 212 处的 Y 坐标会是多少?我可以在桌面上生成投影和逆投影来检查这一点。在向下旋转之前,我应该先抬升到 z = 1.05米以避免接触,可能向前移动到 y = -0.22米,并拆分运动以遵守 0.25米的目标距离和 1弧度的姿态限制。
我有几种可能的机械臂分配方案。一种是左臂处理左侧辣椒、左侧手表、中心玩具和位于 x = +0.036米的中心手表,而右臂处理右侧辣椒、右前玩具、右侧手表和右后玩具。中心物体需要左臂稍微交叉,而将左侧手表放入右侧篮子将需要更长的交叉。右侧篮子大约在 x = 0.25米:将左末端执行器从 x = -0.3米移动到 +0.25米跨越约 0.55米,需要多个目标点。位于 x = -0.166米的左侧手表到 x = +0.26米的篮子需要移动约 0.43米。这在机械臂的触及范围内吗?最大触及距离可能约为 0.65米,初始位姿可能距篮子约 0.5米,但这些只是估计。让右臂取回左侧手表也需要从 x = +0.3米到 -0.166米的长距离移动。左臂在中间篮子上方转移可能是可行的。
另一种分配是让左臂处理左侧辣椒、左侧手表和中心玩具,右臂处理中心手表、右侧辣椒、前方玩具、右侧手表和后方玩具。或者,每只臂可以拿四个物体:左臂可以处理左侧辣椒、左侧手表、中心玩具和中心手表,而右臂处理右侧辣椒和其余三个右侧物体。右侧辣椒从大约 (0.135, -0.09, 0.8) 转移到位于 (-0.26, 0.11, 0.85) 的白色篮子,将涉及约 0.4米向左和 0.2米向前的移动。将其保持在 z = 1.0米以上可能提供间隙,但同时的中心交叉可能使两臂靠近,因此我需要错开它们或保持分离。
更自然的分配可能是左臂处理两个辣椒、中心玩具和左侧手表,右臂处理中心/前方手表、右前玩具、右侧手表和右后玩具。左臂将把右侧辣椒从 x = 0.135米移动到大约 -0.25米,而右臂将把中心手表从 x = 0.036米移动到大约 x = 0.25米的红色篮子。中心玩具从 x = -0.06米转移到位于 x = 0 的蓝色篮子距离很短。剩余的困难转移是左侧手表从 x = -0.166米到位于 x = 0.25米的红色篮子,横向约 0.43米。我可以在 z = 1.0米处将其运送至蓝色篮子上方。左臂能到达 x = 0.25米,y = 0.1米,z = 1.0米吗?我不确定在 x = ±0.3米和 y = -0.352米附近的基座几何结构,因此我应该使用逆运动学预检查并适应。交接可能没有必要。如果直接放置失败,左臂可以将手表放在中心附近,让右臂取回,尽管这会增加工作量。
对于第一对,我可以同时抓取左侧辣椒和右前木制玩具,而不是从右侧辣椒或右侧手表开始。右侧辣椒大约在 x = 0.135米,y = -0.089米,也许 z = 0.79米,更靠近中心。右前玩具大约在 x = 0.22米,y = -0.219米。左侧辣椒从 (-0.342, -0.106) 到白色篮子大约 (-0.26, 0.1) 的路径,以及右前玩具从 (0.22, -0.219) 到蓝色篮子大约 (0, 0.1) 的路径,看起来大部分是分开的。右臂将在篮子附近接近 x = 0,而左臂保持在 x = -0.26米附近。第二对可以是位于 (-0.06, -0.14) 的中心玩具,放入蓝色,以及位于 (0.326, -0.123) 的右侧手表,放入红色。将位于 (-0.166, -0.126) 的左侧手表与位于 (0.036, -0.203) 的中心手表配对,会使两臂都朝向红色篮子,因此这些放置需要错开。我可以改为将中心手表与右侧辣椒配对,放入白色。我稍后可以重新排序;并非每次抓取都需要同时进行。
顺序操作也是一种选择,并且会简化碰撞规划。有 1100 个控制步骤可用。一次拾取和放置可能花费约 40 步,其中 5–10 步用于移动,2–3 步用于接近接触;即使每个物体允许 60 步,也有 8 × 60 = 480 步。将空闲臂保持在其初始位姿可能就足够了。右指尖初始延伸到大约 y = -0.195米,z = 0.92米,位于 y = -0.219米,z = 0.77米的右前玩具上方,提供约 0.15米的垂直间隙。位于 x = 0.3米的空闲右臂似乎也与左臂通往右侧辣椒的路线分离。然而,在右前玩具附近旋转右夹爪可能导致接触,因此我应该先向上或向后移动。在预算内,一次使用一只臂仍然是一个简单、稳健的备用方案。
对于接近,我可以先只移动左臂朝向辣椒,同时保持右臂不动。初始手指是水平的,因此在 z = 1.02米和 y = -0.28米附近的开放空间中旋转,比在桌面附近旋转更可取。辣椒的估计 X 和 Y 坐标为 -0.342米和 -0.106米。手指向下时,指尖 Z 坐标为第六连杆 Z 减去 0.1576米,而其 Y 大约为第六连杆 Y。对于 z 约 0.80米的抓取中心,我最初考虑增加 0.13米以获得第六连杆高度。接触实际上可能发生在局部 x = 0.12米附近,表明第六连杆 z = 物体 z + 0.12米,或约 0.92米。因此,初始第六连杆高度 0.9215米在旋转后将是合适的,指尖在 0.75米桌面上方接近 z = 0.764米。我应该将第六连杆 X 和 Y 与抓取中心对齐,并可能使用约 0.91米的最终第六连杆高度。
在初始位姿大约 (-0.3, -0.352, 0.922) 处旋转,会将指尖从 y = -0.195米,z = 0.922米扫到 y = -0.352米,z = 0.764米。这可能在前方桌面空地上方,但桌子的前边缘可能接近 y = -0.4米,最终指尖将仅高于估计桌面 0.014米。夹爪在旋转过程中可能撞到桌子。我应该先抬升到 z = 1.05米,向下旋转,移动到物体上方,然后下降。
一种初始抬升选项是在当前 X 和 Y 处将左臂移动到 z = 1.08米,保持水平四元数和张开的夹爪。这是 0.1585米的位置变化,在 0.25米以内,姿态变化为零;我可以允许 5 步。我也可以抬升右臂作为准备。对于同时准备,我正在考虑将两者都抬升到 z = 1.06米,并在那里通过中间姿态旋转。
我需要仔细选择向下的四元数。我最初想到从 = [0.707, 0, 0, 0.707] 插值到 [0.5, 0.5, 0.5, -0.5],也许使用约 60° 的中间姿态或暂定四元数 [0.6533, 0.2706, 0.6533, -0.2706]。但与该向下四元数的点积为 0.35355 - 0.35355 = 0,因此四元数间隔为 90°,整个相对旋转为 π,即 180°。我最初将其视为 90° 旋转。向下四元数 [0.707, 0, 0.707, 0] 与的点积为 0.5,给出 120° 的相对旋转,即 2.094弧度。它沿全局 Y 闭合,这对辣椒可能可行,但对于沿 Y 拉长的中心玩具则不太合适。
另一个向下姿态 [0.5, -0.5, 0.5, 0.5] 更好。它与的点积为 0.3535 + 0.3535 = 0.7071,因此其相对旋转仅为 90°。其旋转矩阵为 [[0, -1, 0], [0, 0, 1], [-1, 0, 0]]:局部 X 指向下方,局部 Y 沿全局 -X 方向用于沿 X 闭合,局部 Z 沿全局 +Y 方向。腕部相机随后可能向下看,这应该有帮助。我将使用这个四元数。90° 旋转为 1.5708弧度,超过 1弧度的目标限制,因此我应该将其拆分为一半的 45° 姿态和最终姿态。我将使用科学计算库计算中间四元数。
原文9,989 字
A downward quaternion of [0.5, 0.5, 0.5, -0.5] maps the local Y closing direction to global X, which may suit objects with a small X width. The pepper looks roughly cylindrical, so closing along either X or Y should work. The center toy appears elongated along the image’s vertical direction, probably global Y, so gripping across its width along X seems appropriate. The watches also appear to have bands elongated along Y, with their faces near the bottom of the image. I could grip across a band along X, but there may be an open hole near the center, and the fingers might descend into it. Gripping the watch case across X, near the end with more negative global Y, seems more stable. Its round face appears about 0.04 m wide in X. These objects may all be small.
I still need a better estimate of the tabletop height. I may be able to use the images, calibration, and known fingertip geometry to check the object base plane. In the head image, the left fingertips appear approximately at pixels (95, 243) and (151, 250). Initially, the open fingers point along global +Y from link6 and remain at z = 0.9215 m, putting their tips around y = -0.195 m. For the point (-0.3, -0.195, 0.9215), I estimate camera coordinates x = -0.3, y = -0.866 × 0.215 - 0.5 × (-0.3864) = 0.0071, and z = 0.5 × 0.215 - 0.866 × (-0.3864) = 0.4421. This projects to u = 124.4 and v = 235.4. The image tips also seem approximately at (96, 244) and (147, 245); their separation could reflect an X spread of about ±0.04 m from local Y opening. A tip at y around -0.195 m and z around 0.92 m projects near v = 235. Objects at z = 0.75–0.80 m project around vertical pixels 240–295, so a tabletop height of 0.75 m remains plausible.
The basket rims may be at z = 0.85 or 0.88 m, with their bases at z = 0.75 m. The left basket spans roughly pixels x = 124–257 and y = 140–213, with its center around (190, 178). I estimate that center at world x = -0.26 m, y = 0.11 m, and z = 0.83 m. What Y coordinate would its front base have at vertical pixel 212 if z = 0.75 m? I could generate projections and inverse projections on the table plane to inspect this. Before rotating downward, I should avoid contact by lifting to z = 1.05 m, possibly moving forward to y = -0.22 m, and splitting the motion to respect the 0.25 m target-distance and 1 rad orientation limits.
I have several possible arm assignments. One is for the left arm to handle the left pepper, left watch, center toy, and center watch at x = +0.036 m, while the right handles the right pepper, front-right toy, right watch, and back-right toy. The central objects require the left arm to cross slightly, and putting the left watch in the right basket would require a longer crossing. The right basket is around x = 0.25 m: moving the left end effector from x = -0.3 m to +0.25 m spans about 0.55 m and would need several targets. The left watch at x = -0.166 m would travel about 0.43 m to a basket at x = +0.26 m. Is that within the arm’s reach? The maximum reach might be about 0.65 m, and the initial poses may be about 0.5 m from the baskets, but these are estimates. Having the right arm retrieve the left watch would also require a long movement from x = +0.3 m to -0.166 m. A left-arm transfer above the middle basket may be feasible.
Another distribution would give the left arm the left pepper, left watch, and center toy, and the right arm the center watch, right pepper, front toy, right watch, and back toy. Alternatively, each arm could take four objects: the left could handle the left pepper, left watch, center toy, and center watch, while the right handles the right pepper and the three remaining right-side objects. The right pepper’s transfer from approximately (0.135, -0.09, 0.8) to the white basket at (-0.26, 0.11, 0.85) would involve about 0.4 m leftward and 0.2 m forward travel. Keeping it above z = 1.0 m may provide clearance, but simultaneous central crossings could bring the arms together, so I would need to stagger them or keep them separated.
A more natural assignment may be for the left arm to handle both peppers, the center toy, and the left watch, and for the right arm to handle the center/front watch, front-right toy, right watch, and back-right toy. The left arm would move the right pepper from x = 0.135 m to roughly -0.25 m, while the right arm would move the center watch from x = 0.036 m to the red basket around x = 0.25 m. The center toy’s transfer from x = -0.06 m to the blue basket at x = 0 is short. The remaining difficult transfer is the left watch from x = -0.166 m to the red basket at x = 0.25 m, about 0.43 m laterally. I could transport it above the blue basket at z = 1.0 m. Can the left arm reach x = 0.25 m, y = 0.1 m, z = 1.0 m? I am uncertain about the ARX X5 base geometry around x = ±0.3 m and y = -0.352 m, so I should use the IK precheck and adapt. A handoff is probably unnecessary. If direct placement fails, the left arm could put the watch near the center for the right arm to retrieve, though that adds work.
For the first pair, I could grasp the left pepper and front-right wooden toy together, rather than starting with the right pepper or right watch. The right pepper is around x = 0.135 m, y = -0.089 m, and perhaps z = 0.79 m, closer to the center. The front-right toy is around x = 0.22 m, y = -0.219 m. The left pepper’s path from (-0.342, -0.106) to the white basket around (-0.26, 0.1), and the front-right toy’s path from (0.22, -0.219) to the blue basket around (0, 0.1), appear mostly separated. The right arm would approach x = 0 near the basket while the left remains around x = -0.26 m. A second pair could be the center toy at (-0.06, -0.14), placed in blue, and the right watch at (0.326, -0.123), placed in red. Pairing the left watch at (-0.166, -0.126) with the center watch at (0.036, -0.203) would send both arms toward the red basket, so those placements would need staggering. I could instead pair the center watch with the right pepper going to white. I can reorder later; every grasp need not be simultaneous.
Sequential manipulation is also an option and would simplify collision planning. There are 1100 control steps available. A pick and placement might take about 40 steps using 5–10 steps for travel and 2–3 near contact; even allowing 60 steps per object gives 8 × 60 = 480 steps. Holding the idle arm at its initial pose may be sufficient. The right fingertips initially extend to about y = -0.195 m, z = 0.92 m, above the front-right toy at y = -0.219 m, z = 0.77 m, giving about 0.15 m vertical clearance. The idle right arm at x = 0.3 m also appears separated from the left arm’s route to the right pepper. However, rotating the right gripper near the front-right toy could cause contact, so I should move upward or backward first. Using one arm at a time remains an easy, robust fallback within the budget.
For the approach, I could first move only the left arm toward the pepper while holding the right arm. The initial fingers are horizontal, so rotating in open space around z = 1.02 m and y = -0.28 m would be preferable to rotating near the tabletop. The pepper’s estimated X and Y coordinates are -0.342 m and -0.106 m. With downward fingers, the fingertip Z coordinate is link6 Z minus 0.1576 m, while its Y is approximately link6 Y. For a grasp center at z around 0.80 m, I initially considered adding 0.13 m to obtain the link6 height. Contact may actually occur around local x = 0.12 m, suggesting link6 z = object z + 0.12 m, or about 0.92 m. The initial link6 height of 0.9215 m would therefore be suitable after rotation, with fingertips near z = 0.764 m above a table at 0.75 m. I should align link6 X and Y with the grasp center and might use a final link6 height around 0.91 m.
Rotating at the initial pose, approximately (-0.3, -0.352, 0.922), would sweep the fingertips from y = -0.195 m, z = 0.922 m to y = -0.352 m, z = 0.764 m. That may be over empty front-table space, but the table’s front edge could be near y = -0.4 m, and the final fingertips would be only 0.014 m above the estimated tabletop. The gripper could hit the table during rotation. I should lift to z = 1.05 m first, rotate downward, move over the object, and then descend.
One initial lift option is to move the left arm to z = 1.08 m at its current X and Y, retaining the horizontal quaternion and an open gripper. That is a 0.1585 m position change, within 0.25 m, with zero orientation change; I could allow 5 steps. I could also lift the right arm in preparation. For a simultaneous preparation, I am considering lifting both to z = 1.06 m and rotating there through intermediate orientations.
I need to choose the downward quaternion carefully. I initially thought of interpolating from q0 = [0.707, 0, 0, 0.707] to [0.5, 0.5, 0.5, -0.5], perhaps using an intermediate orientation of about 60° or the tentative quaternion [0.6533, 0.2706, 0.6533, -0.2706]. But the dot product of q0 and that downward quaternion is 0.35355 - 0.35355 = 0, so the quaternion separation is 90° and the whole relative rotation is π, or 180°. I had initially treated it as a 90° rotation. The downward quaternion [0.707, 0, 0.707, 0] has a dot product of 0.5 with q0, giving a relative rotation of 120°, or 2.094 rad. It closes along global Y, which may work for the pepper but would be less suitable for the center toy elongated along Y.
The other downward orientation, [0.5, -0.5, 0.5, 0.5], is better. Its dot product with q0 is 0.3535 + 0.3535 = 0.7071, so its relative rotation is only 90°. Its rotation matrix is [[0, -1, 0], [0, 0, 1], [-1, 0, 0]]: local X points down, local Y points along global -X for closing across X, and local Z points along global +Y. The wrist camera may then look downward, which should help. I will use this quaternion. The 90° rotation is 1.5708 rad, exceeding the 1 rad target limit, so I should split it into a halfway 45° orientation and the final orientation. I will compute the intermediate quaternion with SciPy.