Repository navigation
Chained straights run on; the first action starts the route; a route runs from its start (4.18.0) - #521
Merged
Conversation
…runs from its start (4.18.0)
Three fixes from users of the route planner.
A straight clicked roughly ahead lands exactly on the heading the
robot arrives with (within 7.5°, route::snap_heading; shift keeps any
angle via SimulateTab.free), in the rubber band and when placed. Two
straights that were only roughly collinear got a one-degree
robot.turn inserted between them, and that turn stopped the robot, so
a "continuous" straight looked as if it still stopped. The engine
itself chains fine: a carrying move ends at cruise and the next
straight or curve starts from the current speed.
The first action placed on an empty route starts it: the chassis goes
to where that action begins, facing its way, so the program no longer
opens with a drive from the map's spawn to the route ("the program of
going there"). Dragging the chassis afterwards still sets another
start, with the drive there inserted as before.
Run route puts the chassis at the route's start before running: the
server runs a script from wherever the robot stands, so a second run
used to set off from where the first ended.
Tests: the heading snap (ahead, a real angle, any heading, behind, on
the spot) and a program of two snapped straights with no turn; the
tab's chained placement (the rubber band's label, the placed end, the
program with then=Stop.NONE and no turn, a real angle kept, shift
keeping any angle), the first action placing the chassis (and not when
it begins there), the run's place before run; the harness's shift
wiring.
Docs: the route paragraph; offline-docs.zip rebuilt. Version 4.18.0.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016higr4k4yNohYeKod1f1HY
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #521 +/- ##
==========================================
+ Coverage 95.72% 96.41% +0.68%
==========================================
Files 50 81 +31
Lines 5192 23920 +18728
==========================================
+ Hits 4970 23062 +18092
- Misses 222 858 +636
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What users reported, and what was behind it
"If you enable continue on a straight it still stops." The engine chains moves correctly (a carrying move ends at cruise; the next straight or curve starts from the current speed). The planner was the problem: two straights clicked roughly in line differ by a degree or two, so the program inserted
robot.turn(2.3)between them, and a turn in place stops. Now a straight's end clicked within 7.5° of the heading the robot arrives with lands exactly on that heading, in the rubber band and when placed. Shift keeps any angle."Show the program also shows the program of going there." With the chassis at the map's spawn and the route drawn elsewhere, the program opened with
# to its start: the drive thereplus a turn and a long straight. Now the first action placed on an empty route starts it: the chassis goes to where that action begins, facing its way. Dragging the chassis afterwards still sets another start, and the drive there is inserted as before.Found while reproducing: the run server runs a script from wherever the robot stands, so a second ▶ Run route set off from where the first run ended. Run route now places the chassis at the route's start first.
Tests
route.rs: the heading snap (ahead, a real angle, any heading, behind, on the spot) and a program of two snapped straights with no turn.simulate.rs: chained placement through clicks (the rubber band's label, the placed end,then=Stop.NONEfollowed directly by the next straight, a real angle kept, shift keeping any angle), the first action placing the chassis and not when it begins at the chassis, and the run sendingplacebeforerun.app.rs: shift in the map view sets the flag.Full sim suite green locally, fmt and clippy clean. Docs updated and
offline-docs.ziprebuilt (source hash matches). Version 4.18.0.The third report, "the curve is hard to control", is not in this PR; see the session summary for what I found and the options.
🤖 Generated with Claude Code
https://claude.ai/code/session_016higr4k4yNohYeKod1f1HY