Troubleshooting
Overpass API errors
Rate limiting (HTTP 429 / 404)
The Overpass API enforces per-IP rate limits. If a request is rejected, map_data automatically backs off and retries on an alternate endpoint. If you see repeated failures in the log:
- Wait a few minutes before retrying.
- Avoid running multiple
create_mapdatacalls in parallel. - Consider hosting a local Overpass API instance for high-volume use.
Query timeout (HTTP 504)
Overpass imposes a default query timeout. Very large bounding boxes (many kilometres across) may exceed it. Reduce the query area by using a shorter GPX route or decreasing osm_margin in config/planner_defaults.yaml.
No features returned
If md.footways_list or md.roads_list is empty after run_all(), the bounding box may be in an area with sparse OSM coverage. Verify the coverage on openstreetmap.org before debugging the code.
GPX parsing failures
MapData(coords="...", coords_type="file") raises "No points (waypoints, tracks or routes) found"
MapData reads <wpt> elements if the file has any, otherwise falls back to <trkpt> (tracks) and then <rtept> (routes) — see GPX waypoint format. Confirm the file contains at least one of these element types.
Path planning returns None or False
GraphPlanner.plan() returns None
The start or goal point could not be snapped to the road/footway graph. This happens when:
- The input waypoints are outside the loaded
.mapdatabounding box. - The requested
highway_types(e.g.["footway"]) do not include ways that reach both endpoints. - The two endpoints are in disconnected graph components.
Try widening the highway_types list to include "road" or check the map in the viewer to confirm that ways connect the two points.
ReplanPath.replan() returns False
No collision-free path exists between two consecutive waypoints given the current obstacle inflation. Try:
- Reducing
inflate_obstacles(e.g. from0.25to0.1). - Increasing
cell_sizeto coarsen the grid and allow the planner to find routes through narrow gaps. - Opening the viewer and verifying that the barriers do not completely block the corridor.
ReplanPath.replan() returns None
The planning request was cancelled via cancel_replan_backend(). This is expected behaviour when the viewer starts a new plan before the previous one finishes.
Viewer issues
Flask server fails to start
- Check that port
5000is not already in use:lsof -i :5000. - If you see
ImportError: cannot import name 'rclpy', you are running the viewer from within a ROS2 workspace whererclpywas expected. The viewer itself does not require ROS2. Run the viewer directly:
Viewer shows a blank map
The Leaflet tile layer requires internet access to load the OpenStreetMap basemap. The vector overlays (roads, footways, barriers) are served locally and will still appear. If the background is blank but features are visible, the tile server is unreachable from your network.
Annotations not saving
Annotation files are written to the same directory as the .mapdata file. If the directory is read-only (e.g. inside a ROS2 install prefix), saving will silently fail. Run the viewer from a directory where you have write permission, or copy the .mapdata file to a writable location first.
ROS2 node errors
create_mapdata not found
The command is installed with the package. Standalone, pip install -e . puts it on
your PATH directly. In a ROS2 workspace, build with colcon and source the workspace:
After that, use ros2 run map_data create_mapdata ....
osm_cloud does not publish
- Check that a
.mapdatafile path is set via themapdata_fileROS2 parameter. - Verify the placement frames are correct — the node transforms the point cloud into
local_frame. Until that transform is available in TF (utm → local_framefortransform_modetf,earth_frame → local_frameforgeodetic), the node logsFailed to get ... transformevery 10 s and publishes nothing. It picks the transform up as soon as it arrives; no restart is needed. - Run
ros2 topic listand confirm thegridtopic (or whatevergrid_topicis set to) is present.
osm_cloud publishes an empty cloud
The log says Grid is empty although the map has N way points or, in older versions, printed a (0, 4) shape and an FP_ENU0 origin at lat=180.0000000 lon=0.0000000 alt=-6378137.0.
That origin is the centre of the Earth: the earth_frame → local_frame transform was all zeros. A Fixposition unit publishes FP_ECEF → FP_ENU0 as zeros until it has a fusion fix, and transform_mode: geodetic then works at an altitude of -6378 km, which collapses the whole map into a metre-wide box — no grid cell ends up within max_path_dist of a way.
The node now rejects such a transform and waits for a real one, and never publishes an empty cloud over a map that has ways. If you see it on an older build, restart osm_cloud once the GNSS/INS unit has a fix (ros2 topic echo /tf_static should show a FP_ECEF → FP_ENU0 translation of several million metres, not zeros).
.mapdata file issues
MapData.load() raises ValueError or JSONDecodeError
The file may be truncated (interrupted write) or a legacy pickle file (detected by a 0x80 header byte). Support for the legacy pickle format has been removed for security reasons.
If you have a legacy file, you must re-run create_mapdata to regenerate it in the JSON format or parse the GPX/YAML file through the web viewer.
UTM zone boundary warning
If the log prints WARNING: ways span multiple UTM zones, the .mapdata bounding box crosses a zone boundary. Path planning will still work, but geometry accuracy degrades near the boundary because all features are projected into a single UTM zone. For affected areas, consider splitting the route into segments that stay within one zone.