Skip to content

Fix joint trajectory controller duplicate key generation in setup assistant properly #3434

Description

@sea-bass

Description

See #3316 (comment) for more information.

The original PR (#2959) fixed key duplication in the event that the action_ns and default keys were specified in the UI, but seem to break the workflow if those text boxes are left blank. See the issue (#3314) for more info.

There needs to be some if-condition (and hopefully tests) added to properly address both cases.

ROS Distro

Rolling

OS and version

Ubuntu 24.04

Source or binary build?

Source

Expected behavior

Should work under both conditions outlined above.

Actual behavior

Works only if the values are set in the UI, but not when blank.

Activity

  1. added
    bug
    on Apr 13, 2025
  2. added
    help wanted
    good first issue
    on Apr 13, 2025
  3. zacharyyamaoka commented on Apr 13, 2025

    @zacharyyamaoka

    Thanks @sea-bass for making this issue.

    Some further testing I did on this:

    If you just press "Auto Add FollowJointTrajectory Controllers" and continue on in set up assitant, than the generated .yaml is missing an action_ns, and won't work out of the box

    Image

    moveit_controller_manager: moveit_simple_controller_manager/MoveItSimpleControllerManager
    
    moveit_simple_controller_manager:
      controller_names:
        - arm_controller
        - eef_controller
    
      arm_controller:
        type: FollowJointTrajectory
        joints:
          - right_joint_1
          - right_joint_2
          - right_joint_3
          - right_joint_4
          - right_joint_5
          - right_joint_6
      eef_controller:
        type: FollowJointTrajectory
        joints:
          - right_joint_6
    

    If you however press "arm_controller" and then the "edit selected" button, default values will auto populate:

    Image

    moveit_controller_manager: moveit_simple_controller_manager/MoveItSimpleControllerManager
    
    moveit_simple_controller_manager:
      controller_names:
        - arm_controller
        - eef_controller
    
      arm_controller:
        type: FollowJointTrajectory
        joints:
          - right_joint_1
          - right_joint_2
          - right_joint_3
          - right_joint_4
          - right_joint_5
          - right_joint_6
        action_ns: follow_joint_trajectory
        default: true
      eef_controller:
        type: FollowJointTrajectory
        joints:
          - right_joint_6
    

    You can see the arm_controller now gets an action_ns, but the eef_controller stil doesn't as I didn't select "edit selected" for the eef_controller.

    I believe that an action_ns should be added even if the user doesn't select "edit selected", to avoid frusteration with it not working out of the box

  4. sea-bass commented on Apr 13, 2025

    @sea-bass
    ContributorAuthor

    Thanks for the extra context!

    Yes, it should be a partial revert of the original PR, but the blank/default fields should only be added if the users do not fill in the respective text boxes.

  5. Eldgar commented on May 28, 2025

    @Eldgar

    I made a solution for this.

  6. vedbo commented on Mar 28, 2026

    @vedbo

    Hey @sea-bass, I saw this issue about the duplicate key generation in the Setup Assistant. I'm looking for a more technical C++ challenge to dive into for GSoC 2026 and this seems like a solid one. I'll take a look at the moveit_setup_assistant code to see how the controller configuration is being serialized. I'd love to help fix this properly! My portfolio: https://vedbo.github.io/

  7. yonteels commented on May 1, 2026

    @yonteels

    Hey, I also created a solution for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions