Skip to content

Replace the idx variable in trajectory processing plugins with the JointGroup API #717

Closed

Description

@AndyZe

There was a comment here on the Ruckig trajectory plugin PR which also applies to the other plugins in the moveit_core/trajectory_processing folder:

The code would be much more readable and consistent with MoveIt if you would use the joint group instead of passing num_dof and joint_idx everywhere.

Essentially, replace the usage of idx and num_dof with usage of the Joint Group API.

Activity

  1. added
    bug
    good first issue
    help wanted
    and removed
    bug
    on Oct 2, 2021
  2. changed the title [-]Replace the idx variable in TOTG plugin with the JointGroup API[/-] [+]Replace the idx variable in trajectory processing plugins with the JointGroup API[/+] on Oct 2, 2021
  3. invincialok commented on Oct 12, 2021

    @invincialok

    i am a beginer how can i solve this issue . plz guide me

  4. AndyZe commented on Oct 13, 2021

    @AndyZe
    MemberAuthor

    Thanks @invincialok. I think what @henningkayser meant is, you should go through the moveit_core/trajectory_processing folder and replace num_dof and idx arguments in function signatures like this:

      static void getNextRuckigInput(const ruckig::OutputParameter<0>& ruckig_output,
                                     const moveit::core::RobotStatePtr& next_waypoint, size_t num_dof,
                                     const std::vector<int>& idx, ruckig::InputParameter<0>& ruckig_input);
    

    With something like this:

      static void getNextRuckigInput(const ruckig::OutputParameter<0>& ruckig_output,
                                     const moveit::core::RobotStatePtr& next_waypoint,
                                     const moveit::core::JointModelGroup* joint_group,
                                     ruckig::InputParameter<0>& ruckig_input);
    

    For example, you can replace num_dof with this: joint_group->getVariableCount();

  5. AndyZe commented on Apr 12, 2022

    @AndyZe
    MemberAuthor

    Closed by #1152

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

Metadata

Metadata

Assignees

Labels

good first issuehelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions