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

Support Flexible Task Definitions #168

Merged
merged 102 commits into from
Feb 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
5944a22
Added skeleton for broadcast client
Yadunund Dec 6, 2021
ae176b5
wip
Yadunund Dec 6, 2021
6231519
Implemented make
Yadunund Dec 7, 2021
43db070
Initialize broadcast client
Yadunund Dec 7, 2021
fb32c33
Debugging
Yadunund Dec 7, 2021
0591869
Cleanup
Yadunund Dec 8, 2021
bfd85a0
Publish fleet_state message
Yadunund Dec 8, 2021
e4bf907
Store broadcast_client within TaskManager
Yadunund Dec 8, 2021
c8e0517
Changes to support rmf_task/redesign_v2
Yadunund Dec 8, 2021
c89e534
Schema validator loader uses internal dictionary
Yadunund Dec 9, 2021
aaf008e
Fixed fleet_state message
Yadunund Dec 9, 2021
a8f6592
Merge branch 'main' into feature/websocket_client
Yadunund Dec 9, 2021
46fe559
Update python binding
Yadunund Dec 9, 2021
129f66b
Publish _update jsons
Yadunund Dec 9, 2021
a274b49
Add helper functions to validate and publish task updates
Yadunund Dec 9, 2021
5becba1
Uncrustify
Yadunund Dec 9, 2021
03de72a
Creating a shim to migrate the legacy task phases to the new system
mxgrey Dec 10, 2021
d62e94c
Implementing the GoToPlace event
mxgrey Dec 14, 2021
1e0bfb9
Finish implementation of GoToPlace and EmergencyPullover
mxgrey Dec 15, 2021
31c095a
Implement delivery
mxgrey Dec 16, 2021
a072869
Finished refactoring to new task system -- need to finish comms imple…
mxgrey Dec 17, 2021
7664c76
Publish task states
mxgrey Dec 20, 2021
0cd4cc0
Continue implementing json updates, fix a subtle bug
mxgrey Dec 21, 2021
2ca24c3
Support battery charging tasks
mxgrey Dec 22, 2021
eea945c
Fix battery charging and deliveries
mxgrey Dec 22, 2021
2855b26
Use Placeholder event instead of WaitFor event
mxgrey Dec 22, 2021
96cc725
Implemented json message handling -- need to finish task change imple…
mxgrey Dec 24, 2021
1d37028
Implemented interrupt and resume -- just a few more commands missing
mxgrey Dec 24, 2021
15f548b
Finished implementation of all task manipulation requests -- needs te…
mxgrey Dec 24, 2021
8c51312
Beginning API for json deserialization
mxgrey Dec 29, 2021
c340558
Remove redundant comparison function
mxgrey Dec 29, 2021
07b8e96
Merged in the latest changes
mxgrey Dec 29, 2021
f854943
Merge branch 'json_deserialize' into redesign_v2
mxgrey Dec 29, 2021
19b93e1
Adding the ability to deserialize json task requests
mxgrey Dec 30, 2021
5ff66e3
Implement deserialization of JSON for task descriptions
mxgrey Dec 31, 2021
42a826e
Finish implementations for delivery and loop
mxgrey Dec 31, 2021
e6e75b4
Fix validator instantiation
mxgrey Dec 31, 2021
e379d8d
Merge branch 'redesign_v2' into json_deserialization
mxgrey Dec 31, 2021
18078c4
Finish implementation of task description deserialization
mxgrey Jan 3, 2022
12ba598
Add a task description schema for Clean
mxgrey Jan 3, 2022
6eb7c29
Remember to publish task log updates
mxgrey Jan 3, 2022
943f62f
Fix websocket fleet state updates
mxgrey Jan 3, 2022
d1ddea3
Merge branch 'redesign_v2' into json_deserialization
mxgrey Jan 3, 2022
7cfff09
Reworking the dispatcher to reduce responsibilities and eliminate cruft
mxgrey Jan 4, 2022
4f43046
Remember to put task_id into task log update
mxgrey Jan 4, 2022
dbbd8df
Merge branch 'redesign_v2' into json_deserialization
mxgrey Jan 5, 2022
750699e
Refactoring dispatch node -- finished Dispatcher class
mxgrey Jan 6, 2022
8eba8cc
Finished migrating the dispatch system -- needs testing
mxgrey Jan 7, 2022
bab1e34
Creating new API for letting users accept tasks
mxgrey Jan 8, 2022
abf79bf
Migrating to new bid notice system
mxgrey Jan 9, 2022
36a2cc2
Finished critical parts of migration -- needs testing
mxgrey Jan 9, 2022
765ed0d
Fixing subtle bugs
mxgrey Jan 9, 2022
1bb3bed
Implement support for composed tasks
mxgrey Jan 10, 2022
acf6aff
Removing support for adding custom tasks -- wait until we can work mo…
mxgrey Jan 10, 2022
3ca614b
Fix stray comma
mxgrey Jan 10, 2022
8ca867a
fix breaking add_fleet() py api change
youliangtan Jan 11, 2022
06a3447
Remove url reserved characters from task_id fields
mxgrey Jan 12, 2022
4baf4f8
Change the task_id format to something a bit nicer
mxgrey Jan 12, 2022
ce8bb9a
Remember to fill in event states
mxgrey Jan 12, 2022
a4fab05
Fix the usage of nlohmann::json
mxgrey Jan 13, 2022
067d8e2
fix json key check error
youliangtan Jan 13, 2022
26f4b39
Fix the use of nlohmann::json
mxgrey Jan 13, 2022
fffb5d6
Merge branch 'redesign_v2' of ssh://github.com/open-rmf/rmf_ros2 into…
mxgrey Jan 13, 2022
cac1959
Adding debug printouts to dispatcher
mxgrey Jan 13, 2022
ede8b53
Desperate debug
mxgrey Jan 13, 2022
acca4ae
Fix usage of json
mxgrey Jan 13, 2022
707aba1
Fix category for legacy clean
Yadunund Jan 13, 2022
50c5982
Wrap json parse in try-catch blocks
Yadunund Jan 13, 2022
d3c4938
Remove debugging cruft
mxgrey Jan 14, 2022
bf03846
Fix merge
mxgrey Jan 14, 2022
6d174d2
fix empty itinerary gotoplace error
youliangtan Jan 20, 2022
d054c32
fix compilation on foxy
youliangtan Jan 21, 2022
10c9a51
Support PerformAction event in composed tasks (#155)
Yadunund Jan 24, 2022
2f41a93
Fix Compose Tasks (#159)
Yadunund Jan 27, 2022
0a6193c
Fix dispatch response
Yadunund Jan 28, 2022
53b257e
check priority json keys
youliangtan Jan 28, 2022
946e0d7
Merge branch 'redesign_v2' of https://github.com/open-rmf/rmf_ros2 in…
youliangtan Jan 28, 2022
c94b0ad
Update json dependency (#160)
Yadunund Jan 28, 2022
7efc506
Feature: Direct Task Assignment (#158)
Yadunund Jan 31, 2022
4f6936d
Fix permanent freeze of new task requests
mxgrey Feb 3, 2022
50edb27
Including task timing information in the task state
mxgrey Feb 3, 2022
0c0a3f7
Fix access of dictionary elements that might be missing
mxgrey Feb 4, 2022
af36897
Update schema file names
mxgrey Feb 7, 2022
97e5a0c
populate task state timing info for queue task
youliangtan Feb 9, 2022
7209d4d
Give nicer event description and log updates for MoveRobot
mxgrey Feb 10, 2022
5ce62ff
Fix time representations
mxgrey Feb 10, 2022
dfb9cb5
Task redesign v2 pybind apis and fix task testcases (#154)
youliangtan Feb 11, 2022
85ae11f
More consistent formatting
mxgrey Feb 11, 2022
f96df80
Get tests passing again
mxgrey Feb 11, 2022
945cb45
Use the redesign_v2 repos file
mxgrey Feb 12, 2022
983090e
Revert test_Loop back to flaky
mxgrey Feb 12, 2022
f674270
Skip Python tests on CI until the configuration can be fixed
mxgrey Feb 12, 2022
b2d4e2e
Update repos for asan and tsan tests as well
mxgrey Feb 12, 2022
7c583b9
Loosen thresholds
mxgrey Feb 12, 2022
9973341
Fix merge
mxgrey Feb 12, 2022
d1c1d8a
Fix error from merge
mxgrey Feb 13, 2022
1984ff7
Merge latest
mxgrey Feb 13, 2022
c532612
Fix lifecycle management for mock server
mxgrey Feb 13, 2022
4d2abdc
Fix a few thread race vulnerabilities
mxgrey Feb 13, 2022
1da0abe
Temporarily disable tsan for the CI
mxgrey Feb 13, 2022
de6f6c2
Fix uncrustify
mxgrey Feb 13, 2022
f4f90c3
Fix potential use-after-free vulnerability
mxgrey Feb 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/asan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
env:
CC: gcc -g
CXX: g++ -g
ASAN_OPTIONS: detect_leaks=0
ASAN_OPTIONS: detect_leaks=0
with:
target-ros2-distro: galactic
# build all packages listed in the meta package
Expand All @@ -23,7 +23,7 @@ jobs:
rmf_task_ros2
rmf_fleet_adapter
vcs-repo-file-url: |
https://raw.githubusercontent.com/open-rmf/rmf/main/rmf.repos
https://raw.githubusercontent.com/open-rmf/rmf/redesign_v2/rmf.repos
colcon-defaults: |
{
"build": {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
rmf_fleet_adapter
# rmf_fleet_adapter_python # TODO(MXG): These tests are failing in the CI, and it seems to be related to https://github.com/ros2/launch/pull/592. Figure out how to fix this.
vcs-repo-file-url: |
https://raw.githubusercontent.com/open-rmf/rmf/main/rmf.repos
https://raw.githubusercontent.com/open-rmf/rmf/redesign_v2/rmf.repos
colcon-defaults: |
{
"build": {
Expand Down
54 changes: 0 additions & 54 deletions .github/workflows/tsan.yaml

This file was deleted.

40 changes: 30 additions & 10 deletions rmf_fleet_adapter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@ set(dep_pkgs
rmf_task_msgs
rmf_traffic
rmf_traffic_ros2
rmf_task_ros2
rmf_battery
rmf_task
rmf_task_sequence
std_msgs
rmf_api_msgs
websocketpp
nlohmann_json
nlohmann_json_schema_validator_vendor
)
foreach(pkg ${dep_pkgs})
find_package(${pkg} REQUIRED)
Expand Down Expand Up @@ -70,21 +76,28 @@ target_link_libraries(rmf_fleet_adapter
rmf_traffic_ros2::rmf_traffic_ros2
rmf_battery::rmf_battery
rmf_task::rmf_task
rmf_task_sequence::rmf_task_sequence
rmf_task_ros2::rmf_task_ros2
yaml-cpp
${rmf_fleet_msgs_LIBRARIES}
${rclcpp_LIBRARIES}
${rmf_task_msgs_LIBRARIES}
PRIVATE
rmf_rxcpp
nlohmann_json::nlohmann_json
rmf_api_msgs::rmf_api_msgs
${rmf_door_msgs_LIBRARIES}
${rmf_lift_msgs_LIBRARIES}
${rmf_dispenser_msgs_LIBRARIES}
${rmf_ingestor_msgs_LIBRARIES}
${websocketpp_LIBRARIES}
nlohmann_json_schema_validator
)

target_include_directories(rmf_fleet_adapter
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/rmf_api_generate_schema_headers/include> # for auto-generated schema headers
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
${rmf_traffic_ros2_INCLUDE_DIRS}
${rmf_fleet_msgs_INCLUDE_DIRS}
Expand All @@ -96,6 +109,9 @@ target_include_directories(rmf_fleet_adapter
${rmf_lift_msgs_INCLUDE_DIRS}
${rmf_dispenser_msgs_INCLUDE_DIRS}
${rmf_ingestor_msgs_INCLUDE_DIRS}
${rmf_api_msgs_INCLUDE_DIRS}
${WEBSOCKETPP_INCLUDE_DIR}
${nlohmann_json_schema_validator_INCLUDE_DIRS}
)

if (BUILD_TESTING)
Expand Down Expand Up @@ -130,7 +146,10 @@ if (BUILD_TESTING)
${rmf_lift_msgs_INCLUDE_DIRS}
${rmf_dispenser_msgs_INCLUDE_DIRS}
${rmf_ingestor_msgs_INCLUDE_DIRS}
${rmf_api_msgs_INCLUDE_DIRS}
${std_msgs_INCLUDE_DIRS}
${WEBSOCKETPP_INCLUDE_DIR}
${nlohmann_json_schema_validator_INCLUDE_DIRS}
)
target_link_libraries(test_rmf_fleet_adapter
PRIVATE
Expand All @@ -143,7 +162,10 @@ if (BUILD_TESTING)
${rmf_ingestor_msgs_LIBRARIES}
rmf_fleet_adapter
rmf_utils::rmf_utils
rmf_api_msgs::rmf_api_msgs
${std_msgs_LIBRARIES}
${websocketpp_LIBRARIES}
nlohmann_json_schema_validator
)

target_compile_definitions(test_rmf_fleet_adapter
Expand Down Expand Up @@ -453,17 +475,16 @@ target_include_directories(close_lanes

# -----------------------------------------------------------------------------

ament_export_targets(rmf_fleet_adapter HAS_LIBRARY_TARGET)
ament_export_dependencies(
rmf_task
rmf_traffic_ros2
rmf_fleet_msgs
rmf_door_msgs
rmf_lift_msgs
rmf_ingestor_msgs
rmf_dispenser_msgs
rmf_api_generate_schema_headers(
PACKAGE rmf_fleet_adapter
SCHEMAS_DIR ${CMAKE_CURRENT_LIST_DIR}/schemas
)

# -----------------------------------------------------------------------------

ament_export_targets(rmf_fleet_adapter HAS_LIBRARY_TARGET)
ament_export_dependencies(${dep_pkgs})

install(
TARGETS
rmf_fleet_adapter
Expand Down Expand Up @@ -499,4 +520,3 @@ install(
)

ament_package()

3 changes: 3 additions & 0 deletions rmf_fleet_adapter/include/rmf_fleet_adapter/StandardNames.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ const std::string DockSummaryTopicName = "dock_summary";
const std::string LaneClosureRequestTopicName = "lane_closure_requests";
const std::string ClosedLaneTopicName = "closed_lanes";

const std::string TaskApiRequests = "task_api_requests";
const std::string TaskApiResponses = "task_api_responses";

} // namespace rmf_fleet_adapter

#endif // RMF_FLEET_ADAPTER__STANDARDNAMES_HPP
7 changes: 6 additions & 1 deletion rmf_fleet_adapter/include/rmf_fleet_adapter/agv/Adapter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,15 @@ class Adapter : public std::enable_shared_from_this<Adapter>
///
/// \param[in] navigation_graph
/// Specify the navigation graph used by the vehicles in this fleet.
///
/// \param[in] server_uri
/// Specify the URI for the websocket server that receives updates on tasks
/// and states. If nullopt, data will not be published.
std::shared_ptr<FleetUpdateHandle> add_fleet(
const std::string& fleet_name,
rmf_traffic::agv::VehicleTraits traits,
rmf_traffic::agv::Graph navigation_graph);
rmf_traffic::agv::Graph navigation_graph,
std::optional<std::string> server_uri = std::nullopt);

/// Create a traffic light to help manage robots that can only support pause
/// and resume commands.
Expand Down
Loading