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

Do not allow traj execution from PlanningComponent #1835

Merged
merged 4 commits into from
Jan 15, 2023

Conversation

AndyZe
Copy link
Member

@AndyZe AndyZe commented Dec 28, 2022

Merge with moveit/moveit2_tutorials#563

MoveItCpp and PlanningComponent have very similar execute() functions. One does not call the other. Here, I advocate for deleting the PlanningComponent version because I don't think something focused on planning should handle execution. If you like this, there are some small updates to make in moveit_tutorials but that is the only effect I foresee.

bool PlanningComponent::execute(bool blocking)

MoveItCpp::execute(const std::string& group_name, const robot_trajectory::RobotTrajectoryPtr& robot_trajectory,
                   bool blocking)

If you do NOT like this PR, then can we flip it to delete the MoveItCpp version of execute()? AFAIK it is not used anywhere

@codecov
Copy link

codecov bot commented Dec 28, 2022

Codecov Report

Base: 50.45% // Head: 50.42% // Decreases project coverage by -0.04% ⚠️

Coverage data is based on head (17e2757) compared to base (c6733bd).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1835      +/-   ##
==========================================
- Coverage   50.45%   50.42%   -0.03%     
==========================================
  Files         374      374              
  Lines       31335    31335              
==========================================
- Hits        15807    15797      -10     
- Misses      15528    15538      +10     
Impacted Files Coverage Δ
moveit_ros/moveit_servo/src/servo_calcs.cpp 65.97% <0.00%> (-1.45%) ⬇️
moveit_ros/moveit_servo/src/pose_tracking.cpp 77.11% <0.00%> (-0.46%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@henningkayser
Copy link
Member

But, one does call the other? The intention was to make it easier to forward the last plan solution for execution, similar to how MGI is doing it. I agree though, that we should keep our API clean and that removing it would improve separation of concerns.

Copy link
Contributor

@sjahr sjahr left a comment

Choose a reason for hiding this comment

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

I like this change too 👍
The API diff looks something like this, I guess:

-planning_component.plan();
+auto motion_plan_response = planning_component.plan();
-planning_component.execute();
+planning_component(group_name, motion_plan_reponse.trajectory)

I think the new version is more readable.

Wouldn't it be possible to drop the group name argument for MoveItCpp::execute(...) as well, since the robot_trajectory::RobotTrajectoryPtr in MotionPlanResponse contains a group name?

@henningkayser
Copy link
Member

Can you first deprecate this function before removing it without notice?

@AndyZe AndyZe force-pushed the andyz/no_execute_from_planning_component branch from cadaf38 to 98653cd Compare January 6, 2023 17:52
@AndyZe
Copy link
Member Author

AndyZe commented Jan 6, 2023

Wouldn't it be possible to drop the group name argument for MoveItCpp::execute(...) as well, since the robot_trajectory::RobotTrajectoryPtr in MotionPlanResponse contains a group name?

Ooh, I like that idea 👍

@AndyZe AndyZe force-pushed the andyz/no_execute_from_planning_component branch 5 times, most recently from 8cd1bde to 2069ef0 Compare January 11, 2023 15:23
@mergify
Copy link

mergify bot commented Jan 11, 2023

This pull request is in conflict. Could you fix it @AndyZe?

@AndyZe AndyZe force-pushed the andyz/no_execute_from_planning_component branch from 2069ef0 to e0870e2 Compare January 11, 2023 16:40
@AndyZe AndyZe force-pushed the andyz/no_execute_from_planning_component branch from df69c56 to 17e2757 Compare January 11, 2023 17:11
@AndyZe
Copy link
Member Author

AndyZe commented Jan 11, 2023

I'll make a moveit2_tutorials PR that should be merged simultaneously with this one. Here it is: moveit/moveit2_tutorials#563

@sjahr
Copy link
Contributor

sjahr commented Jan 14, 2023

@henningkayser @AndyZe Are we ready to merge this?

@AndyZe
Copy link
Member Author

AndyZe commented Jan 14, 2023

Yeah, it's ready as far as I know.

@AndyZe AndyZe merged commit 6711436 into moveit:main Jan 15, 2023
@AndyZe AndyZe deleted the andyz/no_execute_from_planning_component branch January 15, 2023 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants