Repository navigation
fix(blocks): JTraj ends at rest, and accepts qd0 and qdf - #890
Merged
Merged
Conversation
- the final velocity was set to qf, the final position, whatever qdf was, so with the defaults the block ended moving at the speed qf instead of at rest and followed a different trajectory from rtb.jtraj - giving qd0 or qdf raised NameError, since getvector is not imported; it is smb.getvector - the check on the size of qdf was on a variable called qd1, and its message said qd1 The test of the block in test_blocks.py is skipped, and that file is not run in CI. The new tests compare the block with jtraj and need only bdsim. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
petercorke
enabled auto-merge (squash)
October 22, 2026 23:41
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 8 |
| 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.
Merged
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #890 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 146 146
Lines 17295 17295
=====================================
Misses 17295 17295 ☔ 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
Fixes three bugs in the
JTrajblock (blocks/arm.py), found while looking at what Codacy reports.qf, the final position, whateverqdfwas. With the defaults the block ended moving at the speedqfinstead of at rest, and followed a different trajectory fromrtb.jtraj. This changes the numerical output of the block in the default case.qd0orqdfraisedNameError:getvectorwas not imported there, and a# type: ignore[name-defined]hid it. It issmb.getvector.qdfwas on a variable calledqd1, and its message saidqd1.Why it was not noticed
test_jtrajintests/test_blocks.pyis marked@unittest.skip, and CI runspytest tests/ --ignore=tests/test_blocks.py. The new tests are in their own file, need onlybdsim(they are skipped without it), and run in CI. They compare the block withrtb.jtrajat several times, check that it comes to rest at the goal, thatqd0andqdfare used (as lists too), and that a wrong size is aValueError. Nine of the ten fail on the old code.Checked
mypy clean (165 files), the 10 new tests pass. Not run: the full suite, which this change does not touch beyond
arm.py.🤖 Generated with Claude Code