Posted by @MatteoCarlone:
Bug report
Required information:
- Operating system and version:
- Ubuntu 22.04
- OpenRMF installation type:
- from binaries
- ROS distribution and version:
- Humble
- ROS installation type:
- from binaries
Description of the bug
I’m working on a custom Gazebo simulation with a Create3 robot in the environment. When I start the fleet adapter, which was created using the RMF template, it immediately begins calling follow_new_path. Based on my observations, it appears that the robot is pointing towards the waypoint that has been marked as is_charger=true in the traffic editor. But it’s hard to be sure of it because the coordinates are incorrect, and I suspect that this is due to a misunderstanding of the reference-coordinates section in the config.yaml file.
rmf: [[0.95, -3.25],
[2.25, -3.25],
[2.25,-1.95]]
robot: [[0, 0],
[1.2457013826654046, -0.1243205100731805],
[1.5697037540852987, 0.9532722518789413]]
by referring to this structure, I put in the rmf part the waypoints coordinates in meter taken from the traffic-editor, while in the robot part I’m putting the x,y coordinates of the robot when is on the waypoint taken manually from the /odom topic
here you can see the fleet-adapter terminal output with the transformations
Starting fleet adapter...
[INFO] [1681904574.930020318] [MCI_Fleet_fleet_adapter]: Parameter [discovery_timeout] set to: 60.000000
[INFO] [1681904589.284921349] [MCI_Fleet_fleet_adapter]: Registering to query topic rmf_traffic/query_update_1
[INFO] [1681904589.449019689] [MCI_Fleet_fleet_adapter]: Mirror handling new sync of 1 queries from schedule node [39ea4340-a828-4917-9c73-2a6943e1c757]
[INFO] [1681904590.428334384] [MCI_Fleet_command_handle]: Finishing request: [park]
[INFO] [1681904590.428594882] [MCI_Fleet_command_handle]: Fleet [MCI_Fleet] is configured to perform Loop tasks
Coordinate transformation error: 0.00567777950908422
RMF to Robot transform:
rotation:-0.2162698119397662
scale:0.9542034897897995
trans:[-0.17787763251966765, 3.2733617449338306]
Robot to RMF transform:
rotation:0.21626981193976635
scale:1.0393654872351952
trans:[0.92560600286611, -3.3064824613342774]
['robot2']
Successfully able to query API server
[INFO] [1681904590.859781105] [MCI_Fleet_command_handle]: Initializing robot: robot2
[INFO] [1681904590.860358745] [MCI_Fleet_command_handle]: Using provided initial waypoint [{initial_waypoint}] and orientation [0.00] to initialize starts for robot [robot2]
[INFO] [1681904590.860930689] [MCI_Fleet_command_handle]: The robot is starting at: [0.00, 0.00, 0.00]
[INFO] [1681904590.861322768] [MCI_Fleet_command_handle]: Successfully added new robot: robot2
[INFO] [1681904590.861884357] [MCI_Fleet_fleet_adapter]: Added a robot named [robot2] with participant ID [0]
Here instead you can see that once the fleetadapter starts, a follow_new_path is called even if i’m not submitting tasks, I think it’s because rmf wants to charge the robot but and don’t get how to change this behaviour.
CALLED FOLLOW NEW PATH
[INFO] [1681904590.863412152] [MCI_Fleet_command_handle]: Requesting robot to stop...
[INFO] [1681904590.893593749] [basic_navigator]: Canceling current goal.
STOP
[INFO] [1681904590.894001426] [MCI_Fleet_command_handle]: Received new path to follow...
4.146400706939655
-62.09172834181489
-0.2162698119397662
geometry_msgs.msg.Point(x=4.146400706939655, y=-62.09172834181489, z=0.0)
[INFO] [1681904590.895045879] [basic_navigator]: Navigating to goal: 4.146400706939655 -62.09172834181489...
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
[INFO] [1681904592.864103716] [MCI_Fleet_command_handle]: Setting max delay to 30.0s
[INFO] [1681904592.864239196] [MCI_Fleet_fleet_adapter]: Charger waypoint for robot [robot2] set to index [1]
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
Estimated time of arrival: 0 seconds.
[INFO] [1681904600.863338542] [MCI_Fleet_fleet_adapter]: Replanning requested for [MCI_Fleet/robot2]
[INFO] [1681904600.865485507] [MCI_Fleet_command_handle]: Requesting robot to stop...
#Traffic editor