How can i use openRMF along with free fleet (#63)

Posted by @shubhamnagla:

Greetings,

I have a query regarding free fleet integration with the open rmf.

I am using the following tutorial for making the whole thing work.

I am stuck at the integration part only. I am able to use the free fleet independently
to control a robot over ros1 client and ros2 server.

What I want to achieve is to integrate the open rmf with your free fleet.
Like currently the open rmf uses waypoint navigation for navigating the robot from point to point.
But I want to use the navigation stack to implement that part.

Specs:
Ubuntu 20.0.4LTS
Ros1 Noetic
Ros2 Foxy

Posted by @sachinkum0009:

Hi, I am also facing this issue with the integration of free fleet and rmf

Environment

  • OS Version: Ubuntu 20.04
  • Binary Install Foxy and Noetic

Description

  • I want to integrate the RMF with ROS1 Navigation Stack using Free Fleet
  • I followed the documentation and able to integrate the free fleet with ros1 navigation stack. (able to send the goal to navigation stack using the free_fleet)
  • But when i launch the rmf, it is sending the same path request to free_fleet continuously even after the move_base goal is reached.
  • Also, when I try to send the task with priority 1 using RMF GUI from browser. It adds the task to the queue. But doesn’t send the path request or execute this task.
    Can you please help and guide me for this issue :pray: ?

Posted by @mxgrey:

But when i launch the rmf, it is sending the same path request to free_fleet continuously even after the move_base goal is reached.

What’s the frequency of these path requests? This is most likely intended behavior coming from the ResponsiveWait phase, although we may want to consider cleaning this up since admittedly the noise can be confusing, and it’s using unnecessary bandwidth.

Also, when I try to send the task with priority 1 using RMF GUI from browser. It adds the task to the queue. But doesn’t send the path request or execute this task.

This is most likely caused by a discrepancy between wall time and robot time. I would look carefully at what time is specified for your task and what your robot believes the current time is. Also if you’re mixing in simulation, then you need to be careful about inconsistencies between wall time and simulation time.

Posted by @lkw303:

Hi sorry for this late reply, but I happen to chance upon this, while browsing through the RMF discussions.

What’s the frequency of these path requests? This is most likely intended behavior coming from the ResponsiveWait phase, although we may want to consider cleaning this up since admittedly the noise can be confusing, and it’s using unnecessary bandwidth.

Yes I believe that the ResponsiveWait feature as I previously have ran the old version of RMF with use_sim_time set to false from OSRF’s repository , (which does not have the ResponsiveWait feature added yet if I’m not wrong) and I did not face this issue. However when I used it with the later version of RMF from Open-RMF I faced the same issue caused by the 2 path request sent to the robot due to the ResponsiveWait feature.

Additionally I believe you are running this in simulation rather than in real life? Otherwise, I believe your clocks would most probably be synced by the computer’s clock with Unix time and this issue would not have occured? If your are running a simulation, my solution to syncing the time between ROS1 and ROS2 was to run a ROS1_bridge to bridge the /clock topic which solved the issue for me.

I have actually forked a copy of free fleet (GitHub - siot-decada-robotics/free_fleet: A free fleet management system.) which has some instructions to run RMF and FreeFleet together with RMF in simulation. Although there are a few “hacky” methods used to get it to work such as the syncing of the /clock topic with the ROS1_bridge and running

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/rmf_ws/install/rmf_door_msgs/lib:~/rmf_ws/install/rmf_building_sim_gazebo_plugins/lib:~/rmf_ws/install/rmf_building_sim_common/lib:/opt/ros/foxy/lib

before launching the Simulation with ROS1 in order to get gazebo to run the ROS2 plugins for the doors and lifts.

Additionally, I was able to run RMF with Free Fleet in real life as well using what is currently available on the repositories , with multiple Turtlebot3s running with ROS1 , just by tweaking certain parameters in the launch files of the Fleet Adapter, Free Fleet Server and the Free Fleet Client.

Please do correct me if I’m giving poor advice here thanks.


Edited by @lkw303 at 2021-07-29T18:32:15Z

Posted by @mxgrey:

Are you asking how to do RMF integration for a robot that operates entirely in free space?

If so, that’s an ongoing effort that we’re undertaking. The main challenge is that it requires fast time-configuration space motion planning through free space in the presence of moving obstacles. That type of motion planning is an active area of research, so it’s not well supported by many existing software libraries.

Our goal for this is to implement RMF integration directly into the ros2 nav2 stack, but I don’t anticipate that being finished for another year.

In the meantime, you could try giving the fleet adapter a highly connective nav graph that thoroughly covers the free space of your environment, and then allow the nav stack to deviate somewhat around obstacles. Unless you have very specific navigation needs, I think this should work pretty well.

Posted by @sachinkum0009:

Okay, Thank you.
I will wait for RMF integration with the ros2 nav2 stack.

Posted by @ItamarEliakim-R:

Hi @sachinkum0009 - Any insights about integrating the NAV2 stack into the RMF?
Do you run by the waypoint follower plugin? or standard point-to-point navigation as the current RMF?

Posted by @Yadunund:

Do you run by the waypoint follower plugin? or standard point-to-point navigation as the current RMF?

It depends on how your fleet adapter is written. free_fleet_client right now receives a list of waypoints that the robot should move through but it stores these waypoints in a queue and sends out individual goal poses to nav2. For such an integration the standard navigate_to_pose plugin on the nav2 side is sufficient. But if you don’t rely on free_fleet and choose to write your own adapter, you could just forward the list of waypoints in the follow_new_path() to your nav2 robot that has the navigtate_through_poses plugin loaded.

Posted by @ItamarEliakim-R:

Wonderful. Thanks @Yadunund