Skip to content
Closed
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ __pycache__/
/thirdparty/
.vscode/
*.ikcache
*/.rmf_schedule_node.yaml
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,17 @@ Further detailed instructions on running the Zenoh bridges with said configurati

## Demos

### Two workcells

![](./docs/media/nexus_demo.png)

Follow instructions [here](nexus_integration_tests/README.md) to run pick and place demonstrations with a line comprising of two workcells that perform different types of tasks.

TODO: Add a dedicated demo package.
### Simulated workcells and Open-RMF

![](./docs/media/nexus_demo_depot.png)

Follow insturctions [here](nexus_demos/README.md).

## Generating Endpoints

Expand Down
Binary file added docs/media/nexus_demo_depot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions nexus_demos/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
cmake_minimum_required(VERSION 3.16)
set(PROJECT_NAME nexus_demos)
project(${PROJECT_NAME})

find_package(ament_cmake REQUIRED)

install(DIRECTORY launch config maps DESTINATION share/${PROJECT_NAME})

# Refactored from rmf_demos_maps, we just need to download models
file(GLOB_RECURSE traffic_editor_paths "maps/*.building.yaml")
foreach(building_map_path ${traffic_editor_paths})
##############################################################################
# Downloads Models
##############################################################################
if (NOT NO_DOWNLOAD_MODELS)
message("DOWNLOADING MODELS WITH COMMAND: ros2 run rmf_building_map_tools building_map_model_downloader ${building_map_path}")
execute_process(
COMMAND ros2 run rmf_building_map_tools building_map_model_downloader ${building_map_path} -e ~/.gazebo/models
)
endif()
endforeach()

ament_package()
66 changes: 66 additions & 0 deletions nexus_demos/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# nexus_demos

Nexus demo map using the [Depot](https://app.gazebosim.org/OpenRobotics/fuel/models/Depot) world, integrated with Open-RMF.

## Build

Build `nexus_demos`,

```bash
colcon build --packages-up-to nexus_demos
```

## Launch

Launch the demo,

```bash
source ~/ws_nexus/install/setup.bash
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

ros2 launch nexus_demos depot.launch.xml headless:=0
```

Start the `pick_and_place_rmf` work order,

```bash
source ~/ws_nexus/install/setup.bash
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

cd ~/ws_nexus/src/nexus_demos

ros2 action send_goal /system_orchestrator/execute_order nexus_orchestrator_msgs/action/ExecuteWorkOrder "{order: {id: '23', work_order: '$(cat config/pick_and_place_rmf.json)'}}"
```

## Regenerating the simulation world file and nav graph

Source build of `rmf_building_map_tools` is required, at least from commit hash [0d18f59](https://github.com/open-rmf/rmf_traffic_editor/tree/0d18f593356fa2e4de0dbfa297ae1fba66b8e101) onwards.

Generate world file,

```bash
# Source the workspace where rmf_building_map_tools is built

cd ~/ws_nexus/src/nexus/nexus_demos

ros2 run rmf_building_map_tools building_map_generator gazebo \
maps/depot/depot.building.yaml \
maps/depot/depot.world \
maps/depot/models \
--TEMPLATE_WORLD_FILE maps/depot/template/depot_world.sdf \
--SKIP_CAMERA_POSE
```

Generate navigation graphs,

```bash
cd ~/ws_nexus/src/nexus/nexus_demos

ros2 run rmf_building_map_tools building_map_generator nav \
maps/depot/depot.building.yaml \
maps/depot/nav_graphs
```

## Troubleshooting

* If any of the commands give an error regarding `Failed to find a free participant index`, please also set the cyclonedds config with `export CYCLONEDDS_URI=$HOME/ws_nexus/src/nexus_integration_tests/config/cyclonedds/cyclonedds.xml`, which increases the maximum number of participants.
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,45 @@
# RMF Fleet parameters

rmf_fleet:
name: "tinyRobot"
name: "deliveryRobot"
limits:
linear: [0.5, 0.75] # velocity, acceleration
linear: [0.7, 0.75] # velocity, acceleration
angular: [0.6, 2.0] # velocity, acceleration
profile: # Robot profile is modelled as a circle
footprint: 0.3 # radius in m
vicinity: 0.5 # radius in m
footprint: 0.6 # radius in m
vicinity: 0.8 # radius in m
reversible: True # whether robots in this fleet can reverse
# TODO Update battery parameters with actual specs
battery_system:
voltage: 12.0 # V
capacity: 24.0 # Ahr
charging_current: 5.0 # A
voltage: 24.0 # V
capacity: 40.0 # Ahr
charging_current: 8.8 # A
mechanical_system:
mass: 20.0 # kg
moment_of_inertia: 10.0 #kgm^2
mass: 70.0 # kg
moment_of_inertia: 40.0 #kgm^2
friction_coefficient: 0.22
ambient_system:
power: 20.0 # W
tool_system:
power: 0.0 # W
recharge_threshold: 0.10 # Battery level below which robots in this fleet will not operate
recharge_soc: 1.0 # Battery level to which robots in this fleet should be charged up to during recharging tasks
max_delay: 15.0 # allowed seconds of delay of the current itinerary before it gets interrupted and replanned
publish_fleet_state: 10.0 # Publish frequency for fleet state, ensure that it is same as robot_state_update_frequency
account_for_battery_drain: True
task_capabilities: # Specify the types of RMF Tasks that robots in this fleet are capable of performing
loop: True
delivery: True
actions: ["teleop"]
finishing_request: "park" # [park, charge, nothing]
responsive_wait: True # Should responsive wait be on/off for the whole fleet by default? False if not specified.
reassign_task_interval: 120 # seconds, specify how often a task reassignment should be triggered in the fleet
finishing_request: "charge" # [park, charge, nothing]
robots:
tinyRobot1:
charger: "tinyRobot1_charger"
responsive_wait: False # Should responsive wait be on/off for this specific robot? Overrides the fleet-wide setting.
tinyRobot2:
charger: "tinyRobot2_charger"
# No mention of responsive_wait means the fleet-wide setting will be used
deliveryRobot1:
charger: "deliveryRobotCharger1"
deliveryRobot2:
charger: "deliveryRobotCharger2"

fleet_manager:
ip: "127.0.0.1"
port: 22011
port: 22012
user: "some_user"
password: "some_password"
robot_state_update_frequency: 10.0
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<include file="$(find-pkg-share rmf_demos)/common.launch.xml">
<arg name="headless" value="$(var headless)" />
<arg name="use_sim_time" value="$(var use_simulator)"/>
<arg name="viz_config_file" value ="$(find-pkg-share nexus_integration_tests)/launch/include/office/office.rviz"/>
<arg name="config_file" value="$(find-pkg-share nexus_integration_tests)/office/office.building.yaml"/>
<arg name="viz_config_file" value ="$(find-pkg-share nexus_demos)/launch/include/depot/depot.rviz"/>
<arg name="config_file" value="$(find-pkg-share nexus_demos)/maps/depot/depot.building.yaml"/>
</include>

<!-- Nexus Common launch -->
Expand All @@ -19,35 +19,37 @@
<arg name="use_sim_time" value="$(var use_simulator)"/>
</include>

<!-- TinyRobot fleet adapter -->
<!-- DeliveryRobot 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_simulator)"/>
<arg name="nav_graph_file" value="$(find-pkg-share nexus_integration_tests)/maps/office/nav_graphs/0.yaml" />
<arg name="config_file" value="$(find-pkg-share nexus_integration_tests)/config/office/tinyRobot_config.yaml"/>
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="nav_graph_file" value="$(find-pkg-share nexus_demos)/maps/depot/nav_graphs/0.yaml" />
<arg name="config_file" value="$(find-pkg-share nexus_demos)/config/depot/deliveryRobot_config.yaml"/>
</include>
</group>

<node pkg="nexus_workcell_orchestrator" exec="nexus_workcell_orchestrator" name="rmf_nexus_transporter" output="both">
<param name="capabilities" value="[nexus::capabilities::RMFRequestCapability]"/>
<param name="bt_path" value="$(find-pkg-share nexus_integration_tests)/config/rmf_bts"/>
<param name="bt_path" value="$(find-pkg-share nexus_demos)/config/rmf_bts"/>
</node>

<!-- Simulator launch -->
<include if="$(var use_simulator)" file="$(find-pkg-share rmf_demos_gz)/simulation.launch.xml">
<arg name="headless" value="$(var headless)" />
<arg name="map_package" value="nexus_integration_tests" />
<arg name="map_name" value="office" />
<arg name="map_package" value="nexus_demos" />
<arg name="map_name" value="depot" />
<arg name="gazebo_version" value="8" />
<arg name="sim_update_rate" value="$(var sim_update_rate)"/>
</include>

<!-- Bringup from integration tests -->
<!-- TODO(luca) should we move the integration launch here instead? -->
<include file="$(find-pkg-share nexus_integration_tests)/launch/launch.py">
<!-- Bringup orchestrators -->
<include file="$(find-pkg-share nexus_demos)/launch/include/depot/launch.py">
<!-- Set as true to make it auto bringup and remove all the extra rviz launches -->
<arg name="headless" value="true" />
<arg name="use_sim_time" value="$(var use_simulator)"/>
<arg name="main_bt_package" value="nexus_demos"/>
<arg name="main_bt_filename" value="main_rmf.xml"/>
<arg name="system_orchestrator_remap_task_types" value="{pick_and_place_rmf: [place_on_amr, pick_from_amr]}"/>
</include>

</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ Visualization Manager:
Enabled: true
Name: MarkerArray
Namespaces:
tinyRobot/labels/L1: true
tinyRobot/lanes/L1: true
tinyRobot/waypoints/L1: true
deliveryRobot/labels/L1: true
deliveryRobot/lanes/L1: true
deliveryRobot/waypoints/L1: true
Topic:
Depth: 5
Durability Policy: Transient Local
Expand Down
Loading