Skip to content

Commit 859556b

Browse files
committed
rqt_jtc: Check for interface type when adding joint names
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.
1 parent 80bfe93 commit 859556b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rqt_joint_trajectory_controller/rqt_joint_trajectory_controller/joint_trajectory_controller.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,10 @@ def _jtc_joint_names(jtc_info):
465465
joint_names = []
466466
for interface in jtc_info.required_state_interfaces:
467467
name = "/".join(interface.split("/")[:-1])
468+
interface_type = interface.split("/")[-1]
468469
if name not in joint_names:
469-
joint_names.append(name)
470+
if interface_type == "position" or interface_type == "velocity":
471+
joint_names.append(name)
470472

471473
return joint_names
472474

0 commit comments

Comments
 (0)