Skip to content
This repository was archived by the owner on Jul 22, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions rmf_task_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,22 @@ set(msg_files
"msg/TaskSummary.msg"
"msg/Tasks.msg"
"msg/Loop.msg"
# New task Msgs
"msg/TaskType.msg"
"msg/TaskProfile.msg"
"msg/BidNotice.msg"
"msg/BidProposal.msg"
"msg/DispatchRequest.msg"
)

set(srv_files
"srv/SubmitTask.srv"
"srv/CancelTask.srv"
"srv/GetTask.srv"
)

rosidl_generate_interfaces(${PROJECT_NAME}
${srv_files}
${msg_files}
DEPENDENCIES
builtin_interfaces
Expand Down
7 changes: 7 additions & 0 deletions rmf_task_msgs/msg/BidNotice.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This msg is will be received by Fleet Adapter

# task to bid
TaskProfile task_profile

# Duration which bidding is open
builtin_interfaces/Duration time_window
16 changes: 16 additions & 0 deletions rmf_task_msgs/msg/BidProposal.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This msg is generated by Fleet Adpater

string fleet_name

# task to bid, same as the one from BidNotice
TaskProfile task_profile

# Cost of the fleet before and after adding the new task
float64 prev_cost
float64 new_cost

# estimated finish time of the given task
builtin_interfaces/Time finish_time

# Selected robot (optional)
string robot_name
13 changes: 13 additions & 0 deletions rmf_task_msgs/msg/DispatchRequest.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Publish by Task Dispatcher Node
# This msg is will be received by a Fleet Adapter to initiate/cancel a task

# Selected Fleet Adapter to execute/cancel the task
string fleet_name

# Task to dispatch (should be the same as in BidNotice)
TaskProfile task_profile

# add or cancel a task
uint8 method
uint8 ADD=1 # to add a task
uint8 CANCEL=2 # to cancel and remove a task
14 changes: 14 additions & 0 deletions rmf_task_msgs/msg/TaskProfile.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Unique ID to differentiate the task
string task_id

# Task submission time
builtin_interfaces/Time submission_time

# Desired start time of a task
builtin_interfaces/Time start_time

# e.g. Delivery, Station.....
TaskType type

# Params
BehaviorParameter[] params
20 changes: 18 additions & 2 deletions rmf_task_msgs/msg/TaskSummary.msg
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
string task_id
# Publish by Fleet Adapter (aka DispatchStatus)

# Fleet Adapter name
string fleet_name

# *optional and duplicated in TaskProfile
string task_id

TaskProfile task_profile

uint32 state
uint32 STATE_QUEUED=0
uint32 STATE_ACTIVE=1
uint32 STATE_COMPLETED=2 # hooray
uint32 STATE_FAILED=3 # oh no
uint32 STATE_CANCELED=4
uint32 STATE_PENDING=5

# a brief summary of the current status of the task, for UI's
# *optional
string status

# submission_time is when the task was submitted to rmf_core
builtin_interfaces/Time submission_time
# *optional and duplicated in TaskProfile
builtin_interfaces/Time submission_time

# when rmf_core actually began processing the task
builtin_interfaces/Time start_time
Expand All @@ -19,3 +31,7 @@ builtin_interfaces/Time start_time
# an estimate. When this message is a summary of a completed or failed task,
# end_time is the actual time.
builtin_interfaces/Time end_time

# Allocated robot name
# *optional
string robot_name
9 changes: 9 additions & 0 deletions rmf_task_msgs/msg/TaskType.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# type of task
uint8 value

uint8 STATION_TASK=0
uint8 LOOP_TASK=1
uint8 DELIVERY_TASK=2
uint8 CHARGING_TASK=3
uint8 CLEANING_TASK=4
uint8 PATROL_TASK=5
12 changes: 12 additions & 0 deletions rmf_task_msgs/srv/CancelTask.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Submit Task | "POST" service call

# Whom that call this srv
string requester

# generated task ID by dispatcher node
string task_id

---

# Confirmation that this service call is processed
bool success
15 changes: 15 additions & 0 deletions rmf_task_msgs/srv/GetTask.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Query list of submitted tasks | Get service call

# Whom that call this srv
string requester

# Input the generated task ID during submission
# if empty, provide all Submitted Tasks
string[] task_id

---

bool success

TaskSummary[] active_tasks
TaskSummary[] terminated_tasks
21 changes: 21 additions & 0 deletions rmf_task_msgs/srv/SubmitTask.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Submit Task | POST service call

# Whom that call this srv
string requester

# Desired start time of a task
builtin_interfaces/Time start_time

# e.g. Delivery, Station.....
TaskType type

# Params
BehaviorParameter[] params

---

# Confirmation that this service call is processed
bool success

# generated task ID by dispatcher node
string task_id