Add map analysis tool for nav2 #210
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Added a map analysis tool that allows the LLM to directly read and utilize Nav2 map data, and implemented read/write tools for semantic maps.
Added tools
get_verified_maps_listget_verified_maps_infowrite_map_locationdraw_map_axesanalyze_previously_received_mapRequired Modifications for This Tool
subscribe_once&subscribe_durationmsg_typeas an additional parameter toparse_input.parse_inputmsg_typeends withOccupancyGrid, call theparse_mapfunction.parse_mapOccupancyGridvalues (0 = free, −1 = unknown, 100 = occupied) are mapped to grayscale intensities (127, 255, and 0) and export the result as an image(received_map.png).How to Use
When Nav2 is running, providing the LLM with scripts such as ‘retrieve the map image and draw the axes’ or ‘fetch the map image’ causes it to invoke the given tools. Through these tools, the LLM can analyze the map image data and understand the map’s structure and coordinate system.
Example 1 : Analyze the map image to determine what kind of space this is.
Example 2 : Interpret the user’s requested destination, calculate its coordinates, and navigate to that point.