Repository navigation
Towers: fewer drones lost to the trees (measured, plans that last, rings by team) - #139
Merged
Merged
Conversation
…avy bank, crash track dump) The server prints a crashinfo line and the last 10 s of the drone for each crash. From 14 games (33 crashes): drones out of contact in an enemy tower's radio shadow flew a loiter round the point where a 3 s plan ran out, out of the clearing; Red and Blue meet head on in one circle (separation escapes); the heavy drone stalls in 50 degrees of bank. Plans last the rest of the game, the teams circle on rings 10 m apart, a low drone in its clearing stays down, the heavy drone banks 45 degrees at most, a respawned drone has a full pack. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Towers: drones hit trees
The server's acceptance test (
No drone crashes in a game) failed on master: 0 to 8 crashes a game. This measures where they come from, from the tracks, and fixes what the data shows.Measure first
towers_servernow prints, for every crash, acrashinfo:line (drone, class, order, where it was, the distance to the tower and to the clearing, the tree it hit and the gap to its trunk) and the last 10 s of the drone at 10 Hz (track: height, speed over the ground and through the air, bank, pitch, heading, the executor'sAG_PLAN/AG_ENV/AG_FALL, the order, the leg the ground sends, the distance to the tower and to the clearing's edge, the nearest other drone with its distance and height over, and how long the drone has been out of contact). The logging stays. The executor's reports reach the world throughTally::status.14 games before any change (
--speedup 10 --timeout 200, one at a time): 33 crashes, 2.36 a game (2, 3, 2, 4, 3, 1, 2, 1, 0, 5, 4, 4, 1, 1; one game in 14 had none). By what the tracks show:AG_FALL1,silent12 to 17 s in the dump): a circle of 50 m round a drone that is already 40 to 50 m from the tower, so it reaches 90 to 107 m, the trees at 86 m, a few seconds after. TheAGNTlog of the flight controller shows the demand: a steady bank of 33 degrees (the 50 m circle) and then the loiterAGNTlog shows the executor asking for a bank of 45 to 50 and the plane at 70 to 79AGENT_SEP4 m and a buffer of 3 m, at nearly the same height: the drones' heights are 0.35 to 0.7 m apart). The escape (a bank of 45 to 50 degrees, level or climbing) takes the drone out of the circle, then to the clearing's edge. Of the 11 crashes with another drone within 12 m in the last 10 s, 10 had an enemyNot in the table: the order changes. The orders flip between towers (
Take(3),Take(2),Take(3)in 2 s in one dump), who orders is not this change's concern.What changed
towers_ground::plan_ttl: a plan is good for the rest of the game, not for 3 s. Test:a_plan_is_good_for_the_rest_of_the_game_so_a_drone_in_a_shadow_keeps_its_orbit.towers_ground::standing_for: the standing plan of a drone that takes a tower, or flies a low circle, is a climb on the same circle (over the trees), not home. The executor's standing plan was not what took over in the dumps (the plan id inAG_PLANdid not change at the end of the plan,AG_FALLread 1: not found out), so this is defensive. Test:a_drone_that_circles_low_climbs_where_it_circles_when_the_plans_stop_and_does_not_fly_home_low.flight::orbit_radius: Blue circles a tower 40 m out, Red 50 m (the rings are 10 m apart, the separation zone is 7 m), and the circle's offset for a lane approach is the least of 15 m and what is left inside 55 m (flight::tangent). Test:the_two_teams_circle_a_tower_on_rings_that_keep_them_out_of_each_others_separation_zone. This changes the game's numbers: Red's orbit is 50 m, not 40 m, still inside the tower's circle of 60 m with 5 m to spare (rules text:plans/towers.md,domains/recreation/README.md,expectations/09-towers/arduplane/01-arduplane.expectsay so now).flight::leg: a drone below 30 m in the clearing of the tower it takes stays down when it strays more than 60 m from the tower (it used to be sent to its high height, a climb in a hard turn among the trees). Test:a_low_drone_that_strays_from_its_circle_in_the_clearing_stays_down_and_does_not_climb_out(fails without the change).towers_ground::bank_limit: the heavy drone is toldROLL_LIMIT_DEG 45(PARAM_SET, like the floor). Test:the_heavy_drone_is_held_to_a_bank_it_does_not_stall_in_and_still_fits_its_ring. It did not stop the heavy drone's crashes (see below).World::radio: a crashed drone is put back with a full pack. Test:a_crashed_drone_is_back_at_its_base_with_a_full_battery. Right in itself; not shown to be the cause of the respawn dives.The executor's safety envelope, the plan ABI and
ardupilot/are not touched. The arena (cognition_towers --example denial) gives the same numbers before and after (the diff of the two outputs is empty).Before and after
The machine's load changes the crash count a lot (the same old code gave 2.75 a game in one batch and 0.75 in another), so the comparison is old code and new code interleaved game by game, 8 pairs a run:
With the final code (A/B 2 and 3): 9 crashes in 16 games, 0.56 a game, 8 games in 16 without one; the old code in the same 16 pairs: 16 crashes, 1.0 a game, 6 in 16 without one. That is a lower count but not a significant one (16 against 9 crashes); the change that shows is in the causes: of the old code's 16, 9 were drones out of contact; of the final code's 9, none.
By cause, final code (16 games): 8 of the 9 are the heavy drone (7 in flight, 1 at the base after a respawn), 1 is a standard drone (leaving a lane, with another drone 28 m off and the envelope intervening). Batches in between, not interleaved and so only a guide (14 games each unless said): rings and the clearing's stay-down 24 crashes; plus the heavy bank 14 in 8 games; plus a plan good for 45 s 21; plus the standing plan of a low circle 16.
The server's acceptance test (
cargo test --release -p recreation_towers_server --test acceptance), 4 runs of 2 games each: passed 2 (both games with no crash), failed 1 on the crash expectation (1 crash in each game), failed 1 with 0 crashes in both games (another expectation; not looked into, likely the known "Blue took at least 1 tower" one). So "No drone crashes" held in 3 of 4 runs; it is not a gate that passes reliably yet.What is left, plainly
mod safety) and in the roll loop thatardupilot/t2-cruza.parmleaves at the T1-S's gains. Neither is this change's to touch; the evidence is in the track dumps (track, the 'near' and 'env' columns) and theAGNT/ATTrecords.AG_FALLread 1, once the plan had run out. A drone out of contact now keeps circling its tower until the game ends or contact returns.🤖 Generated with Claude Code