[RQT_JTC] add unit tests for parse_joint_limits#2281
Merged
christophfroehlich merged 3 commits intoros-controls:masterfrom Apr 12, 2026
Merged
[RQT_JTC] add unit tests for parse_joint_limits#2281christophfroehlich merged 3 commits intoros-controls:masterfrom
christophfroehlich merged 3 commits intoros-controls:masterfrom
Conversation
8 tasks
8 tasks
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2281 +/- ##
==========================================
+ Coverage 84.72% 85.19% +0.46%
==========================================
Files 153 154 +1
Lines 15362 15457 +95
Branches 1332 1334 +2
==========================================
+ Hits 13016 13169 +153
+ Misses 1858 1797 -61
- Partials 488 491 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
christophfroehlich
requested changes
Apr 11, 2026
Member
christophfroehlich
left a comment
There was a problem hiding this comment.
This looks very good, I only have some questions..
Contributor
Author
|
Hello @christophfroehlich, I’ve responded to the suggested changes. PTAL and let me know if anything else is needed. |
Contributor
Author
|
Hey @christophfroehlich, i have addressed the suggested changes, PTAL. |
christophfroehlich
approved these changes
Apr 12, 2026
Member
christophfroehlich
left a comment
There was a problem hiding this comment.
Thank you, now it looks perfect!
mergify bot
pushed a commit
that referenced
this pull request
Apr 12, 2026
(cherry picked from commit 4ccff70)
mergify bot
pushed a commit
that referenced
this pull request
Apr 12, 2026
(cherry picked from commit 4ccff70)
mergify bot
pushed a commit
that referenced
this pull request
Apr 12, 2026
(cherry picked from commit 4ccff70)
christophfroehlich
pushed a commit
that referenced
this pull request
Apr 12, 2026
christophfroehlich
pushed a commit
that referenced
this pull request
Apr 12, 2026
christophfroehlich
pushed a commit
that referenced
this pull request
Apr 13, 2026
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.
Closes #2253
What this PR does
get_joint_limits()read from a globaldescriptionvariable set only by a ROS topic subscription — impossible to unit test without a live node.This PR extracts all parsing logic into a new pure function
parse_joint_limits(urdf_string, ...)that takes the URDF directly as a string with no ROS dependency.get_joint_limits()becomes a thin wrapper that reads the global and delegates to it. The minidom parsing logic itself is unchanged.Files changed
joint_limits_urdf.pyparse_joint_limits()fromget_joint_limits()test/test_joint_limits_urdf.pytest/__init__.pypackage.xmlpython3-pytesttest dependencyTests (23 total, all passing)
safety_controllersoft limits — narrowed when flag isTrue, ignored whenFalsefree_joints<limit>for a required joint → raises with clear messagelower/upperon revolute → raises (minidom returns"", our code raises)velocity→ raises (same reason — our logic, not minidom's)