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

Hybrid planning architecture #311

Merged

Conversation

sjahr
Copy link
Contributor

@sjahr sjahr commented Nov 19, 2020

Description

Implementation of hybrid planning architecture described in #300

For testing, this custom version of the moveit_msgs package is necessary in order to get the new action definitions.

After building, run

ros2 launch moveit_hybrid_planning hybrid_planning.launch.py

to start the hybrid planning component container and send test hybrid planning request.

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

@sjahr sjahr changed the base branch from main to feature/hybrid_planning December 10, 2020 13:21
@sjahr sjahr force-pushed the pr-hybrid_planning_dev branch 2 times, most recently from bc378d8 to 5f7f099 Compare December 11, 2020 08:36
@sjahr
Copy link
Contributor Author

sjahr commented Dec 11, 2020

@henningkayser I've fixed clang_format and ament_tidy errors, but CI currently fails because I've used new action interface definitions. What do you think is the best way to handle this?

@felixvd
Copy link
Contributor

felixvd commented Dec 14, 2020

Generally we merge the moveit_msgs PR first and then confirm that CI succeeds.

}

// Load planning pipelines
for (const auto& planning_pipeline_name : config_.pipeline_names)
Copy link
Member

Choose a reason for hiding this comment

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

Looking at this, we might want to just use MoveItCpp in the future in order to reduce redundancy. Of course, we would only load planning pipelines and PSM, nothing else.

last_global_solution_ = planning_solution; // TODO Add Service to expose this
};

moveit_msgs::msg::MotionPlanResponse GlobalPlannerComponent::plan(moveit_msgs::msg::MotionPlanRequest planning_problem)
Copy link
Member

Choose a reason for hiding this comment

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

As already discussed, we should consider moving the actual implementation into its own class.

// Clone current planning scene
planning_scene_monitor_->updateFrameTransforms();
planning_scene_monitor_->lockSceneRead(); // LOCK planning scene
::planning_scene::PlanningScenePtr planning_scene =
Copy link
Member

Choose a reason for hiding this comment

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

Cloning planning scenes is really costly. Since we are maintaining our own planning scene here, we could simply lock the scene and pass it directly to the planning pipeline.

// TODO Use lifecycle node?
enum class LocalPlannerState : int8_t
{
ABORT = -1,
Copy link
Member

Choose a reason for hiding this comment

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

Do we have a concise documentation for the states and command flags you're introducing? To me it seems like the logic should be moved to different headers and source files so that we can refactor it more easily in the future.

@codecov
Copy link

codecov bot commented Dec 20, 2020

Codecov Report

Merging #311 (d96e1e5) into feature/hybrid_planning (0bd801f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@                   Coverage Diff                    @@
##           feature/hybrid_planning     #311   +/-   ##
========================================================
  Coverage                    48.00%   48.00%           
========================================================
  Files                          157      157           
  Lines                        14843    14843           
========================================================
  Hits                          7124     7124           
  Misses                        7719     7719           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0bd801f...d96e1e5. Read the comment docs.

@sjahr sjahr changed the title WIP: Hybrid planning architecture Hybrid planning architecture Jan 6, 2021
Copy link
Member

@henningkayser henningkayser left a comment

Choose a reason for hiding this comment

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

lgtm

@henningkayser henningkayser merged commit 910cd87 into moveit:feature/hybrid_planning Jan 6, 2021
henningkayser pushed a commit to henningkayser/moveit2 that referenced this pull request Jan 29, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
henningkayser pushed a commit to henningkayser/moveit2 that referenced this pull request Jan 29, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
sjahr added a commit to sjahr/moveit2 that referenced this pull request Apr 16, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
sjahr added a commit to sjahr/moveit2 that referenced this pull request May 4, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
sjahr added a commit to sjahr/moveit2 that referenced this pull request May 4, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
sjahr added a commit to sjahr/moveit2 that referenced this pull request May 9, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
henningkayser pushed a commit that referenced this pull request May 18, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
henningkayser pushed a commit that referenced this pull request May 18, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
@sjahr sjahr deleted the pr-hybrid_planning_dev branch May 20, 2021 09:06
@sjahr sjahr restored the pr-hybrid_planning_dev branch May 20, 2021 09:08
sjahr added a commit to sjahr/moveit2 that referenced this pull request Jun 7, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
sjahr added a commit to sjahr/moveit2 that referenced this pull request Jun 7, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
henningkayser pushed a commit to henningkayser/moveit2 that referenced this pull request Jul 6, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
sjahr added a commit to sjahr/moveit2 that referenced this pull request Aug 21, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
sjahr added a commit to sjahr/moveit2 that referenced this pull request Sep 28, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
sjahr added a commit to sjahr/moveit2 that referenced this pull request Oct 19, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
sjahr added a commit to sjahr/moveit2 that referenced this pull request Oct 28, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
sjahr added a commit to sjahr/moveit2 that referenced this pull request Nov 18, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
AndyZe pushed a commit to AndyZe/moveit2 that referenced this pull request Nov 24, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
AndyZe pushed a commit to AndyZe/moveit2 that referenced this pull request Nov 29, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
AndyZe pushed a commit to AndyZe/moveit2 that referenced this pull request Nov 30, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
AndyZe pushed a commit to AndyZe/moveit2 that referenced this pull request Dec 3, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
AndyZe pushed a commit to AndyZe/moveit2 that referenced this pull request Dec 7, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
AndyZe pushed a commit to AndyZe/moveit2 that referenced this pull request Dec 7, 2021
* Add hybrid_planning architecture skeleton code
* Add simple state machines to hybrid planning manager and local planner
* Initial global planner prototype implementation
* Forward joint_trajectory with local planner
* Forward hybrid planning motion request to global planner
* Abstract planner logic from hybrid planning manager by using a plugin
* Implement single plan execution logic
* Add test launch files, RViz and demo config
* Add test for motion_planning_request
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