import json url="https://pixelstomotors.com/record/unity-family-restaurant-serving-robot" title="サービスロボット導入シミュレーション Log#4 | Unity にファミレスを建て、配膳ロボットを走らせた" meta="Unityに35卓のファミレスを建て、配膳ロボット2台とスタッフ2人、入店から退店までの客を動かした。間取りを5回直した1回目では、往復の88%でロボットが60秒以上動けず、原因はロボットより店と人の動きの側にあった。" tags=["サービスロボット導入シミュレーション","配膳ロボット","Unity","NavMesh","ファミレス","シミュレーション","Claude Code","SimPy","人手不足"] x="Unityにファミレスを建てて配膳ロボットを走らせたら、往復の88%で60秒以上動けなくなった。原因はロボットより、椅子を引くお客さんとレジの作り。店が本物っぽくなるまで数字は使えない #R2R2R #PixelsToMotors\n"+url fb="""配膳ロボットって、お店の中で何回くらい止まってるんだろう。前に配膳ロボットで店の人を1人減らせるかを試算したとき、ここだけは仮の数字で置いていました。お店の間取りがないと計算できないからです。 なので今回は、Unity の中にファミレスを1軒建てました。卓35・席122、厨房とパントリーとレジとトイレもあります。そこに配膳ロボット2台とスタッフ2人、入ってきて食べて会計して帰るお客さんを動かしました。コードは Claude Code に書いてもらって、自分は画面を見て「この店はおかしい」と言う役です。 これが思ったより大変で、間取りを5回くらい作り直しました。壁ぞいの奥の席に人が入れない。レジのまわりに16人固まる。お客さんが自分からロボットにぶつかっていく。実際のお店ではありえないことが、画面で見ると次々出てきます。 で、ひととおり整えて2時間分を回したら、ロボットの往復の88%で、60秒以上動けなくなりました。料理が届くまでは平均12.7分。試算では0.67分だったのに。 原因を追うと、ロボットの性能じゃなくて、お客さんが椅子を引いて通路にはみ出すのが497回、とかの店の側でした。椅子をどれくらい引くかも仮の数字なんだよね。店と人が本物っぽくなるまでは、この数字は使えないなと思いました。 もうひとつ面白かったのが床の色。Unity の地図は「ロボットの中心が行ける範囲」で出るので、細い通路が1本の線に見えるんです。これだと見た人は「この線しか通れない」と思っちゃう。ロボットの体が入れる範囲で塗り直しました。 動画も5本載せています。止まる回数をちゃんと測るのは次の回です。""" li_en="""How often does a serving robot stop inside a restaurant, and for how long? When I estimated whether serving robots could replace one staff member, I had to guess those numbers. They depend on the floor plan, and I had none. So I built a family restaurant inside Unity: 35 tables, 122 seats, a kitchen, a pantry, a register and restrooms. Two serving robots, two staff, and guests who come in, wait, sit, eat, pay and leave. Claude Code wrote the code. My job was to watch the screen and say "this is not how a real restaurant works." That took about five rebuilds. Guests could not reach the inner seats along the wall. Sixteen people piled up at the register. Guests walked straight into robots, which people in a real restaurant don't do unless it is on purpose or they are kids. After the store looked reasonable, I ran two hours of service. In 76 of 86 robot trips (88%), the robot was blocked for 60 seconds or more. Food took 12.7 minutes on average from kitchen to table. My earlier estimate said 0.67 minutes. The cause was mostly the store, not the robot. Guests pulled their chairs into the aisle 497 times, and how far and how long they pull is still a placeholder. Until the store and the people behave like real ones, the robot numbers can't go back into the estimate. One more thing I changed: the floor color. Unity's navigation map shows where the robot's center can go, so a narrow aisle looks like a thin line. Anyone watching would think the robot can only use that line. I repainted the floor to show where the robot's body fits. Measuring the stops condition by condition comes next.""" li_ja="""配膳ロボットは、お店の中で何回止まり、何秒待たされるのか。配膳ロボットで店の人を1人減らせるかを試算したとき、ここは仮の数字で置くしかありませんでした。間取りがないと計算できないからです。 そこで Unity の中に、ファミリーレストランを1軒建てました。卓35・席122で、厨房・パントリー・レジ・トイレもあります。配膳ロボット2台とスタッフ2人、それに入ってきて、待って、座って、食べて、会計して帰るお客さんを動かしています。コードは Claude Code が書き、自分は画面を見て「実際の店ではこうならない」と言う役でした。 間取りは5回ほど作り直しました。壁ぞいの奥の席にお客さんが入れない。レジのまわりに16人が固まる。お客さんが自分からロボットに向かって歩いていく。実際の店で、わざとか子ども以外はしないことです。 店の形が整ったところで、2時間分を回しました。ロボットの往復86回のうち76回(88%)で、60秒以上動けなくなりました。料理ができてから席に届くまでは平均12.7分。前の試算では0.67分でした。 原因はロボットより、店の側にありました。お客さんが椅子を引いて通路にはみ出したのが497回。椅子をどれだけ、何秒引くかは、まだ仮の値です。店と人が本物らしく動くまでは、ロボットの数字を試算に戻せません。 もう1つ、床の色も変えました。Unity の地図は「ロボットの中心が行ける範囲」で出るので、細い通路は細い線に見えます。見た人は、ロボットがその線しか通れないと思うはずです。ロボットの体が入れる範囲で塗り直しました。 条件ごとに止まる回数を測るのは、次の回です。""" lc_en="""Notes on the setup: the robot is a 0.5 m cylinder with a 0.6 m front sensor rule (stop if something is within 0.6 m, move again after 1 s of clear space, look for another route after 10 s, count as stuck after 60 s). Unity's built-in avoidance is turned off for the robot because it doesn't match how real serving robots behave; only path planning is used. Arrival rates, eating times and the robot/staff split follow the earlier SimPy model, so the two can be compared. Group sizes, drink bar visits, restroom visits and chair pulling are placeholders, and they are exactly what I want to count in a real restaurant. The full Unity code and settings (43 files), the design doc and every request to Claude Code are in the post.""" lc_ja="""作りについての補足です。ロボットは直径0.5 m の円柱で、前のセンサーの決まりで動きます(0.6 m 以内に何かあれば止まる、1秒空いたら動き出す、10秒たったら別の道を探す、60秒で動けなくなった扱い)。Unity の自動でよける機能は、実際の配膳ロボットのよけ方と違うので、ロボットには使っていません。道を探す部分だけを使っています。来店のペース、食事の時間、ロボットとスタッフの運び分けは前の SimPy の試算とそろえていて、2つを並べられるようにしています。1組の人数、ドリンクバーやトイレに行く回数、椅子の引き方は仮の値で、ここが実際のお店で数えたいところです。Unity のコードと設定43本の全文、設計書、Claude Code への依頼文はすべて記事に載せています。""" posts={"x":x,"facebook":fb,"linkedin":li_en+"\n\n—\n\n"+li_ja,"linkedin_comment":lc_en+"\n\n—\n\n"+lc_ja} d={"meta":{"day":357,"date":"2026-10-21","title":title,"url":url,"meta_description":meta,"tags":tags},"posts":posts} O='/mnt/user-data/outputs/LOG357/' json.dump(d,open(O+'LOG357_sns_posts.json','w',encoding='utf-8'),ensure_ascii=False,indent=2) txt=f"LOG357 SNS投稿\nタイトル: {title}\nURL: {url}\n\n■ X\n{x}\n\n■ Facebook\n{fb}\n\n■ LinkedIn\n{posts['linkedin']}\n\n■ LinkedIn(補足コメント)\n{posts['linkedin_comment']}\n" open(O+'LOG357_sns_posts.txt','w',encoding='utf-8').write(txt) print(len(x.replace(url,'x'*23)), len(meta))