fix(models): make KinovaGen3 load via robot_descriptions, add XACRO_ARGS support#546
Merged
Conversation
…RGS support
KinovaGen3.py pointed at "kortex_description/robots/gen3.xacro" in the
bundled rtb-data tree, which doesn't exist there (no kortex_description
folder at all) — always raised FileNotFoundError.
robot_descriptions does have a working gen3_description entry, but its
xacro file requires a substitution argument (XACRO_ARGS = {"dof": "7"})
to select the 6dof/7dof arm variant; without it xacro fails on an
unresolved property reference. _load_urdf_from_RD only ever read
URDF_PATH/XACRO_PATH and silently ignored XACRO_ARGS — a gap that likely
affects other RD models exposing the same attribute (several UR/xArm/FR3
variants), even though this is the first one this toolbox actually hits.
Thread XACRO_ARGS through as XacroDoc's subargs, and switch KinovaGen3 to
the bare "gen3" RD lookup instead of the missing bundled path.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Jul 5, 2026
…ro-args # Conflicts: # src/roboticstoolbox/models/URDF/URDFRobot.py
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #546 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 137 137
Lines 13690 13449 -241
======================================
+ Misses 13690 13449 -241 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
petercorke
added a commit
that referenced
this pull request
Jul 5, 2026
Valkyrie, Fetch, and KinovaGen3 are now fixed on main; FetchCamera is removed entirely (so its entry would be a harmless no-op, but delete it for hygiene). Only LBR remains genuinely broken.
petercorke
added a commit
that referenced
this pull request
Jul 5, 2026
…547) * test(models): add smoke test that every DH/URDF/ETS model constructs Existing tests are hand-written per model, so a model exported in __all__ can go completely untested -- Valkyrie, Fetch, KinovaGen3, FetchCamera, and LBR all had zero coverage this way, three of them silently broken with nothing to catch it (see tech-debt.md). Iterates each category's own __all__ directly (rather than scanning module __dict__/inspect.getmembers, which would also pick up re-exported base classes like Robot/URDFRobot) and asserts every listed class constructs with no arguments. Known-currently-broken models are tracked in an explicit EXPECTED_FAILURES set, which fails loudly in *both* directions: a newly-broken model fails the test, and a since-fixed "expected failure" that starts passing also fails the test, forcing its entry to be cleaned up rather than silently going stale. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * test(models): trim EXPECTED_FAILURES now that #543/#545/#546 are merged Valkyrie, Fetch, and KinovaGen3 are now fixed on main; FetchCamera is removed entirely (so its entry would be a harmless no-op, but delete it for hygiene). Only LBR remains genuinely broken. --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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
KinovaGen3()always raisedFileNotFoundError: it pointed at"kortex_description/robots/gen3.xacro"in the bundledrtb-dataxacro tree, which has nokortex_descriptionfolder at all.robot_descriptionsdoes have a workinggen3_descriptionentry (reporos2_kortex), but its xacro file needs a substitution argument to select the 6dof/7dof arm variant — it exposesXACRO_ARGS = {"dof": "7"}alongsideXACRO_PATH._load_urdf_from_RD()only ever readURDF_PATH/XACRO_PATHand silently droppedXACRO_ARGS, so even switching to RD naively would still fail on an unresolved xacro property.XACRO_ARGStoo (several UR/xArm/FR3/Rizon variants), though gen3 is the first one this toolbox actually hits.XACRO_ARGSthrough asXacroDoc'ssubargs, and switchKinovaGen3.pyto the bare"gen3"RD lookup instead of the missing bundled path.Test plan
rtb.models.URDF.KinovaGen3()constructs and prints correctly (7-DOF arm, matches docstring'sqr/qzexactly)subargs=Nonepassthrough🤖 Generated with Claude Code