Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
AndyZe opened this issue Oct 2, 2021 · 3 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@AndyZe
Copy link
Member

AndyZe commented Oct 2, 2021

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.

@AndyZe AndyZe added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed and removed bug Something isn't working labels Oct 2, 2021
@AndyZe AndyZe 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 Oct 2, 2021
@invincialok
Copy link

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

@AndyZe
Copy link
Member Author

AndyZe commented Oct 13, 2021

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();

INVINCIalokk referenced this issue Nov 25, 2021
* Implement a check for identical waypoints

* Add duration extension. It allows much faster motion

* Reset Ruckig before duration extension

* Readability and style updates

* Parameterize max attempts by fraction rather than num. attempts

* Fix type error. Do not copy trajectory

* Boolean simplification

* Style cleanup

* Make an issue for Ruckig pass_to_input() replacement

* Use make_unique rather than .reset()

* Start a unit test

* Two compiling tests

* Three passing tests  :)

* Rucking "Finished" state is acceptable, too
@AndyZe
Copy link
Member Author

AndyZe commented Apr 12, 2022

Closed by #1152

@AndyZe AndyZe closed this as completed Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants