Use the ICRA 2019 Controller from marinholab-sas-core - #17
Merged
Merged
Conversation
The task-space controller moved out of this package into marinholab.sas.core.papers.icra2019 (shipped in marinholab-sas-core >= 26.9.8, see MarinhoLab/sas_py#7). This switches the package to use it. - Delete icra2019_controller.py; import the renamed Controller from marinholab.sas.core.papers.icra2019 in __init__.py, example_load_from_file.py, needle_controller.py, and the saul/ scripts. - Keep ICRA19TaskSpaceController as a backward-compatible alias for Controller at the package root (mirrors the existing M3_SerialManipulatorSimulatorFriendly alias), so existing imports keep working. - NeedleController now subclasses the moved Controller. Because the parent normalizes verbose with an rcm-only category set while the needle VFI helpers use the full 5-category set, NeedleController re-normalizes the complete set locally, hands the parent the rcm flag, and re-sets self.verbose to the full dict after super().__init__ (the parent's normalize_verbose would otherwise overwrite it with rcm-only). - Pin marinholab-sas-core>=26.9.8 to guarantee the papers subpackage. - Extend tests/conftest.py to mock marinholab.sas.core.papers.icra2019 (Controller = MagicMock class) so the package imports on a bare checkout; gate the two tests that now exercise the real controller on core_available. - Update docs (AGENTS.md, README.md) to reflect the new location. Verified: the moved Controller imports and runs a full control step through the real qpoases Solver; NeedleController subclassing + 5-category verbose plumbing work; py_compile clean. The repo test suite shows no new failures relative to main (remaining failures are pre-existing). Co-authored-by: openhands <openhands@all-hands.dev>
mmmarinho
pushed a commit
that referenced
this pull request
Sep 25, 2026
After the ICRA 2019 controller moved to marinholab-sas-core (PR #17), the QP solver used by the controllers is marinholab.solvers.qpoases.Solver, and nothing in this repo imports dqrobotics.solvers anymore. That made stubs/dqrobotics/solvers/__init__.pyi (DQ_QuadraticProgrammingSolver) orphaned, violating the documented invariant that stubs declare only the symbols this project actually imports. - Delete stubs/dqrobotics/solvers/__init__.pyi. - Remove the corresponding line from the stubs tree listing in AGENTS.md. pyright reports the same (pre-existing, environment-only) missing-import warnings as before the change; no new diagnostics. Co-authored-by: openhands <openhands@all-hands.dev>
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.
The ICRA 2019 task-space controller moved out of this package into
marinholab.sas.core.papers.icra2019(shipped inmarinholab-sas-core>= 26.9.8, added in MarinhoLab/sas_py#7, merged). This switches the package to use it.Changes
marinholab/working/needlemanipulation/icra2019_controller.pyand imported the renamedControllerfrommarinholab.sas.core.papers.icra2019in__init__.py,example_load_from_file.py,needle_controller.py, and thesaul/scripts.ICRA19TaskSpaceControlleris kept at the package root as an alias forController(mirroring the existingM3_SerialManipulatorSimulatorFriendlyalias), so existingfrom marinholab.working.needlemanipulation import ICRA19TaskSpaceControllerimports keep working.NeedleControllernow subclasses the movedController. The parent normalizesverbosewith an RCM-only category set, but the needle VFI helpers use the full 5-category set (radius/plane/orientation/insertion/rcm).NeedleControllertherefore re-normalizes the complete set locally, hands the parent only thercmflag it understands, and re-setsself.verboseto the full dict aftersuper().__init__(the parent'snormalize_verbosewould otherwise overwrite it with its RCM-only dict, which wouldKeyErroronneedle_w'sverbose["radius"]etc.).marinholab-sas-core>=26.9.8to guarantee thepaperssubpackage is present.tests/conftest.pyto mockmarinholab.sas.core.papers.icra2019(Controller = MagicMockclass) so the package still imports on a bare checkout (no compiled core); gated the two tests that now exercise the real controller oncore_available(matching the existing pattern).AGENTS.mdandREADME.mdto reflect the new location.Verification
Controllerimports and runs a full control step (no-RCM and with-RCM) through the real qpoasesSolver, with the[rcm]debug line firing correctly.NeedleControllersubclassing and the 5-categoryverboseplumbing verified (bothverbose=Trueand a multi-category dict produce the correct full dict, and the radius/rcm debug output renders).py_compile; CRLF line endings in thesaul/scripts preserved.main(the remaining 4 failures — 3× aneedle_jacobiansignature mismatch and 1× a mock-robot shape — are pre-existing on pristinemain; one test that errored onmainnow skips cleanly via thecore_availablegate).This PR was created by an AI agent (OpenHands) on behalf of the user.