You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 22, 2021. It is now read-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
High level feedback:
It seems like one of the fundamental goals of this PR is to populate the TaskSummary msg's task_profile field. This requires the rmf_fleet_adapter::Task object to store the TaskProfile msg for the corresponding request. But I feel approach here with creating a new rmf_task_ros2::Description object and using this to generate a rmf_task::Request and rmf_fleet_adapter::Task is overly complicating the implementation. For starters, for every new type of request/task to support, users have to implement a rmf_task::Request::Description object and the newly introduced rmf_task_ros2::Description object (which shouldn't really be defined in rmf_task_ros2 as it is meant to be a public API but that is a different matter).
My suggestion would be to first store all incoming TaskProfiles in a map inside internal_FleetUpdateHandle.hpp. Maybe
Here we are mapping Request ids to their TaskProfile msgs. This map can be populated inside FleetUpdateHandle::dispatch_request_cb()
Then you only have to make two modifications:
Add set and get methods to rmf_fleet_adapter::Task for setting and getting the TaskProfile object
Modify the signature of rmf_fleet_adapter::TaskManager::set_queue(~) to additionally accept the task_profile_map. So change to void set_queue(const std::vector<Assignment>& assignments, std::unordered_map<std::string, rmf_task_msgs::msg::TaskProfile> task_profile_map);. Inside the definition of this function, right before we add the task to the queue, we can call the set TaskProfile method and pass task_profile_map[assignment.request()->id()].
I think this is much simpler approach to achieving the end goal without all the modifications to FleetUpdateHandle, TaskManager and Task as seen in this PR.
Secondly, I assumed the refactor would shift a lot of the header files from rmf_task_ros2 to rmf_task but only the Evaluator.hpp was moved. Do you think its possible to have abstract interfaces of Dispatcher, Auctioneer and MinmalBidder into rmf_task and then only have their sample implementations (which use ROS 2) inside rmf_task_ros2? We should also move the implementations of Evaluator (LeastFleetDiffCostEvaluator, LeastFleetCostEvaluator, QuickestFinishEvaluator) which currently live inside Evaluator.hpp to rmf_task_ros2
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rmf_task_ros2rmf_task_ros2andtask_managerinrmf_fleet_adapter.