swarmflow op• 数据种类:table → table
• 调用: import fullseye as fs; fs.ledger.obstacle_fit_doublet(field, speed=None, upstream_only: 'bool' = False, exclude_margin: 'float' = 1.25, min_explained: 'float' = 0.5, min_radius=None) -> 'dict'(要直接调用实现,import swarmflow; swarmflow.obstacle_fit_doublet(field, speed=None, upstream_only: 'bool' = False, exclude_margin: 'float' = 1.25, min_explained: 'float' = 0.5, min_radius=None) -> 'dict';从台账取用则 opsdrive.get("obstacle_fit_doublet"))
将圆柱绕流的势流 u − i v = U (1 − R²/(z − z_c)²) 拟合到速度场(实现 2,2 维非线性最小二乘)。
未知数为 (x_c, y_c, R², U)。起点有 2 个: stagnation_from_centerline,以及把网格节点作为中心候选的粗搜索(固定 U 时模型对 R² 是一次的,可用闭式求解)。取可解释比例较大者。圆的 exclude_margin 倍以内的网格不使用(因为向网格转移的核会跨越壁面而把速度平均掉)—— 重新估计并迭代 3 次。upstream_only 时仅用冲击点上游(x < x_c − R)的网格拟合(能否"在撞上之前"知道)。
判定: 相对于仅含均匀流的模型(u、v 为常数)的残差 RSS₀,圆柱模型减少的比例 1 − RSS₁/RSS₀(扰动中可由圆柱解释的比例)不小于 min_explained、半径不小于 min_radius(默认 = 2 个网格间距)、中心位于场内 —— 满足这 3 条即为 detected。否定判定(无障碍物)由该比例较小得出。
★半径下限即分辨率极限: swarm_field_from_tracks 的网格按个体间距 s 划分,因此默认不会对 R < 2s 的障碍物说"有"。拒绝的正当性已通过实测确认(均匀撒布的粒子,R = 0.6 m: R/s ≈ 5 时中心、半径均在 2 % 以内, R/s ≈ 2.5 时在 5 % 以内,R/s ≈ 1.2 时半径偏小 48 %)。
Returns:
dict: center、radius、speed、stagnation、explained、detected、n_used、rms_residual
(m/s)、rms_null(m/s)。
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• 算法的正典(作者、年份)与用途见上面的族使用指南。
• poc_swarm_obstacle_from_flow — py -3.11 examples/poc_swarm_obstacle_from_flow.py
table 作为输入)course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same
swarmflow)sph_kernel · sph_density_pressure · swarm_simulate · swarm_render_overhead · swarm_field_from_tracks · swarm_field_from_piv · potential_flow_cylinder · velocity_deficit_map
*Provenance: swarmflow.py — DRIVE 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.