Fleet adapter stops sending any requests upon reaching certain waypoints. (#210)

Posted by @IshaaanVyas:

Configuration

  • Laptop with Ubuntu 20.04 and Galactic+Noetic installed
  • Using a real robot (similar to turtlebot) and using free fleet client and server to relay messages from the fleet adapter to the robot

I am using the same full control fleet adapter as used in the rmf_demos (the one from here: rmf_ros2/rmf_fleet_adapter/launch/fleet_adapter.launch.xml at main · open-rmf/rmf_ros2 · GitHub ) which sends /robot_path_requests to my free fleet server and subscribes to /fleet_states .

Problem

Upon reaching certain waypoints in my map (other waypoints seem to be fine most of the time but this problem sometimes on them also) the fleet adapter stops sending any new path requests under /robot_path_requests (no /robot_destination_requests or /robot_mode_requests being sent to the free fleet server either) and this happens even when I am sending it a new task.

I have confirmed that the robot has correctly reached the waypoint and also that the /fleet_states of the robot have an empty path which I think means that the fleet adapter understands that the robot has reached his position (not very sure)? Moreover, normally when the robot reaches a waypoint and this error doesn’t occur, there is a message when I submit a new request to it such as:

[full_control-1] [INFO] [1661998969.526974945] [k_fleet_adapter]: Beginning new task [patrol.dispatch-1] for [k_fleet/robot]. Remaining queue size: 0

However, when this error is occurring this does not show from the fleet adapter.

I have confirmed that the robot has reached the location properly and the free fleet client does print out that it has succeeded, but it doesn’t get any new requests. Here is the /fleet_states that are printed out when this error occur:

---
name: k_fleet
robots:
- name: robot
  model: robot_model
  task_id: '7'
  seq: 0
  mode:
    mode: 0
    mode_request_id: 0
  battery_percent: 100.0
  location:
    t:
      sec: 1661999287
      nanosec: 112484873
    x: 31.029001235961914
    y: -8.669319152832031
    yaw: -0.040468599647283554
    obey_approach_speed_limit: false
    approach_speed_limit: 0.0
    level_name: L2
    index: 0
  path: []
---

Any help regarding how I could debug this would be greatly appreciated as right now I am abit clueless to why this is happening. I have attached a .txt file which contains the .building.yaml information about the map I am testing on : office.txt
I am trying to mimic multiple floors using only a single floor and have set up a mock lift node that correctly goes from L1 and L2 and transports the robot. The problem usually occurs in the production waypoint, however I have noticed it sometimes occurs in other waypoints as well.


Edited by @IshaaanVyas at 2022-09-01T03:49:14Z

Posted by @Yadunund:

I have confirmed that the robot has reached the location properly and the free fleet client does print out that it has succeeded, but it doesn’t get any new requests.

Sorry maybe I’m not understanding the problem correctly but is the issue that when the robot is in the middle of performing a task, it reaches certain intermediate waypoints but then doesn’t receive PathRequest messages to continue with the rest of the itinerary?
Or is it that after a robot completes a task, it fails to receive any subsequent PathRequest messages for new tasks that may have begun?

Posted by @IshaaanVyas:

Hi, this issue occurs after the robot completes a task. The fleet adapter does not send any PathRequest message to the FreeFleet Server even when I assign a new task to the robot (There is only one robot in the fleet I am testing on). However, when I restart the fleet adapter and then send new tasks for the robot, the fleet adapter does indeed send PathRequest and everything works fine after restarting.

Posted by @Yadunund:

However, when I restart the fleet adapter and then send new tasks for the robot, the fleet adapter does indeed send PathRequest and everything works fine after restarting.

To clarify, is this the sequence of events. a) You send a task to your robot which is at L1 and it reaches production waypoint on L2 but then stops receiving commands for new tasks (can you confirm that the task was marked complete?). b) You kill and start the adapter while the robot is at the same waypoint c) The robot can receive new commands after restart.

Posted by @IshaaanVyas:

Yes, that is the sequence of events. However, I am not sure how to make sure that the task is marked completed.

From what I knew about the fleet adapter, the task is marked as done once the fleet_states show an empty path? From the Fleet adapter side I’m not sure how to confirm that it has marked the task complete, does it publish a topic or show any ROS_INFO msgs when it thinks that the task is complete?

Posted by @Yadunund:

Apologies for the late follow-up.
Are you able to share your navgraph with us? The building.yaml file would be even better.


Edited by @Yadunund at 2022-09-20T15:13:46Z

Posted by @IshaaanVyas:

Heres the building.yaml file: (It’s in txt format cause I couldn’t figure out how to attach other type of files on github)
office.txt