Robot Interaction¶
Neighbor topology, robot-robot collision detection and overlap relaxation.
interaction
¶
radius_of
¶
detect_robot_collisions
¶
Return every overlapping pair (i, j, distance) in the fleet.
Uses an O(n^2) sweep, which is fine for the fleet sizes this simulator targets; swap in spatial hashing later if N grows large.
Source code in src/hivebr/engine/interaction.py
build_neighbors
¶
Communication topology: {robot_id: {neighbor_ids}}.
comm_radius=None gives full visibility; otherwise only robots within
the communication radius are considered reachable.
Source code in src/hivebr/engine/interaction.py
resolve_robot_overlaps
¶
Separate overlapping robots by nudging them apart along the normal.
Mutates robot positions in place. Called after integration as an optional relaxation to avoid permanently stuck fleets.