Repository navigation
Conversation
Use the public control_mode property and integrate velocity over seconds in PyPlot2, matching the step contract and the three-dimensional backend. Co-Authored-By: ChatGPT (GPT-6 Astra Pro) <noreply@openai.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 12 |
| Duplication | 1 |
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 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.
Problem
PyPlot2.step()raisesAttributeErrorfor a normal, writableRobot2because it reads the oldcontrol_typeattribute instead ofcontrol_mode.Correcting that name alone still leaves velocity integration 1000 times too small: the public step takes seconds, but the planar integrator divides
dtby 1000. A 0.4 rad/s joint starting at 0.2 rad reaches 0.200004 after a 0.01 s step instead of 0.204.Change
Use the robot's public control mode and integrate
qd * dt, matching the documented seconds and the existing 3D backend. Clarify the supported stepping behavior.Behavior change: ordinary planar simulations now step successfully and advance at the requested joint velocity. Position/acceleration modes retain their existing non-integrating behavior, and read-only or pinned drawings keep their existing semantics.
Validation
mypy: all 166 source files passed. New tests pass Ruff lint/format;git diff --checkpasses.Prior work
Checked all 103 fork heads and the actual patches of 14 related upstream PRs. Older fork comparisons contain no PyPlot2 implementation changes. #875 adds non-positive-dt guards, #873 adds independently posed drawings, and #788 repairs backend setup; none corrects this stepping path. The broader style issue #646 is independent.
Primary contributor: Afloat16.
Prepared with ChatGPT (GPT-6 Astra Pro) assistance.