open-rmf / free_fleet

A free fleet management system.
Apache License 2.0
156 stars 65 forks source link

Nav2 robot sometimes do not move immediately when sending task from RMF. #119

Closed shifsa closed 1 year ago

shifsa commented 2 years ago

Bug report

Required information:

Description of the bug

Sometimes robot does not move immediately when a task is sent from the RMF.

Steps to reproduce the bug

  1. I am using FreeFleet to connect RMF with Turtlebot3 running on Navigation2 on Gazebo.
  2. I send Loop task from RMF Panel to its Turtlebot3.

Expected behavior

Turtlebot3 on Gazebo is moving quickly.

Actual behavior

After a short time, the robot begins to move.

Screenshots

Additional information

Looking at /fleet_states topic, there is an instruction set to wait in place for 30 seconds (Responsive Wait?) when I have not sent a task from RMF. I am assuming that the robot is stuck until it completes.

aaronchongth commented 2 years ago

Hello @shifsa! Could you elaborate a little more on the issue, perhaps how long did it take for the robot to start moving in these scenarios?

As for Responsive Wait, it is a mechanism in RMF that allows for re-routing these stationary robots (after it has completed its task and the finishing task is nothing), to allow other robots to pass through those lanes and waypoints. These Responsive Wait tasks, should be overwritten by new incoming tasks without the need to wait for it to be completed. In your scenario, is it the case that the robot waits for 30 seconds before it starts moving?

shifsa commented 2 years ago

Each time I submit a task, the time it takes for the robot to start moving varies.(max 30 seconds) When I do not submit a task, the FreeFleet log shows the following. [free_fleet_client_ros2-2] [INFO] [1660801148.050725901] [turtlebot3_burger1.turtlebot3_free_fleet_client_node]: we reached our goal early! Waiting 29.33 more seconds As long as this log is displayed, the robot does not move even if I send a task. Only the yellow ball of rmf_visualization starts moving.

After that, when the following log appears, the yellow ball reverts to a purple ball and the robot on Gazebo begins to move. [free_fleet_client_ros2-2] [INFO] [1660801179.552140857] [turtlebot3_burger1.turtlebot3_free_fleet_client_node]: we reached our goal early! Waiting 0.01 more seconds

shifsa commented 2 years ago

Hello, @aaronchongth . The video below recreates the situation.

https://user-images.githubusercontent.com/111342933/187632490-d081b51a-c317-48a1-90ec-2e995d4aa8a8.mp4

aaronchongth commented 1 year ago

Hello @shifsa! I am able to replicate what you were facing, and I believe I have found a fix, https://github.com/open-rmf/free_fleet/pull/120.

My preliminary tests look good at the moment. Let me know if you still face issues with this fix.

shifsa commented 1 year ago

Hello, @aaronchongth . Thanks for fixing the code. It now works properly here too!