# Fleet\_Adapter\_template - Reference Coordinates (#336)

**URL:** <https://discourse.openrobotics.org/t/fleet-adapter-template-reference-coordinates-336/44815>\
**Category:** Open-RMF General\
**Tags:** rmf-github-discuss\
**Created:** [April 20, 2023, 7:54am UTC](https://discourse.openrobotics.org/t/fleet-adapter-template-reference-coordinates-336/44815 "2023-04-20T07:54:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Archive-o-matic](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/archive-o-matic/32/26074_2.png) [@Archive-o-matic](https://discourse.openrobotics.org/u/Archive-o-matic)\
**Post date:** [April 20, 2023, 7:54am UTC](https://discourse.openrobotics.org/t/fleet-adapter-template-reference-coordinates-336/44815/1 "2023-04-20T07:54:38Z")

</div>

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.

```auto
  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

```auto
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.

```auto
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

 ![traffic-editor](https://us1.discourse-cdn.com/flex022/uploads/ros/original/3X/6/1/618c8f226de01794907e9c97006f039fb6ef2269.png)

# RMF visualizer

 ![Screenshot from 2023-04-19 13-43-56](https://us1.discourse-cdn.com/flex022/uploads/ros/original/3X/a/d/adf13fb4695bdff3090d9288f277fd07ff8ace17.png)
