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

Task request time and initiator in Booking #81

Merged
merged 18 commits into from
Jun 16, 2023

Conversation

aaronchongth
Copy link
Member

@aaronchongth aaronchongth commented Apr 17, 2023

New feature implementation

Implemented feature

Related to open-rmf/rmf_api_msgs#35,

  • Adds missing constructor implementation for rmf_task::Request
  • Adds new constructor for rmf_task::Task::Booking to include task request time and requester
  • Added new make(...) API for different types of requests
  • New constructors for request factories that accept a requester input, which will be propagated into each request they create
  • fixed some misc linting errors

Copy link
Member

@Yadunund Yadunund left a comment

Choose a reason for hiding this comment

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

Sorry for the overdue review. Left feedback on the API introduced to discuss further.

rmf_task/include/rmf_task/Task.hpp Outdated Show resolved Hide resolved
rmf_task/include/rmf_task/Task.hpp Outdated Show resolved Hide resolved
Copy link
Member

@Yadunund Yadunund left a comment

Choose a reason for hiding this comment

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

Thanks for iterating! This is looking good. Last set of comments from me.

rmf_task/src/rmf_task/requests/Clean.cpp Outdated Show resolved Hide resolved
rmf_task/src/rmf_task/requests/Delivery.cpp Outdated Show resolved Hide resolved
rmf_task/src/rmf_task/requests/Loop.cpp Outdated Show resolved Hide resolved
rmf_task/src/rmf_task/requests/ParkRobotFactory.cpp Outdated Show resolved Hide resolved
rmf_task/include/rmf_task/requests/ParkRobotFactory.hpp Outdated Show resolved Hide resolved
rmf_task/src/rmf_task/Request.cpp Show resolved Hide resolved
rmf_task/src/rmf_task/TaskPlanner.cpp Outdated Show resolved Hide resolved
rmf_task/src/rmf_task/internal_task_planning.cpp Outdated Show resolved Hide resolved
rmf_task/src/rmf_task/requests/ChargeBattery.cpp Outdated Show resolved Hide resolved
@aaronchongth
Copy link
Member Author

Most recent changes,

  • updated unit tests that use rmf_task::Request
  • overloaded RequestFactory::make_request to include requester and time, marked the older one as deprecated, we can remove it next time
  • overloaded TaskPlanner constructor to accept a name, otherwise it uses a default name from it's implementation
  • propagated changes to all the internal implementations creating automated requests

@aaronchongth
Copy link
Member Author

@Yadunund the changes have been made

Copy link
Member

@Yadunund Yadunund left a comment

Choose a reason for hiding this comment

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

Thanks for iterating! Apart from the feedback to move task_planner_name into TaskPlanner::Configuration the rest of the suggestions are all nits.

rmf_task/include/rmf_task/TaskPlanner.hpp Outdated Show resolved Hide resolved
rmf_task/include/rmf_task/Task.hpp Outdated Show resolved Hide resolved
rmf_task/include/rmf_task/requests/ChargeBattery.hpp Outdated Show resolved Hide resolved
rmf_task/include/rmf_task/Task.hpp Show resolved Hide resolved
rmf_task/src/rmf_task/internal_task_planning.hpp Outdated Show resolved Hide resolved
rmf_task/src/rmf_task/internal_task_planning.hpp Outdated Show resolved Hide resolved
rmf_task/src/rmf_task/requests/ChargeBattery.cpp Outdated Show resolved Hide resolved
rmf_task/src/rmf_task/requests/ChargeBattery.cpp Outdated Show resolved Hide resolved
Copy link
Member

@Yadunund Yadunund left a comment

Choose a reason for hiding this comment

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

LGTM. @mxgrey any feedback for these changes?

@aaronchongth
Copy link
Member Author

I'll be holding off of merging till I finish end-to-end testing with rmf_ros2. I'll try to resolve the missing signed commit too

… time, new booking constructor

Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
…agated changes to all constructors and make functions

Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Copy link
Contributor

@mxgrey mxgrey left a comment

Choose a reason for hiding this comment

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

LGTM

Good job keeping the API stable with these additional fields!

@aaronchongth
Copy link
Member Author

I've finished the changes required with open-rmf/rmf_ros2#267 and open-rmf/rmf_demos#180. Will be merging this

@aaronchongth aaronchongth merged commit a7875a9 into main Jun 16, 2023
@aaronchongth aaronchongth deleted the feat/book-with-time-and-user branch June 16, 2023 06:06
@Yadunund
Copy link
Member

@aaronchongth could you help backport to iron and humble?

aaronchongth added a commit that referenced this pull request Jun 16, 2023
* Fixed missing constructor implementation, commented to deprecate next time, new booking constructor

Signed-off-by: Aaron Chong <[email protected]>

* Add requester to factories, add request time and initiator to ChargeBattery and Loop

Signed-off-by: Aaron Chong <[email protected]>

* Using requester instead of initiator, added new make API to legacy Clean and Deliver

Signed-off-by: Aaron Chong <[email protected]>

* lint

Signed-off-by: Aaron Chong <[email protected]>

* Revert to original constructor with optional arguments appended, propagated changes to all constructors and make functions

Signed-off-by: Aaron Chong <[email protected]>

* Move description into booking, lint

Signed-off-by: Aaron Chong <[email protected]>

* Pass a clock functor to ParkRobotFactory

Signed-off-by: Aaron Chong <[email protected]>

* Using non-deprecated Request constructor

Signed-off-by: Aaron Chong <[email protected]>

* new make_request API to include requester and request time

Signed-off-by: Aaron Chong <[email protected]>

* Overload TaskPlanner constructor with a name argument

Signed-off-by: Aaron Chong <[email protected]>

* Retained old API and marked as deprecated

Signed-off-by: Aaron Chong <[email protected]>

* Overloading booking instead of adding default arguments

Signed-off-by: Aaron Chong <[email protected]>

* Overloading all affected functions with non optional arguments

Signed-off-by: Aaron Chong <[email protected]>

* Lint

Signed-off-by: Aaron Chong <[email protected]>

* Revert deprecation tag on Request, to be done in a separate PR

Signed-off-by: Aaron Chong <[email protected]>

* Argument name changes, linting, documentation

Signed-off-by: Aaron Chong <[email protected]>

* TaskPlanner constructor to have planner id as first argument

Signed-off-by: Aaron Chong <[email protected]>

* request factories to accept a callback that returns the current time

Signed-off-by: Aaron Chong <[email protected]>

---------

Signed-off-by: Aaron Chong <[email protected]>
(cherry picked from commit a7875a9)
Signed-off-by: Aaron Chong <[email protected]>
aaronchongth added a commit that referenced this pull request Jun 16, 2023
* Fixed missing constructor implementation, commented to deprecate next time, new booking constructor

Signed-off-by: Aaron Chong <[email protected]>

* Add requester to factories, add request time and initiator to ChargeBattery and Loop

Signed-off-by: Aaron Chong <[email protected]>

* Using requester instead of initiator, added new make API to legacy Clean and Deliver

Signed-off-by: Aaron Chong <[email protected]>

* lint

Signed-off-by: Aaron Chong <[email protected]>

* Revert to original constructor with optional arguments appended, propagated changes to all constructors and make functions

Signed-off-by: Aaron Chong <[email protected]>

* Move description into booking, lint

Signed-off-by: Aaron Chong <[email protected]>

* Pass a clock functor to ParkRobotFactory

Signed-off-by: Aaron Chong <[email protected]>

* Using non-deprecated Request constructor

Signed-off-by: Aaron Chong <[email protected]>

* new make_request API to include requester and request time

Signed-off-by: Aaron Chong <[email protected]>

* Overload TaskPlanner constructor with a name argument

Signed-off-by: Aaron Chong <[email protected]>

* Retained old API and marked as deprecated

Signed-off-by: Aaron Chong <[email protected]>

* Overloading booking instead of adding default arguments

Signed-off-by: Aaron Chong <[email protected]>

* Overloading all affected functions with non optional arguments

Signed-off-by: Aaron Chong <[email protected]>

* Lint

Signed-off-by: Aaron Chong <[email protected]>

* Revert deprecation tag on Request, to be done in a separate PR

Signed-off-by: Aaron Chong <[email protected]>

* Argument name changes, linting, documentation

Signed-off-by: Aaron Chong <[email protected]>

* TaskPlanner constructor to have planner id as first argument

Signed-off-by: Aaron Chong <[email protected]>

* request factories to accept a callback that returns the current time

Signed-off-by: Aaron Chong <[email protected]>

---------

Signed-off-by: Aaron Chong <[email protected]>
(cherry picked from commit a7875a9)
Signed-off-by: Aaron Chong <[email protected]>
Yadunund pushed a commit that referenced this pull request Jun 19, 2023
* Task request time and initiator in Booking (#81)

* Fixed missing constructor implementation, commented to deprecate next time, new booking constructor

Signed-off-by: Aaron Chong <[email protected]>

* Add requester to factories, add request time and initiator to ChargeBattery and Loop

Signed-off-by: Aaron Chong <[email protected]>

* Using requester instead of initiator, added new make API to legacy Clean and Deliver

Signed-off-by: Aaron Chong <[email protected]>

* lint

Signed-off-by: Aaron Chong <[email protected]>

* Revert to original constructor with optional arguments appended, propagated changes to all constructors and make functions

Signed-off-by: Aaron Chong <[email protected]>

* Move description into booking, lint

Signed-off-by: Aaron Chong <[email protected]>

* Pass a clock functor to ParkRobotFactory

Signed-off-by: Aaron Chong <[email protected]>

* Using non-deprecated Request constructor

Signed-off-by: Aaron Chong <[email protected]>

* new make_request API to include requester and request time

Signed-off-by: Aaron Chong <[email protected]>

* Overload TaskPlanner constructor with a name argument

Signed-off-by: Aaron Chong <[email protected]>

* Retained old API and marked as deprecated

Signed-off-by: Aaron Chong <[email protected]>

* Overloading booking instead of adding default arguments

Signed-off-by: Aaron Chong <[email protected]>

* Overloading all affected functions with non optional arguments

Signed-off-by: Aaron Chong <[email protected]>

* Lint

Signed-off-by: Aaron Chong <[email protected]>

* Revert deprecation tag on Request, to be done in a separate PR

Signed-off-by: Aaron Chong <[email protected]>

* Argument name changes, linting, documentation

Signed-off-by: Aaron Chong <[email protected]>

* TaskPlanner constructor to have planner id as first argument

Signed-off-by: Aaron Chong <[email protected]>

* request factories to accept a callback that returns the current time

Signed-off-by: Aaron Chong <[email protected]>

---------

Signed-off-by: Aaron Chong <[email protected]>
(cherry picked from commit a7875a9)
Signed-off-by: Aaron Chong <[email protected]>

* Add rmf_task_sequence to workflows, lint (#91)

Signed-off-by: Aaron Chong <[email protected]>
(cherry picked from commit 40f3e92)
Signed-off-by: Aaron Chong <[email protected]>

* Only running iron jammy workflows

Signed-off-by: Aaron Chong <[email protected]>

---------

Signed-off-by: Aaron Chong <[email protected]>
Yadunund pushed a commit that referenced this pull request Jun 19, 2023
* Task request time and initiator in Booking (#81)

* Fixed missing constructor implementation, commented to deprecate next time, new booking constructor

Signed-off-by: Aaron Chong <[email protected]>

* Add requester to factories, add request time and initiator to ChargeBattery and Loop

Signed-off-by: Aaron Chong <[email protected]>

* Using requester instead of initiator, added new make API to legacy Clean and Deliver

Signed-off-by: Aaron Chong <[email protected]>

* lint

Signed-off-by: Aaron Chong <[email protected]>

* Revert to original constructor with optional arguments appended, propagated changes to all constructors and make functions

Signed-off-by: Aaron Chong <[email protected]>

* Move description into booking, lint

Signed-off-by: Aaron Chong <[email protected]>

* Pass a clock functor to ParkRobotFactory

Signed-off-by: Aaron Chong <[email protected]>

* Using non-deprecated Request constructor

Signed-off-by: Aaron Chong <[email protected]>

* new make_request API to include requester and request time

Signed-off-by: Aaron Chong <[email protected]>

* Overload TaskPlanner constructor with a name argument

Signed-off-by: Aaron Chong <[email protected]>

* Retained old API and marked as deprecated

Signed-off-by: Aaron Chong <[email protected]>

* Overloading booking instead of adding default arguments

Signed-off-by: Aaron Chong <[email protected]>

* Overloading all affected functions with non optional arguments

Signed-off-by: Aaron Chong <[email protected]>

* Lint

Signed-off-by: Aaron Chong <[email protected]>

* Revert deprecation tag on Request, to be done in a separate PR

Signed-off-by: Aaron Chong <[email protected]>

* Argument name changes, linting, documentation

Signed-off-by: Aaron Chong <[email protected]>

* TaskPlanner constructor to have planner id as first argument

Signed-off-by: Aaron Chong <[email protected]>

* request factories to accept a callback that returns the current time

Signed-off-by: Aaron Chong <[email protected]>

---------

Signed-off-by: Aaron Chong <[email protected]>
(cherry picked from commit a7875a9)
Signed-off-by: Aaron Chong <[email protected]>

* Add rmf_task_sequence to workflows, lint (#91)

Signed-off-by: Aaron Chong <[email protected]>
(cherry picked from commit 40f3e92)
Signed-off-by: Aaron Chong <[email protected]>

* Running only humble jammy workflows

Signed-off-by: Aaron Chong <[email protected]>

---------

Signed-off-by: Aaron Chong <[email protected]>
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.

3 participants