Skip to content

rqt_jtc: Check for interface type when adding joint names#2231

Merged
christophfroehlich merged 2 commits into
ros-controls:masterfrom
urfeex:rqt_jtc_only_use_joints
Mar 26, 2026
Merged

rqt_jtc: Check for interface type when adding joint names#2231
christophfroehlich merged 2 commits into
ros-controls:masterfrom
urfeex:rqt_jtc_only_use_joints

Conversation

@urfeex

@urfeex urfeex commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

The JTC RQT gui extracts joint names from the required state interfaces of a controller matching the JTC name pattern. If that controller doesn't contain limits for all joints, that controller will be ignored. Therefore, of the controller has setup a speed scaling state interface, that will show up in the list of joints, while there are no limits configured.

Thus, the GUI cannot be used if the controller is setup with a speed scaling state interface.

This commit only adds state interfaces which are of type "position" or "velocity" to the list of joints.

The JTC RQT gui extracts joint names from the required state interfaces
of a controller matching the JTC name pattern. If that controller
doesn't contain limits for all joints, that controller will be ignored.
Therefore, of the controller has setup a speed scaling state interface,
that will show up in the list of joints, while there are no limits
configured.

This commit only adds state interfaces which are of type "position" or
"velocity" to the list of joints.
@codecov

codecov Bot commented Mar 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.78%. Comparing base (a014322) to head (c220713).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
...ajectory_controller/joint_trajectory_controller.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2231      +/-   ##
==========================================
- Coverage   84.80%   84.78%   -0.02%     
==========================================
  Files         153      152       -1     
  Lines       15244    15212      -32     
  Branches     1321     1322       +1     
==========================================
- Hits        12927    12897      -30     
+ Misses       1835     1833       -2     
  Partials      482      482              
Flag Coverage Δ
unittests 84.78% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ajectory_controller/joint_trajectory_controller.py 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christophfroehlich

Copy link
Copy Markdown
Member

Have you seen #1131, is this related?

@urfeex

urfeex commented Mar 25, 2026

Copy link
Copy Markdown
Contributor Author

Have you seen #1131, is this related?

Yes, and yes, but no. The problem described there, is similar, as in the past, basically all joints in the URDF were checked. That was fixed in #1146 as a breakout of #1131 as far as I can see. Since then, only joints in the controller's required_state_interfaces (which is effectively what _jtc_joint_names(jtc_info) returns) are checked.

The issue described here is that the speed scaling interface is a required state interface of the controller if reading speed scaling is enabled.

Another approach would be to use the required command interfaces, instead, but that would still leave the problem if one configured setting speed scaling from the controller.

@christophfroehlich christophfroehlich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarification, the change makes sense. As we discussed in the PMC meeting, position should be sufficient

…r/joint_trajectory_controller.py

Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
@christophfroehlich christophfroehlich added backport-jazzy Triggers PR backport to ROS 2 jazzy. backport-kilted Triggers PR backport to ROS 2 kilted. labels Mar 26, 2026
@christophfroehlich christophfroehlich merged commit 3e66d39 into ros-controls:master Mar 26, 2026
18 checks passed
@github-project-automation github-project-automation Bot moved this from WIP to Done in Review triage Mar 26, 2026
mergify Bot pushed a commit that referenced this pull request Mar 26, 2026
mergify Bot pushed a commit that referenced this pull request Mar 26, 2026
@urfeex urfeex deleted the rqt_jtc_only_use_joints branch March 30, 2026 08:03
greencookie-afk pushed a commit to greencookie-afk/ros2_controllers that referenced this pull request Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-jazzy Triggers PR backport to ROS 2 jazzy. backport-kilted Triggers PR backport to ROS 2 kilted.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants