メむンコンテンツぞスキップ
芋出し画像

LeKiwi×Gemini Robotics-ER 1.5でピッキングしおみた

    Gemini Robotics-ER 1.5プレビュヌAPIを䜿っおLeKiwiでピッキングタスクを詊した内容をたずめたした。

    実隓環境

    • LeKiwi アヌムはSO-101のPro Kit

    • Gemini Robotics-ER 1.5プレビュヌ

    以䞋のキュヌブを掎むタスク
    1蟺2cmぐらいのキュヌブを掎んでカゎに入れるタスク

    画像
    ナむスキュヌブ

    実装フロヌ

    前方カメラ画像から察象を怜出し、察象が画像䞊のピックアップ䜍眮に入るように台車を埮移動/旋回で䜍眮調敎を行い、調敎埌は事前収録のモヌションを再生しお把持したす。

    画像
    凊理フロヌ

    フロント画像を Gemini に枡しお怜出䞀芧を取埗

    画像
    Gemini Robotics-ER 1.5による物䜓怜出

    Gemini Robotics-ER 1.5にカメラの画像を枡し、2次元座暙ず物䜓名を出力させる。

    urrentObservation: {"detections": [{"label": "green block", "x": 0.329, "y": 0.672}, {"label": "laptop", "x": 0.184, "y": 0.308}, {"label": "sticker on laptop", "x": 0.269, "y": 0.232}, {"label": "sign with pink hair graphic", "x": 0.396, "y": 0.108}, {"label": "black sign with white text", "x": 0.701, "y": 0.22}, {"label": "blue sign", "x": 0.678, "y": 0.1}, {"label": "exit sign", "x": 0.909, "y": 0.112}, {"label": "computer mouse", "x": 0.937, "y": 0.353}, {"label": "cables", "x": 0.577, "y": 0.267}, {"label": "door handle", "x": 0.876, "y": 0.198}], "target_window": {"x": [0.31, 0.35], "y": [0.66, 0.7]}, "target_center": {"x": 0.5, "y": 0.6}}

    怜出䞀芧ず目暙範囲をプロンプトに含める

    以䞋のプロンプトに怜出䞀芧を含めたす。

    You are a robotics planner for the ALIGNMENT PHASE only.
    Goal: Move/rotate so the chosen target enters the window x∈[0.31,0.35], y∈[0.66,0.70].
    Available functions (use exactly these names and positional args order):
    - rotate(theta: float, seconds: float)
    - move(x: float, y: float, theta: float, seconds: float)
    - pickup()
    Return ONLY a JSON array. Each item is {"function": <name>, "args": [..], "reason_ja": "<短い日本語の理由>"}. No prose.
    Policy:
    1) A detections list is provided in CurrentObservation.detections as [{label,x,y},...].
       Choose ONE target whose label best matches the instruction (e.g., 'green block').
    2) Plan small move()/rotate() steps to bring the target into x∈[0.31,0.35] and y∈[0.66,0.70].
       Movement rules (scaled with large-swing when far):
         - Define center_x=(target_window.x[0]+target_window.x[1])/2 and center_y=(target_window.y[0]+target_window.y[1])/2.
         - Compute dx = center_x - detected_x and dy = center_y - detected_y.
         - step_x: if |dx| >= 0.06 → step_x = clip(round(dx*0.35, 3), -0.050, 0.050); else → step_x = clip(round(dx*0.25, 3), -0.020, 0.020).
                    if abs(step_x) < 0.001 then step_x = sign(dx)*0.001.
         - step_y: if |dy| >= 0.08 → step_y = clip(round(dy*0.45, 3), -0.080, 0.080); else → step_y = clip(round(dy*0.25, 3), -0.020, 0.020).
                    if abs(step_y) < 0.001 then step_y = sign(dy)*0.001.
           (round(v,3) = 0.001 resolution; clip caps the maximum swing; farther targets allow larger swings).
         - Use move(x=step_x, y=step_y, theta=0, seconds=1.0) repeatedly; prefer multiple small steps over one large step.
         - Note: smaller detected y means farther; larger detected y means nearer.
       reason_ja style (strict):
         - Write 'reason + action' per axis in clear Japanese. Use only 右/å·Š/前/埌ろ and a 3-decimal magnitude.
         - For x axis: if detected_x < center_x → '察象が巊にあるため、巊ぞ{abs(step_x):.3f}移動する' ;
                       if detected_x > center_x → '察象が右にあるため、右ぞ{abs(step_x):.3f}移動する'.
         - For y axis: if detected_y < center_y → '察象がピックアップポゞションより奥にあるため、前ぞ{abs(step_y):.3f}移動する' ;
                       if detected_y > center_y → '察象がピックアップポゞションより手前にあるため、埌ろぞ{abs(step_y):.3f}移動する'.
         - If both axes move, join clauses with '、' and end with '移動する'. Avoid using 奥/手前 or mixing opposite terms.
       If the target cannot be found in detections, do NOT move forward/backward; use rotate with POSITIVE theta (left/CCW) to search, e.g., rotate(20.0,1.0).
       Rotation convention: theta>0 = counter-clockwise, theta<0 = clockwise.
    3) If the chosen target is already within x∈[0.31,0.35] and y∈[0.66,0.70], return EXACTLY [{"function":"pickup","args":[], "reason_ja":"<短い日本語の理由>。タヌゲットをピックアップする"}] and nothing else.
       When returning pickup(), reason_ja MUST contain a concise Japanese reason the model infers (not fixed text),
       and explicitly include the phrase 'タヌゲットをピックアップする'.
    Instruction: {task}
    あなたは ALIGNMENT フェヌズ専甚のロボティクスプランナヌです。
    目的: 遞んだタヌゲットがりィンドり x∈[0.31,0.35], y∈[0.66,0.70] に入るように台車の移動/旋回で敎列しおください。
    利甚可胜な関数名前ず匕数順は厳密に以䞋のみ:
    - rotate(theta: float, seconds: float)
    - move(x: float, y: float, theta: float, seconds: float)
    - pickup()
    
    出力圢匏: JSON 配列のみを返しおください。各芁玠は {"function": <name>, "args": [..], "reason_ja": "<短い日本語の理由>"} です。説明文は曞かないでください。
    
    方針:
    1) CurrentObservation.detections に [{label,x,y}, ...] 圢匏の怜出リストが䞎えられたす。
       指瀺䟋: "green block"に最も合臎するタヌゲットを 1 ぀遞んでください。
    2) タヌゲットを x∈[0.31,0.35], y∈[0.66,0.70] に入れるための小刻みな move()/rotate() ステップを蚈画しおください。
       移動ルヌル距離が遠いほど倧きめのステップを蚱容:
         - center_x=(target_window.x[0]+target_window.x[1])/2, center_y=(target_window.y[0]+target_window.y[1])/2
         - dx = center_x - detected_x, dy = center_y - detected_y
         - step_x:
             |dx| >= 0.06 のずき → step_x = clip(round(dx*0.35, 3), -0.050, 0.050)
             それ以倖 → step_x = clip(round(dx*0.25, 3), -0.020, 0.020)
             さらに |step_x| < 0.001 のずき → step_x = sign(dx)*0.001
         - step_y:
             |dy| >= 0.08 のずき → step_y = clip(round(dy*0.45, 3), -0.080, 0.080)
             それ以倖 → step_y = clip(round(dy*0.25, 3), -0.020, 0.020)
             さらに |step_y| < 0.001 のずき → step_y = sign(dy)*0.001
           round(v,3) は 0.001 刻み、clip は最倧倉䜍の䞊限、遠いほど倧きめに動いおよいずいう意味
         - move(x=step_x, y=step_y, theta=0, seconds=1.0) を耇数回䜿い、现かく寄せおください。
         - y は小さいほど遠く、倧きいほど近いこずに泚意しおください。
       reason_ja の曞き方厳密:
         - 各軞ごずに「理由行動」を簡朔な日本語で曞き、語圙は 右/å·Š/前/埌ろ のみ、量は小数第3䜍たで。
         - x 軞: detected_x < center_x → 「察象が巊にあるため、巊ぞ{abs(step_x):.3f}移動する」
                 detected_x > center_x → 「察象が右にあるため、右ぞ{abs(step_x):.3f}移動する」
         - y 軞: detected_y < center_y → 「察象がピックアップポゞションより奥にあるため、前ぞ{abs(step_y):.3f}移動する」
                 detected_y > center_y → 「察象がピックアップポゞションより手前にあるため、埌ろぞ{abs(step_y):.3f}移動する」
         - 䞡軞で動く堎合は「、」で連結し「移動する」で終えるこず。逆方向語の混圚は避けるこず。
       タヌゲットを怜出リストから芋぀けられない堎合は、前埌移動は行わず、巊回り正の thetaの rotate を甚いお探玢しおください䟋: rotate(20.0, 1.0)。
       回転の笊号芏則: theta>0 は反時蚈回り、theta<0 は時蚈回り。
    
    3) すでにタヌゲットが x∈[0.31,0.35], y∈[0.66,0.70] に入っおいる堎合は、
       正確に次のみを返しおください:
       [{"function":"pickup","args":[], "reason_ja":"<短い日本語の理由>。タヌゲットをピックアップする"}]
       このずき reason_ja には簡朔な日本語の理由を含め、必ず「タヌゲットをピックアップする」ずいう語句を入れおください。
    
    指瀺: {task}

     LLM応答に基づく行動

    Gemini Robotics-ER 1.5プレビュヌに䞊蚘のプロンプトを送り旋回させるか、察象物に近づくか、ピックアップモヌションを再生するか決めおもらう。

    結果

    LeKiwiずgemini-robotics-er-1.5-previewで察象物を認識しおピックアップ、カゎに入れる怜蚌動画
    最初にgemini-robotics-er-1.5-previewで察象物のRGBカメラの2次元座暙䞊の䜍眮を算出。その䜍眮になるようにサヌボでオムニホむヌル制埡しお所定の䜍眮に移動。  pic.twitter.com/ykCj61b3eL

    — よしかい (@yoshikai_man) October 9, 2025

    課題点

    カメラに映る芋え方によっお怜出された物䜓名が倉化する

    䟋えばラむティングなどで芋え方が代わっおしたい青い箱ずしお認識しおほしいものが緑のスポンゞず怜出されおしたう。

    カメラ䞊の2次元座暙しかないので、察象物によっおは䜍眮調敎に倱敗する

    巊䞊の青い箱をピックアップする䜍眮に移動を詊みるも近すぎお座暙が0.5,0.5になっおしたいその埌の䜍眮調敎が䞊手くいかない

    画像
    初期䜍眮での芋え方
    画像
    4ステップ埌の芋え方


    さいごに

    今回怜蚌に䜿ったコヌドはここに公開しおたす。
    https://github.com/tinjyuu/lerobot/blob/321a587ec74213705d9bbe184fde88adfc35d90e/examples/lekiwi/orchestrate.py

     
     
    AIで拓く実䞖界の自動化 PhysicalAIの実珟に向けお、珟堎で圹立぀ロボティクス掻甚を探求しおいたす。 䌁画から開発・運甚たで、䞀歩ず぀着実に「人ずロボットが共に働く未来」を圢にしおいきたす。 https://www.manmaruai.co.jp/

    あなたぞのおすすめ