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 redesign v2 pybind apis and fix task testcases #154

Merged
merged 12 commits into from
Feb 11, 2022

Conversation

youliangtan
Copy link
Member

@youliangtan youliangtan commented Jan 13, 2022

This PR is to add support for the new task apis for rmf_fleet_adapter_python, and to fix existing test cases for loop and delivery task requests.

  1. Expand rmf_fleet_adapter_python Bindings

    • added Confirmation and consider_..._requests, api
    • fleet_state_update_period and fleet_state_topic_publish_period
    • Modification of ConsiderRequest function
      • as pass by ref as arg is not supported modification is made in the python api to
      using ModifiedConsiderRequest = std::function<Confirmation(const nlohmann::json &description)>;
      
      ##  typing in python:
      #  consider: Callable[[json], rmf_fleet_adapter::agv::FleetUpdateHandle::Confirmation]
  2. Fix Test cases for loop and delivery

  • rmf_fleet_adapter_python:
    ros2 run rmf_fleet_adapter_python test_delivery.py
    ros2 run rmf_fleet_adapter_python test_loop.py
  • rmf_fleet_adapter
    ./build/rmf_fleet_adapter/test_rmf_fleet_adapter "Scenario: Test Delivery"
    ./build/rmf_fleet_adapter/test_rmf_fleet_adapter "Scenario: Test loop requests"

Additionally, a utility script is created to echo the rmf websocket msgs. Example:

ros2 run rmf_fleet_adapter_python rmf_msg_observer.py --task_state

Signed-off-by: youliang <tan_you_liang@hotmail.com>
Signed-off-by: youliang <tan_you_liang@hotmail.com>
Signed-off-by: youliang <tan_you_liang@hotmail.com>
Signed-off-by: youliang <tan_you_liang@hotmail.com>
Signed-off-by: youliang <tan_you_liang@hotmail.com>
Signed-off-by: youliang <tan_you_liang@hotmail.com>
Signed-off-by: youliang <tan_you_liang@hotmail.com>
@youliangtan youliangtan changed the title Task redesign v2 pybind apis Task redesign v2 pybind apis and fix task testcases Jan 20, 2022
@youliangtan youliangtan marked this pull request as ready for review January 20, 2022 04:45
@mxgrey mxgrey requested a review from Yadunund January 20, 2022 06:12
Signed-off-by: youliang <tan_you_liang@hotmail.com>
Signed-off-by: youliang <tan_you_liang@hotmail.com>
@mxgrey mxgrey requested review from mxgrey and removed request for Yadunund February 7, 2022 06:40
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.

Thanks for taking care of the bindings, and also for working on the tests 🙇

elif args.task_log:
msg_type = RmfMsgType.TaskLog
else:
print('Error! No msg_type is selected. select one: \n',
Copy link
Contributor

Choose a reason for hiding this comment

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

Not important enough to change right now, but just a thought: Since we require exactly one of these to be selected, it would probably be more idiomatic to have them as a single positional argument instead of optional flags.

@mxgrey mxgrey merged commit dfb9cb5 into redesign_v2 Feb 11, 2022
@mxgrey mxgrey deleted the redesign_v2-pybind branch February 11, 2022 10:06
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