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

Revised Planner Profile Interfaces #156

Closed

Conversation

marip8
Copy link
Contributor

@marip8 marip8 commented Jan 7, 2022

This PR provides new interfaces for motion planner waypoint, composite, and planner level profiles. Each profile produces a type-erased, planner-specific data object from a relevant input (an instruction for the waypoint profile, a composite instruction for the composite profile). The individual planners can look up profiles in the profile dictionary by a combination of namespace and name, and can cast them to the required type. Since the objects returned by the profiles are std::any type-erasers, any issues with incorrect casts will result in an exception that can be handled.

The addition of new planner profile interfaces supports an on-going larger refactor and simplification of the various motion planners class (started in #138). Additionally, the new profiles will be easier to store and retrieve in the profile dictionary since they will no longer be stored by class typeid.

This PR adds three new maps in the profile dictionary to hold these waypoints. Currently these maps are public members of the profile dictionary for convenience and to minimize API breakage. As motion planners are refactored to use these profile interfaces, the planners will retrieve profiles from these maps. Ultimately, the map storing profiles by typeid will be removed, the three maps holding the new profiles will be made private, and the existing profile dictionary API will be revised to access the new profile maps.

…omposite, and planner profiles in profile dictionary
@marip8 marip8 requested a review from Levi-Armstrong January 7, 2022 20:29
@codecov
Copy link

codecov bot commented Jan 7, 2022

Codecov Report

Merging #156 (467d5ea) into master (31afa29) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #156   +/-   ##
=======================================
  Coverage   66.29%   66.29%           
=======================================
  Files         199      199           
  Lines        9407     9407           
=======================================
  Hits         6236     6236           
  Misses       3171     3171           
Impacted Files Coverage Δ
...de/tesseract_command_language/profile_dictionary.h 98.14% <ø> (ø)

@marip8 marip8 mentioned this pull request Jan 8, 2022
12 tasks
@Levi-Armstrong
Copy link
Contributor

This does not break existing functionality correct? If it does not, then I am good with merging as is for now and updating after motion planning has been fully refactored as you suggested.

@marip8
Copy link
Contributor Author

marip8 commented Jan 8, 2022

This does not break existing functionality correct? If it does not, then I am good with merging as is for now and updating after motion planning has been fully refactored as you suggested.

Correct. It only adds additional code to the profile dictionary that will be used in the future when the planners are refactored.

@marip8
Copy link
Contributor Author

marip8 commented Jan 12, 2023

Closing; superceded by #267

@marip8 marip8 closed this Jan 12, 2023
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.

2 participants