open-rmf / rmf_ros2

Internal ROS infrastructure for RMF
Apache License 2.0
74 stars 60 forks source link

[Other issue]: Unable to compute a location on the navigation graph for robot [robot_1] being added to fleet [robot_fleet] using map [ground_floor] ... #391

Closed tomkimsour closed 3 weeks ago

tomkimsour commented 3 weeks ago

Before proceeding, is there an existing issue or discussion for this?

Description

I am looking for instructions on how to fix the following issue the error raised by this message.

Unable to compute a location on the navigation graph for robot [robot_1] being added to fleet [robot_fleet] using map [ground_floor] and position [19.982, -9.426, 0.236] 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.
mxgrey commented 3 weeks ago

Take a look at the nav graph on ground_floor and check what vertices are close to the coordinates { x = 19.982, y = -9.426 }. If there are no vertices reasonably close to those coordinates then either you're initializing your robot very far from your nav graph elements or there is something wrong with the transformation that you're using to convert between robot and RMF coordinates.

If you do find a vertex that's reasonably close to those coordinates then you may have a lane_merge_distance value that's too small (the default is 1.0m). Make sure the value for lane_merge_distance is essentially how far the robot is allowed to be from a nav graph element (lane or vertex) while still being allowed to use that element.

tomkimsour commented 3 weeks ago

I think what I have wrong is the transformation between rmf coordinates and my map coordinates. How can I find the transformation matrix between the two ? Is there a way to get it from the traffic_editor ?

tomkimsour commented 3 weeks ago

[Solved] To solve it I followed the following steps :

reference_coordinates: ground_floor: rmf: [[spawn_waypoint.x, spawn_waypoint.y]] # replace spawn_waypoint.x and spawn_waypoint.y by the waypoint coordinates from the nav_graph or traffic-editor. robot: [[0.0, 0.0]]