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

Nodes docs #98

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
- [The ROS API](./ros2_api.md)
- [Traffic Editor](./traffic-editor.md)
- [Simulation](./simulation.md)
- [Launch Files](./sim_launchfiles.md)
- [Blockade](./sim_launchfiles_blockade.md)
- [Dispatcher](./sim_launchfiles_dispatcher.md)
- [Door](./sim_launchfiles_door.md)
- [Lift](./sim_launchfiles_lift.md)
- [Traffic Monitor](./sim_launchfiles_trafficmonitor.md)
- [Traffic Schedule](./sim_launchfiles_trafficschedule.md)
- [Traffic Visualiser](./sim_launchfiles_visualiser.md)
- [RMF Core Overview](./rmf-core.md)
- [Frequently Asked Questions](./rmf-core_faq.md)
- [Tasks in RMF](./task.md)
Expand Down
Binary file added src/images/blockade_rosgraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/dispatcher_rosgraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/doorsupervisor_rosgraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/liftsupervisor_rosgraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/rmftrafficschedule_rosgraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/trafficmonitor_rosgraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/visualiser_rosgraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions src/sim_launchfiles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Launch Files for RMF

> Note: This tutorial focuses on launch files with respect to Open-RMF. For understanding launch files better it is recommend to use the tutorials on the website of the ROS2 distro that is being used for example for galactic the documentation can be found [here](https://docs.ros.org/en/galactic/Tutorials/Intermediate/Launch/Launch-Main.html)

## Example Launch File

[office.launch.xml](https://github.com/open-rmf/rmf_demos/blob/main/rmf_demos/launch/office.launch.xml)

```xml
<?xml version='1.0' ?>

<launch>
<arg name="use_sim_time" default="false"/>

<!-- Common launch -->
<include file="$(find-pkg-share rmf_demos)/common.launch.xml">
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="viz_config_file" value ="$(find-pkg-share rmf_demos)/include/office/office.rviz"/>
<arg name="config_file" value="$(find-pkg-share rmf_demos_maps)/office/office.building.yaml"/>
<arg name="dashboard_config_file" value="$(find-pkg-share rmf_demos_dashboard_resources)/office/dashboard_config.json"/>
</include>

<!-- TinyRobot fleet adapter -->
<group>
<include file="$(find-pkg-share rmf_demos_fleet_adapter)/launch/fleet_adapter.launch.xml">
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="nav_graph_file" value="$(find-pkg-share rmf_demos_maps)/maps/office/nav_graphs/0.yaml" />
<arg name="config_file" value="$(find-pkg-share rmf_demos)/config/office/tinyRobot_config.yaml"/>
</include>
</group>

</launch>
```

The launch file contains a include tag will contains all the nodes from `common.launch.xml` and group tag inside which the launch files of the project can be included. This is enough to get started with your project.

Information about each node:

- [Blockade](./sim_launchfiles_blockade.md)
- [Dispatcher](./sim_launchfiles_dispatcher.md)
- [Door](./sim_launchfiles_door.md)
- [Lift](./sim_launchfiles_lift.md)
- [Traffic Monitor](./sim_launchfiles_trafficmonitor.md)
- [Traffic Schedule](./sim_launchfiles_trafficschedule.md)
- [Traffic Monitor](./sim_launchfiles_trafficmonitor.md)
- [Visualiser](./sim_launchfiles_visualiser.md)
24 changes: 24 additions & 0 deletions src/sim_launchfiles_blockade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Blockade Moderator

Checks if a blockade has occurred anywhere.

```xml
<!-- Blockade Moderator -->
<node pkg="rmf_traffic_ros2" exec="rmf_traffic_blockade" output="both">
<param name="use_sim_time" value="$(var use_sim_time)"/>
</node>
```

The code for the blockade node can be found [here](https://github.com/open-rmf/rmf_ros2/blob/main/rmf_traffic_ros2/src/rmf_traffic_ros2/blockade/Node.cpp)
The blockade node has the following topics:

- [BlockadeCancel](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/BlockadeCancel.msg)
- [BlockadeHeartbeat](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/BlockadeHeartbeat.msg)
- [BlockadeReached](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/BlockadeReached.msg)
- [BlockadeReady](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/BlockadeReady.msg)
- [BlockadeRelease](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/BlockadeRelease.msg)
- [BlockadeSet](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/BlockadeSet.msg)
- [BlockadeStatus](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/BlockadeStatus.msg)

The blockade node is connected to the both the robots as seen in the graph below.
![blockade_rqt_graph](./images/blockade_rosgraph.png)
27 changes: 27 additions & 0 deletions src/sim_launchfiles_dispatcher.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Dispatcher Node

Used for task dispatch. Every fleet that can perform a task request will offer a bid for how much it would "cost" them to perform a task, and the bid with the lowest "cost" will be the winner. The "cost" will be determined by two factors:

- How quickly the task is finished
- How much other tasks get delayed if the new task needs to preempt them

```xml
<!-- Dispatcher Node -->
<group>
<node pkg="rmf_task_ros2" exec="rmf_task_dispatcher" output="screen">
<param name="use_sim_time" value="$(var use_sim_time)"/>
<param name="bidding_time_window" value="$(var bidding_time_window)"/>
</node>
</group>
```

The code for the dispatcher node can be found [here](https://github.com/open-rmf/rmf_ros2/blob/main/rmf_task_ros2/src/dispatcher_node/main.cpp)
The dispatcher node has the following topics:

- [DispatchAck](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_task_msgs/msg/DispatchAck.msg)
- [DispatchCommand](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_task_msgs/msg/DispatchCommand.msg)
- [DispatchState](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_task_msgs/msg/DispatchState.msg)
- [DispatchStates](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_task_msgs/msg/DispatchStates.msg)

The dispatcher node is responsible for dispatching tasks to the robots.It responds to the `dispatch_request` and `bid_notice`.It takes information from the `bid_proposal` and `dispatch_ack` which is published by `rmf_task`.
![dispatcher node](./images/dispatcher_rosgraph.png)
23 changes: 23 additions & 0 deletions src/sim_launchfiles_door.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Door Supervisor

It is part of `rmf_fleet_adapter`. It is used to supervise the door. To perform action based on request.The door can be opend or closed based on request.

```xml
<!-- Door Supervisor -->
<group>
<node pkg="rmf_fleet_adapter" exec="door_supervisor">
<param name="use_sim_time" value="$(var use_sim_time)"/>
</node>
</group>
```

The code for the Door Supervisor node can be found [here](https://github.com/open-rmf/rmf_ros2/blob/main/rmf_fleet_adapter/src/door_supervisor/Node.cpp)
The Door Supervisor has following topics:

- [DoorMode](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_door_msgs/msg/DoorMode.msg)
- [DoorRequest](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_door_msgs/msg/DoorRequest.msg)
- [DoorSessions](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_door_msgs/msg/DoorSessions.msg)
- [DoorState](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_door_msgs/msg/DoorState.msg)

The Door Supervisor attends to requests and keeps track of the state of the Door.
![door supervisor](./images/doorsupervisor_rosgraph.png)
21 changes: 21 additions & 0 deletions src/sim_launchfiles_lift.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Lift Supervisor

It is part of `rmf_fleet_adapter`. It is used to supervise the lift. To perform action based on request. A lift adapter subscribes to `lift_states` while keeping track of the internal and desired state of the lift in order to prevent it from performing any actions that might interrupt

```xml
<!-- Lift Supervisor -->
<group>
<node pkg="rmf_fleet_adapter" exec="lift_supervisor">
<param name="use_sim_time" value="$(var use_sim_time)"/>
</node>
</group>
```

The code for the blockade node can be found [here](https://github.com/open-rmf/rmf_ros2/blob/main/rmf_fleet_adapter/src/lift_supervisor/Node.cpp)
The Life Supervisor has following topics:

- [LiftRequest](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_lift_msgs/msg/LiftRequest.msg)
- [LifeState](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_lift_msgs/msg/LiftState.msg)

The Life Supervisor does the job of maintaining the status of the Lift and attend to any requests by the robots.
![Life Supervisor](./images/liftsupervisor_rosgraph.png)
29 changes: 29 additions & 0 deletions src/sim_launchfiles_trafficmonitor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Traffic Schedule monitor and replacement node

This node is helps in monitoring the `rmf_traffic_schedule` and provides a replacement if the rmf_traffic_schedule faces any conflicts.

```xml
<node pkg="rmf_traffic_ros2" exec="rmf_traffic_schedule_monitor" output="both" name="rmf_traffic_schedule_backup">
<param name="use_sim_time" value="$(var use_sim_time)"/>
</node>
```

The code for the blockade node can be found [here](https://github.com/open-rmf/rmf_ros2/blob/main/rmf_traffic_ros2/src/rmf_traffic_schedule_monitor/main.cpp)
The Traffic Schedule monitor has following topics:

- [ScheduleChangeAdd](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ScheduleChangeAdd.msg)
- [ScheduleChangeAddItem](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ScheduleChangeAddItem.msg)
- [ScheduleChangeCull](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ScheduleChangeCull.msg)
- [ScheduleChangeDelay](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ScheduleChangeDelay.msg)
- [ScheduleChangeProgress](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ScheduleChangeProgress.msg)
- [ScheduleIdentity](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ScheduleIdentity.msg)
- [ScheduleInconsistency](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ScheduleInconsistency.msg)
- [ScheduleInconsistencyRange](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ScheduleInconsistencyRange.msg)
- [ScheduleParticipantPatch](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ScheduleParticipantPatch.msg)
- [SchedulePatch](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/SchedulePatch.msg)
- [ScheduleQueries](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ScheduleQueries.msg)
- [ScheduleQuery](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ScheduleQuery.msg)
- [ScheduleQueryParticipants](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ScheduleQueryParticipants.msg)
- [ScheduleQuerySpacetime](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ScheduleQuerySpacetime.msg)

![Traffic Schedule](./images/trafficmonitor_rosgraph.png)
35 changes: 35 additions & 0 deletions src/sim_launchfiles_trafficschedule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Traffic Schedule

The `rmf_traffic_schedule` handles core scheduling and traffic management systems.

```xml
<!-- Traffic Schedule -->
<node pkg="rmf_traffic_ros2" exec="rmf_traffic_schedule" output="both" name="rmf_traffic_schedule_primary">
<param name="use_sim_time" value="$(var use_sim_time)"/>
</node>
```

The code for the schedule node can be found [here](https://github.com/open-rmf/rmf_ros2/blob/main/rmf_traffic_ros2/src/rmf_traffic_schedule/main.cpp)

Traffic Schedule has following topics

- [NegotiationNotice](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/NegotiationNotice.msg)
- [NegotiationAck](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/NegotiationAck.msg)
- [NegotiationForfeit](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/NegotiationForfeit.msg)
- [ScheduleInconsistency](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ScheduleInconsistency.msg)
- [Trajectory](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/Trajectory.msg)
- [ItineraryDelay](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ItineraryDelay.msg)
- [ItineraryClear](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ItineraryClear.msg)
- [ItineraryErase](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ItineraryErase.msg)
- [ItineraryExtend](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ItineraryExtend.msg)
- [NegotiationProposal](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/NegotiationProposal.msg)
- [NegotiationRejection](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/NegotiationRejection.msg)
- [Participants](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/Participants.msg)
- [NegotiationConclusion](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/NegotiationConclusion.msg)
- [Heartbeat](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/Heartbeat.msg)
- [NegotiationRefusal](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/NegotiationRefusal.msg)
- [ItinerarySet](https://github.com/open-rmf/rmf_internal_msgs/blob/main/rmf_traffic_msgs/msg/ItinerarySet.msg)

The Traffic Schedule does the job of planning what paths robots will follow,scheduling and performs negotiations between different robots.

![Traffic Schedule](./images/rmftrafficschedule_rosgraph.png)
17 changes: 17 additions & 0 deletions src/sim_launchfiles_visualiser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Visualizer

Used for visualization using rviz.

```xml
<!-- Visualizer -->
<group>
<include file="$(find-pkg-share rmf_visualization)/visualization.launch.xml">
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="map_name" value="$(var initial_map)"/>
<arg name="viz_config_file" value ="$(var viz_config_file)"/>
<arg name="headless" value="$(var headless)"/>
</include>
</group>
```

![Visualizer](./images/visualiser_rosgraph.png)