locomotion op• 数据种类:any × scalar × scalar × scalar → table
• 调用: import fullseye as fs; fs.ledger.gait_step_events(foot_xyz, dt, plant_z, swing_z, min_swing_s: 'float' = 0.1, min_stance_s: 'float' = 0.1, clearance_min: 'float' = 0.02, advance_min: 'float' = 0.05) -> 'dict'(要直接调用实现,import locomotion; locomotion.gait_step_events(foot_xyz, dt, plant_z, swing_z, min_swing_s: 'float' = 0.1, min_stance_s: 'float' = 0.1, clearance_min: 'float' = 0.02, advance_min: 'float' = 0.05) -> 'dict';从台账取用则 opsdrive.get("gait_step_events"))
• GPU:无(仅 CPU 参考实现)
用滞回从足部轨迹中提取行走的步(离地 -> 摆动 -> 着地)。
> 以下的详细说明为原文 —— 摘要与标题已翻译。
足の軌跡から「一歩」を取り出す。足の高さにヒステリシスを掛けて着地 / 遊脚を決め(z < plant_z で着地、z > swing_z で遊脚、その間は直前の状態を保つ = 接地のばたつきを一歩に数えない)、離地 → 遊脚 → 着地の 1 周期のうち次をすべて満たすものだけを
一歩と認める:
• 遊脚の長さ ≥ min_swing_s [s]、着地後の立脚 ≥ min_stance_s [s] (最後の一歩は記録の終わりまで立脚していれば足りる)
• 遊脚中の足の最高点 − 直前の立脚の始まりの高さ ≥ clearance_min [m] (すり足を落とす)
• 着地点の水平の前進(直前の立脚の始まり = 前の足場から着地点への変位の、進行方向への成分)≥ advance_min [m] (引きずりを落とす)。ヒステリシスの帯の中ではまだ「着地」と読むので、離地のコマの位置から測ると遊脚の出だしの分だけ短く出る —— だから前の足場から測る。進行方向は全足の最初と最後の位置の平均の差(動いていなければ +x)。
foot_xyz は (T, F, 3) の世界座標 [m] (z が上)、dt はコマの間隔 [s]。plant_z < swing_z は地面からの高さの閾値 [m] (既定値を置かない: 足の形・センサで違う)。返り値 {"steps": [{foot, liftoff, touchdown, t_touchdown, xy, advance, clearance, swing_s}], "per_foot": [n_steps …], "rejected": [{foot, touchdown, reason}], "alternating": bool, "direction": (2,)}。steps は着地のコマ順。alternating は足が 2 本以上で、続く一歩がいつも別の足のとき True。
★同じコマで 2 本以上の足が着地したら ValueError で拒否する: 両足の同時着地は歩行の一歩ではなく(跳躍・両足着地)、交互かどうかの順序も決まらない(onocollo の alternation_ok が min_sep で落としていた穴を、ここでは入口で止める)。空の入力(foot_xyz が 0 要素)は ValueError で拒否する。
English: hysteresis step detector (plant below plant_z, swing above swing_z); a step needs enough swing time, stance dwell, clearance and forward advance. Two feet touching down in the same frame raise ValueError. Adapted from onocollo evolve/musculo.py detect_steps / alternation_ok (Apache-2.0, same author).
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• 算法的正典(作者、年份)与用途见上面的族使用指南。
• walking_ops_tour — py -3.11 examples/walking_ops_tour.py
table 作为输入)course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same
locomotion)contact_points · com_from_silhouette · support_polygon · com_support_margin · gait_phase · support_line_margin · lipm_capture_point · capture_margin
*Provenance: locomotion.py — DRIVE 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.