Repository navigation
Conversation
Store the final limited velocity so subsequent acceleration limits start from the actual speed. Cover braking after forward/reverse saturation for Bicycle, Unicycle and differential-drive models. Co-Authored-By: Codex (GPT-6 Astra Pro) <noreply@openai.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This branch has not been deployed
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.
Summary
When a controller repeatedly asks for more than the speed limit,
limits_varemembers the velocity before speed clipping. The next acceleration limit therefore starts from a velocity that the vehicle never applied. After 30 derivative evaluations requesting 10 m/s with a 1 m/s speed limit and 1 m/s² acceleration limit at dt=0.1 s, a zero-speed command still returns 1 m/s for the following five evaluations instead of braking through 0.9, 0.8, 0.7, 0.6 and 0.5 m/s.Record the velocity after both limits have been applied. This changes the numerical response of
derivandu_limitedafter saturation for Bicycle, Unicycle and DiffSteer; it allows braking immediately at the configured acceleration limit. The ordinarysteppath applies the limiter twice and can mask this problem. Regressions exercise both direct derivative integration and limited controls, forward/reverse travel, and independently saturated differential-drive wheels.Contribution owner: @Afloat16. Codex (GPT-6 Astra Pro) assisted with the implementation and regression tests.
Related issue
Newly reproduced problem. Checked the existing acceleration PRs/issues and @Afloat16's contribution history. #937 fixes integer-control truncation, a separate cause; these tests also use current main with that fix already present.
Validation
Linux, Python 3.12.14, NumPy 2.5.5, SciPy 1.18.1, Matplotlib 3.11.2; imported the checkout with
PYTHONPATH=src:rtb-dataandMPLBACKEND=Agg.5aef407ae89cea7dd7edf378dee0757e697cd3bb: 9 failed.python -m pytest tests/test_vehicle_estimators.py tests/test_mobile.py -q: 180 passed, 6 skipped, 30 subtests passed.git diff --check: passed.Checklist
Co-Authored-By: Codex (GPT-6 Astra Pro) noreply@openai.com