Integration using fleet adapter template (#387)

Posted by @shannenlolol:

I am trying to integrate a fleet of robots with OpenRMF (Mobile Robot Fleet), and I have been following the instructions given here: https://osrf.github.io/ros2multirobotbook/integration.html. However, I am facing some difficulties in doing so.


I tried running the fleet adapter based on the fleet adapter template, and using the traffic navigation path yaml file that I generated from traffic-editor, with instructions taken from https://github.com/open-rmf/rmf_traffic_editor:

ros2 run rmf_building_map_tools building_map_generator nav \
  ${building_map_path} ${output_nav_graphs_dir}

With the 0.yaml file generated above, I ran the fleet adapter with the following commands, taken from https://github.com/open-rmf/fleet_adapter_template:

ros2 run fleet_adapter_template fleet_adapter -c ~/rmf_ws/fleet_adapter_template/fleet_adapter_template/config.yaml -n /0.yaml -s ws://localhost:8000

I also ran the following commands from https://github.com/open-rmf/rmf-web, which starts up the API server (by default at port 8000) which sets up endpoints to communicate with an Open-RMF deployment, as well as begin compilation of the dashboard.

cd packages/dashboard
pnpm start

However, I got this error:

Traceback (most recent call last):
File “/root/rmf_ws/fleet_adapter_template/install/fleet_adapter_template/lib/fleet_adapter_template/fleet_adapter”, line 33, in
sys.exit(load_entry_point(‘fleet-adapter-template==0.0.0’, ‘console_scripts’, ‘fleet_adapter’)())
File “/root/rmf_ws/fleet_adapter_template/install/fleet_adapter_template/lib/python3.10/site-packages/fleet_adapter_template/fleet_adapter.py”, line 314, in main
adapter = initialize_fleet(
File “/root/rmf_ws/fleet_adapter_template/install/fleet_adapter_template/lib/python3.10/site-packages/fleet_adapter_template/fleet_adapter.py”, line 90, in initialize_fleet
assert adapter, ("Unable to initialize fleet adapter. Please ensure "
AssertionError: Unable to initialize fleet adapter. Please ensure RMF Schedule Node is running
[ros2run]: Process exited with failure 1

I am also quite confused as to how to run everything up/ how it should be integrated together with my own fleet of robots.
Are there any other commands to run? And do I need to parse in the .building.yaml file and world file when running?

Please advise how I should fix this error, thank you.

Posted by @Yadunund:

Hi there,

As reflected in the AssertionError, you will need to run the rmf_traffic_schedule node which maintains a database of all robot itineraries and moderates any traffic negotiations between fleets.

You can reference all the nodes to run from one of our demo launch files rmf_demos/rmf_demos/launch/office.launch.xml at main · open-rmf/rmf_demos · GitHub (See common.launch.xml)

Posted by @shannenlolol:

Thank you @Yadunund , I managed to run it :grinning_face_with_smiling_eyes: However, could I check for the reference coordinates that have to be filled in the config.yaml file:

reference_coordinates:
  rmf: [[0.0, 0.0 ],
        [1.0, 1.0],
        [2.0, 2.0],
        [3.0, 3.0]]
  robot: [[0.0, 0.0 ],
        [1.0, 1.0],
        [2.0, 2.0],
        [3.0, 3.0]]

Are these in meters or pixels? Thank you!

Posted by @Yadunund:

The RMF ones are in meters. The robot ones are subject to whatever convention the robot’s navstack is using (ie, use the values returned by the robot’s API when you query it’s current position without any modification).

Posted by @hansdmc:

@Yadunund if i may asked how does each point represent,

reference_coordinates:
  rmf: [[0.0, 0.0 ],
        [1.0, 1.0],
        [2.0, 2.0],
        [3.0, 3.0]]
  robot: [[0.0, 0.0 ],
        [1.0, 1.0],
        [2.0, 2.0],
        [3.0, 3.0]]

if you plot the coordinates into a Cartesian coordinates system , it represent as a single line. how each of the point translated and why there is 4 points. thank you