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

Add lookahead behavior for GoToPlace and fix various sources of seg faults #205

Merged
merged 25 commits into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
138349d
Add unstable features for declaring a hold and being stubborn
mxgrey Apr 12, 2022
34e3826
Add some Trajectory bindings and a test of the unstable API
mxgrey Apr 12, 2022
f4d82fe
Satisfy uncrustify
mxgrey Apr 14, 2022
1108fd5
Merge remote-tracking branch 'origin/main' into stubborn_unstable_fea…
mxgrey Apr 15, 2022
867713b
Allow system integrators to specify an update listener
mxgrey Apr 15, 2022
6f5ff04
Add a WaitUntil event and use it for ResponsiveWait
mxgrey Apr 18, 2022
4bc4da8
Merge remote-tracking branch 'origin/main' into wait_until
mxgrey Apr 18, 2022
a23a97e
Call the correct update function
mxgrey Apr 19, 2022
b799748
No longer skip forward timing adjustments
mxgrey Apr 19, 2022
af863fa
Experimenting with a traffic lookahead strategy
mxgrey Apr 19, 2022
93ba1fd
Support parsing followed_by field in json messages
mxgrey Apr 20, 2022
f9a7381
Fix cancellation reporting and add a cancel/kill API
mxgrey Apr 20, 2022
fe5644a
Most general possible update_position overload
mxgrey Apr 22, 2022
8fbf906
Remove scoped_xstream_redirect as it may have caused segfault
mxgrey Apr 22, 2022
7e43080
Eliminate sources of segfaults and exceptions
mxgrey Apr 22, 2022
ddeb2b9
Merge branch 'main' into wait_until
mxgrey May 5, 2022
bf368ee
Fix subtle errors
mxgrey May 5, 2022
3a2fbda
Fix style
mxgrey May 5, 2022
7d0210b
Update changelog
mxgrey May 5, 2022
aca6638
Merge branch 'wait_until' into demo_experiments
mxgrey May 5, 2022
26ae822
Fix style
mxgrey May 5, 2022
ee134e7
Fix merge
mxgrey May 6, 2022
e9a2965
Merge branch 'main' into demo_experiments
mxgrey May 17, 2022
9433066
Remove debug comment
mxgrey May 17, 2022
46d1cac
Update changelog
mxgrey May 17, 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
1 change: 1 addition & 0 deletions rmf_fleet_adapter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

2.1.0 (2022-XX-YY)
------------------
* Add APIs for cancelling and killing tasks from the `RobotUpdateHandle`: [#205](https://github.com/open-rmf/rmf_ros2/pull/205)
* Add a WaitUntil event and use it for ResponsiveWait: [#199](https://github.com/open-rmf/rmf_ros2/pull/199)

2.0.0 (2022-03-18)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define RMF_FLEET_ADAPTER__AGV__ROBOTUPDATEHANDLE_HPP

#include <rmf_traffic/Time.hpp>
#include <rmf_traffic/agv/Planner.hpp>
#include <rmf_utils/impl_ptr.hpp>
#include <rmf_utils/optional.hpp>

Expand Down Expand Up @@ -92,6 +93,10 @@ class RobotUpdateHandle
const double max_merge_lane_distance = 1.0,
const double min_lane_length = 1e-8);

/// Update the current position of the robot by specifying a plan start set
/// for it.
void update_position(rmf_traffic::agv::Plan::StartSet position);

/// Set the waypoint where the charger for this robot is located.
/// If not specified, the nearest waypoint in the graph with the is_charger()
/// property will be assumed as the charger for this robot.
Expand Down Expand Up @@ -218,6 +223,42 @@ class RobotUpdateHandle
std::vector<std::string> labels,
std::function<void()> robot_is_interrupted);

/// Cancel a task, if it has been assigned to this robot
///
/// \param[in] task_id
/// The ID of the task to be canceled
///
/// \param[in] labels
/// Labels that will be assigned to this cancellation. It is recommended to
/// include information about why the cancellation is happening.
///
/// \param[in] on_cancellation
/// Callback that will be triggered after the cancellation is issued.
/// task_was_found will be true if the task was successfully found and
/// issued the cancellation, false otherwise.
void cancel_task(
std::string task_id,
std::vector<std::string> labels,
std::function<void(bool task_was_found)> on_cancellation);

/// Kill a task, if it has been assigned to this robot
///
/// \param[in] task_id
/// The ID of the task to be canceled
///
/// \param[in] labels
/// Labels that will be assigned to this cancellation. It is recommended to
/// include information about why the cancellation is happening.
///
/// \param[in] on_kill
/// Callback that will be triggered after the cancellation is issued.
/// task_was_found will be true if the task was successfully found and
/// issued the kill, false otherwise.
void kill_task(
std::string task_id,
std::vector<std::string> labels,
std::function<void(bool task_was_found)> on_kill);

enum class Tier
{
/// General status information, does not require special attention
Expand Down
17 changes: 16 additions & 1 deletion rmf_fleet_adapter/schemas/event_description__go_to_place.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,20 @@
"$id": "https://raw.githubusercontent.com/open-rmf/rmf_ros2/main/rmf_fleet_adapter/schemas/event_description__go_to_place.json",
"title": "Go To Place Event Description",
"description": "Have a robot go to a place",
"$ref": "place.json"
"oneOf": [
{
"$ref": "place.json"
},
{
"type": "object",
"properties": {
"place": { "$ref": "place.json" },
"followed_by": {
"description": "A list of places that the robot might go after it reaches this one. It will not actually go to these places unless other activities bring it there, but the traffic system will be told to expect the robot to proceed through these places.",
"type": "array",
"items": { "$ref": "place.json" }
}
}
}
]
}
Loading