Posted by @akshay-ka:
Hello,
I’m integrating my custom robots (runs on ros2) with rmf
using free_fleet
package.
Currently, I’m dispatching a patrol
task through cli. However, i get the AttributeError
in the log while the robot is navigating. Because of this, the robot starts to rotate in place wherever it is located.
Here is the log for the same.
Could anyone provide guidance as to why this issue occurs and how to solve this issue ? Any help would be appreciated,
Posted by @aaronchongth:
This is the root cause gist:2ca6b83e3c59828d80be7486db557680 · GitHub, which might mean that either the robot stopped communicating with the fleet adapter, or there may be a difference in expectation of time, make sure that all your RMF components are running with use_sim_time:=False
, check the launch files etc. Let me loop in @xiyuoh to check if my understanding is correct.
I’m a little suspicious about the execution being None though, a race condition between navigate
and stop
should not be possible. Did you make any modifications to the free fleet adapter python package? If so, can you share what you did? Otherwise, you can see the line number mentioned in your logs, and debug from there too on your end
Posted by @aaronchongth:
For more context, I’ve added more testing here, CI: Test for task completion by aaronchongth · Pull Request #191 · open-rmf/free_fleet · GitHub, which checks for the completion of a navigation task. Which gives me the suspicion that a real robot may be failing due to still having the sim time setting
Posted by @akshay-ka:
@aaronchongth thanks for the comprehensive reply. I will check the use_sim_time:=False
argument in all of the launch files. I’m also suspicious that this might be the root cause.
Did you make any modifications to the free fleet adapter python package? If so, can you share what you did?
No, I haven’t done any modifications to the fleet adapter python package.
Posted by @xiyuoh:
The unresponsive output comes from MoveRobot, which indicates that the navigation call might have been dropped somehow. That along with self.execution
being read as None
after it was checked suggests that we might not be keeping track of our variables (self.execution
and self.nav_goal_id
) well enough for edge cases. It’s possible that this part of the code is stuck in an impossible loop (execution not None
initially, but set to None
later), and failed to provide updates to RMF via self.update_handle.update()
with a valid activity identifier.
I adopted a strategy from fleet_adapter_mir to bundle them in a NavigationHandle
in this branch of free fleet, but have not had the chance to test/validate it in sim. @akshay-ka if you’re able to help test out whether it improves the behavior that’d be great. Otherwise it’d help to add debug output to the points of failure to further investigate what’s happening.
Posted by @akshay-ka:
@xiyuoh sure. I will test out and will get back with the results.
Posted by @akshay-ka:
@xiyuoh I tested the free_fleet
package with xiyu/execution
branch. I could not see the error 'NoneType' object has no attribute 'identifier'
as of now. But i get the below error.
[fleet_adapter.py-1] [INFO] [1746515400.004918733] [diadems_fleet_adapter]: Succesfully connected to ws://localhost:8000/_internal
[fleet_adapter.py-1] [INFO] [1746515400.005060026] [diadems_fleet_adapter]: Connected to server
[fleet_adapter.py-1] [INFO] [1746515400.005091135] [diadems_fleet_adapter]: Sent all updates
[fleet_adapter.py-1] [INFO] [1746515400.005112942] [diadems_fleet_adapter]: Attempting queue flush if connected
[fleet_adapter.py-1] [INFO] [1746515400.007173654] [diadems_command_handle]: Initializing robot [diadem]…
[fleet_adapter.py-1] [INFO] [1746515401.008791981] [diadems_command_handle]: Unable to get transform between base_link and map: <class ‘tf2.ExtrapolationException’>: Lookup would require extrapolation into the past. Requested time 1746445421.581712 but the earliest data is at time 1746445421.635453, when looking up transform from frame [diadem/base_link] to frame [diadem/map]
[fleet_adapter.py-1] [INFO] [1746515401.009451986] [diadems_command_handle]: Failed to update robot [diadem]: Unable to get transform between base_link and map
[fleet_adapter.py-1] [INFO] [1746515402.008204022] [diadems_fleet_adapter]: Adding robot [diadem] to fleet [diadems].
[fleet_adapter.py-1] [ERROR] [1746515402.008322312] [diadems_fleet_adapter]: Unable to compute a location on the navigation graph for robot [diadem] being added to fleet [diadems] using map [L1] and position [42.162, -37.633, 1.493] specified in the initial_state argument. This can happen if the map in initial_state does not match any of the map names in the navigation graph supplied or if the position reported in the initial_state is far way from the navigation graph. This robot will not be added to the fleet.
[fleet_adapter.py-1] Starting fleet adapter…
[fleet_adapter.py-1] Traceback (most recent call last):
[fleet_adapter.py-1] File “/home/akshaya/rmf_ws/install/free_fleet_adapter/lib/free_fleet_adapter/fleet_adapter.py”, line 277, in
[fleet_adapter.py-1] main(sys.argv)
[fleet_adapter.py-1] File “/home/akshaya/rmf_ws/install/free_fleet_adapter/lib/free_fleet_adapter/fleet_adapter.py”, line 264, in main
[fleet_adapter.py-1] start_fleet_adapter(
[fleet_adapter.py-1] File “/home/akshaya/rmf_ws/install/free_fleet_adapter/lib/free_fleet_adapter/fleet_adapter.py”, line 146, in start_fleet_adapter
[fleet_adapter.py-1] robots[robot_name] = Nav2RobotAdapter(
[fleet_adapter.py-1] ^^^^^^^^^^^^^^^^^
[fleet_adapter.py-1] File “/home/akshaya/rmf_ws/install/free_fleet_adapter/lib/python3.12/site-packages/free_fleet_adapter/nav2_robot_adapter.py”, line 228, in init
[fleet_adapter.py-1] f’[{self.fleet_handle.more().fleet_name()}], this is most ’
[fleet_adapter.py-1] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[fleet_adapter.py-1] TypeError: ‘str’ object is not callable
Why do I get TypeError: 'str' object is not callable
error.
Why can’t I see the complete error message, which is rooted here.
If I’m not wrong, it is a bug in the code.
Posted by @aaronchongth:
Yeah looks like a mistake from Add robots to fleet during construction/initialization of robot adapters by aaronchongth · Pull Request #179 · open-rmf/free_fleet · GitHub. We’ll fix it upstream, thanks for pointing it out.
In the meantime, just make this change and you can continue testing
- f'[{self.fleet_handle.more().fleet_name()}], this is most ' \
+ f'[{self.fleet_handle.more().fleet_name}], this is most ' \
Since your code execution actually got to that point, it means there might have been a configuration error again, where the fleet is failing to add the robot. Please also double check your configuration
Posted by @akshay-ka:
Since your code execution actually got to that point, it means there might have been a configuration error again, where the fleet is failing to add the robot. Please also double check your configuration.
I get the configuration error when the robot is actually in a different place than where it is in the map. I can fix that. It’s not an issue.
Edited by @akshay-ka at 2025-05-06T11:47:46Z
Posted by @aaronchongth:
Thanks @xiyuoh for getting the fix in, Use NavigationHandle to keep goal id and execution in sync by xiyuoh · Pull Request #193 · open-rmf/free_fleet · GitHub. The tip of main
should not encounter the issue of goal IDs and executions falling out of sync now.