PAPER DEEP DIVE
Spatial and Semantic Reasoning for LLM-Driven Robot Navigation via MCP
Large language models (LLMs) are increasingly used as natural-language interfaces for robotic systems, yet their integration with Robot Operating System (ROS)-based navigation remains limited by two gaps. First, navigation data such as occupancy grids are represented as raw geometric messages that are difficult for LLMs to use directly as spatial or semantic context. Second, adding LLM-driven capabilities often requires custom wrappers or robot-specific interfaces, limiting reuse across systems. To address these challenges, we propose a non-invasive framework that connects LLM reasoning with ROS-based navigation through a navigation-oriented representation layer, exposed through the Model Context Protocol (MCP) as standardized, reusable tools so that any MCP-compatible LLM can access them without robot-specific wrappers. The visual map modules transform occupancy grids into metric, pose-aware images for goal reasoning, while the semantic annotation modules record waypoint-level observations with robot poses. We evaluate the framework on three tasks: autonomous mapping, spatial reasoning-based navigation, and semantic reasoning-based navigation. The results show that the evaluated LLM backends use these representations to achieve over 97% map coverage and select spatial or semantic navigation targets from natural-language instructions in a simulated indoor environment. This demonstrates representation-mediated LLM navigation without modifying the existing ROS navigation stack.
Paper Metadata
Authors: Jungsoo Lee, Jaegyun Park, and Wansoo Kim
Publication: arXiv preprint, September 23, 2026, primary category cs.RO.
Paper: https://arxiv.org/abs/2609.27340
Code status: The authors do not provide a public repository for their complete implementation. The paper uses the open-source ROS-MCP Server as its generic communication substrate under the Apache-2.0 license. This review inspected commit 476591ac058f58cae810cc775e50b51f8d3d757c.
One-Sentence Summary
The paper converts ROS occupancy grids and camera observations into a metric, pose-aware map image and waypoint-level semantic records, exposes these representations as MCP tools, and leaves the existing SLAM and Nav2 stack unchanged while an LLM performs exploration, spatial target selection, and semantic navigation.
Background and Motivation
Large language models are increasingly presented as natural-language interfaces for robots. A typical integration exposes topics, services, or actions as callable functions and lets the model transform an instruction into a command. That arrangement solves access control and tool syntax, but it does not settle a more difficult question in navigation: what should the model know about the physical environment before it can choose a sensible destination?
ROS navigation maps are usually represented as nav_msgs/OccupancyGrid messages. The message contains a dense two-dimensional array whose cells encode unknown space, free space, or estimated occupancy. Engineers can inspect the array through visualization software, but serializing the same array as text gives a language model a long list of integers with weak cues about scale, adjacency, the robot pose, and the boundary between rooms. A larger prompt therefore does not necessarily produce a better spatial decision.
Another body of work creates topological graphs, semantic maps, frontier selectors, or navigation-specific memory modules. These representations can be effective, but they often become part of a new end-to-end navigation pipeline. A robot that already runs Cartographer or SLAM Toolbox together with Nav2 would need to replace or deeply modify mature components, reducing reuse and making deployment more difficult.
MCP offers a different boundary. An LLM client can call external tools through a standardized client-server protocol, without binding the server to one model vendor. Generic ROS-MCP tools allow a model to inspect raw ROS resources and send goals. They still do not define which navigation data should be exposed, in what format, or how observations should be accumulated. The contribution of this paper lies in that representation layer.
The authors describe their framework as non-invasive. Cartographer continues to build the map, Nav2 continues to plan paths, avoid obstacles, and track trajectories, and the LLM chooses what information to inspect and where to go. This division of labor makes the contribution primarily a study of representation and tool boundaries rather than a new low-level controller.
Prerequisites
An occupancy grid discretizes a continuous workspace into regular cells. Its metadata includes resolution, width, height, and origin, so a faithful representation cannot be only a bitmap. The pixel geometry must be associated with a metric frame and a robot pose. Without these references, a model may recognize the shape of a corridor but cannot reliably compare room dimensions or convert an image location into a navigation goal.
MCP provides a common tool interface for model clients and servers. A callable tool declares a schema, receives arguments, performs an external operation, and returns text, structured values, or image content. In this paper, the map and semantic functions are MCP tools layered over rosbridge communication to ROS topics, services, and actions.
Cartographer and Nav2 play separate roles. Cartographer estimates the map from LiDAR, while Nav2 receives a target pose and performs planning and control. The evaluated policy emerges from the interaction among the model, the map representation, the semantic store, and the navigation stack. A failure can therefore originate in model reasoning, missing observations, incorrect labels, inaccurate localization, or the underlying planner.
Method
System Boundary: Representation Above, Execution Below
The system starts with a user instruction. An MCP client passes the task to a multimodal LLM, which can call two groups of tools. The first group exposes generic ROS inspection and communication, including reading topics and sending navigation goals. The second group contains the paper's navigation-oriented representation tools for map images and semantic waypoint records.
The separation has a practical consequence. The model does not generate wheel velocities or patch the navigation controller. It produces an interpretation of the environment and a target pose. Nav2 remains responsible for feasibility, local planning, obstacle avoidance, and trajectory execution. This is why the approach can be added to another ROS robot if equivalent topics, services, actions, and camera streams are available.
Occupancy Values Become a Structured Grayscale Image
The subscribe_map_as_image tool reshapes the occupancy array into a two-dimensional grid. Each cell value $g$ belongs to $\{-1,0,1,\ldots,100\}$. Negative one represents unknown space, zero represents free space, and positive values encode increasing occupancy probability. The mapping to grayscale intensity is:
$$ I(g)= \begin{cases} 127, & g=-1,\\ 255, & g=0,\\ 255(1-g/100), & 1\leq g\leq 100. \end{cases} $$
Unknown cells appear gray, free cells appear white, and occupied cells become darker as their probability rises. This preserves the visible geometry of walls, shelves, doorways, corridors, and unexplored regions. It also aligns the input with the strengths of a multimodal model, which can inspect spatial relations in an image more naturally than a long array of cell values.
ROS map coordinates and image coordinates do not share the same vertical direction, so the generated image is flipped vertically. If this convention is ignored, the model reasons over a mirrored floor plan and may estimate the correct relative room size while sending the goal to the wrong place. The underlying ROS-MCP subscribe_once() function sends a rosbridge subscribe request, parses the first matching publication, and unsubscribes. When the payload is an image, it is returned as MCP ImageContent.
subscribe_msg = {
"op": "subscribe",
"topic": topic,
"type": msg_type,
"queue_length": queue_length,
"throttle_rate": throttle_rate_ms,
}
ws_manager.send(subscribe_msg)
# After the first matching publication:
ws_manager.send({"op": "unsubscribe", "topic": topic})
This behavior is implemented in ros_mcp/tools/topics.py, approximately lines 283 to 409 of the inspected ROS-MCP commit. The paper contributes the navigation-specific conversion around these communication primitives, not the primitive itself.
Metric Scale, Origin, and Image Projection
A grayscale bitmap still lacks enough information for reliable room-size reasoning. The paper reads map width $W$, height $H$, resolution $r$, and origin $(x_o,y_o)$. The physical extents follow directly:
$$ L_x=Wr,\qquad L_y=Hr. $$
Here $L_x$ and $L_y$ are measured in meters and $r$ is the size of one cell. The equation gives the image a metric interpretation. A room is no longer described only as a set of pixels; it can be compared with another room using an explicit physical unit.
A world point $(x,y)$ is projected to image coordinates $(u,v)$ through:
$$ u=\frac{x-x_o}{r},\qquad v=H-\frac{y-y_o}{r}. $$
The horizontal component converts the offset from the map origin into cells. The vertical component also flips the direction of the $y$-axis. The world origin appears at:
$$ u_0=\frac{-x_o}{r},\qquad v_0=H-\frac{-y_o}{r}. $$
These are not cosmetic plotting details. They determine whether a model can translate a visual target into a pose that Nav2 interprets in the same frame. A sign error in the origin or a missing flip can produce a plausible-looking explanation followed by a goal on the wrong side of the building.
Adaptive Grid Spacing and Robot Heading
A fixed pixel interval does not work across maps of different sizes. Dense spacing can obscure a large warehouse, while sparse spacing gives a small room almost no reference lines. The authors choose a base interval from the shorter physical side:
$$ s_{\mathrm{base}} =\max\left(\frac{L_s}{N},r\right),\qquad L_s=\min(L_x,L_y),\qquad N\approx 15. $$
The maximum operation prevents the overlay from becoming finer than the original map resolution. The resulting spacing is then mapped to a convenient metric interval. The model sees roughly comparable numbers of labeled grid lines even when the map extent changes, which makes room-width estimates less dependent on image resolution alone.
The draw_robot_pose tool adds the pose $(x,y,\theta)$ as an oriented arrow. For a local arrow point $(l_x,l_y)$, the image displacement is:
$$ \Delta col=l_x\cos\theta-l_y\sin\theta, \qquad \Delta row=-(l_x\sin\theta+l_y\cos\theta). $$
This rotates the robot-frame arrow into the map frame and applies the vertical flip. The resulting image tells the model not only where the robot is, but which direction it faces. During exploration this helps select a yaw that looks toward the most informative unexplored area. During goal selection it helps distinguish a destination ahead of the robot from one behind or to its side.
Waypoint-Level Semantic Records
The map describes geometry, but a navigation instruction may refer to an object's function or to a place category. The semantic module therefore stores an observation at each exploration waypoint in a YAML specification. Each entry has a name, a natural-language place description, the robot pose at observation time, and three classes of landmarks:
$$ s_i=\{n_i,d_i,p_i,L_i^{safe},L_i^{func},F_i^{geom}\}, $$
where $p_i=(x_i,y_i,\theta_i)$, $L_i^{safe}$ contains stable safety-related objects, $L_i^{func}$ contains task-relevant functional objects, and $F_i^{geom}$ contains persistent layout cues such as walls, openings, corridors, and obstacle arrangements. The complete semantic set is:
$$ S=\{s_1,s_2,\ldots,s_N\}, $$
with $N$ stored locations. The record does not claim a precise object center. It asserts that a concept was observed from a reachable waypoint. Returning to $p_i$ therefore places the robot at a position from which the relevant object or place was visible.
To reduce unstable entries, the LLM follows a prompt-defined filtering policy. It retains observations that are likely to be stable, recognizable, and useful for navigation. The paper explicitly says that this policy is not confidence calibration or quantitative reliability estimation. It is a qualitative instruction, and the system does not learn a calibrated probability that a label is correct.
Writing and Retrieving Semantic Context
At a reached waypoint, write_semantic_data combines the front-camera observation with the annotated map and writes the filtered result to YAML. During navigation, get_semantic_data returns the stored records. For a prompt such as "navigate to the tool used for fire," the model maps the functional description to a fire extinguisher entry and uses the associated pose as its target.
If several records mention the requested object, the model also retrieves its current pose and chooses the nearest associated waypoint. This nearest-neighbor step operates over semantic candidates rather than free space. It reduces ambiguity when the same object appears in multiple observations, but it cannot compensate for a missing or incorrect YAML entry.
The experiment consequently interprets Task 3 as navigation to a waypoint-level semantic anchor under complete annotations. It is not evidence that the system estimates exact object coordinates in an arbitrary, noisy, or previously unseen environment. That distinction is important because a 100% anchor-selection result and a 100% object-grounding result would have very different implications.
Tool Transport: Services, Actions, and WebSockets
The representation layer still depends on reliable ROS communication. In ROS-MCP, call_service() wraps a service name, type, request, and request identifier in a rosbridge service message. The WebSocket manager sends the message and returns a parsed response:
message = {
"op": "call_service",
"service": service_name,
"type": service_type,
"args": request,
"id": f"call_service_request_{service_name.replace('/', '_')}",
}
response = ws_manager.request(message, timeout=timeout)
return {
"success": response.get("result", True),
"result": response.get("values", {}),
}
The implementation is in ros_mcp/tools/services.py, approximately lines 260 to 327. It converts transport and service failures into a common result shape with success, result, or error. A model can therefore reason about failure without parsing a different response convention for every service.
Navigation is better represented as a ROS 2 action because it produces feedback and a terminal result. The send_action_goal() tool constructs a unique goal identifier, sends send_action_goal, receives action_feedback, and returns when it receives action_result or times out. On timeout it can return the last feedback and feedback count, which gives the model evidence that the robot made progress before communication or execution stalled.
goal_id = f"goal_{int(time.time() * 1000)}_{uuid.uuid4().hex[:8]}"
message = {
"op": "send_action_goal",
"id": goal_id,
"action": action_name,
"action_type": action_type,
"args": goal,
"feedback": True,
}
ws_manager.send(message)
The function is in ros_mcp/tools/actions.py, approximately lines 319 to 428. WebSocketManager.request() in ros_mcp/utils/websocket.py, approximately lines 382 to 412, connects send, receive, JSON parsing, and error handling. These functions are part of the reused substrate. They help explain what "without modifying the robot-side stack" means in practice, but they should not be attributed to the paper's authors.
The Closed Exploration Loop
flowchart TD
U["Natural language instruction"] --> C["MCP-compatible LLM client"]
C --> R["Read ROS map pose and camera"]
R --> V["Occupancy image with axes scale and robot arrow"]
V --> G["LLM selects waypoint or goal pose"]
G --> A["Send Nav2 action through MCP"]
A --> N["Cartographer SLAM and Nav2 execute"]
N --> Q{"Task type"}
Q -->|Explore| P["Capture camera at reached waypoint"]
P --> Y["Write safety function and geometry records to YAML"]
Y --> V
Q -->|Spatial goal| S["Estimate relative room size"]
S --> A
Q -->|Semantic goal| M["Retrieve matching semantic waypoint"]
M --> A
The loop distinguishes this system from a one-shot tool-calling demonstration. At every exploration waypoint, the map image changes and the semantic file can grow. The next model decision uses this accumulated external state. The LLM does not need to preserve every map detail in a long conversation history, and another compatible model can inspect the same files.
Task 1 repeats this loop until the represented map reaches the coverage criterion. Task 2 uses the resulting map for a spatial comparison. Task 3 retrieves the semantic records for a functional target. In all three cases, Nav2 receives the chosen pose and performs the motion.
Experiments and Results
The evaluation uses NVIDIA Isaac Sim with a Nova Carter robot, LiDAR sensing, ROS 2, Cartographer, and Nav2. The environment is an indoor warehouse with two rooms of different sizes, four loaded shelves, two forklifts, and safety equipment including fire extinguishers. The setting is designed to expose both geometric structure and task-relevant semantic objects.
Task 1 asks the robot to "Update the map while moving." At each waypoint, the model reads the latest annotated map, chooses a target at least five meters away toward the largest unexplored region, and avoids backtracking within three meters of visited locations. It sets the goal yaw toward an informative direction. After navigation, it captures a front-camera image and writes selected semantic observations with the current pose. The loop stops when map coverage reaches at least 90%.
Coverage is measured as the ratio of free-space pixels in the generated map to free-space pixels in a ground-truth map constructed by manual teleoperation. This criterion focuses on occupied versus free structure, but it does not by itself measure localization accuracy, map distortion, semantic correctness, path efficiency, or safety.
| Task | Natural-language prompt | Representation and action | Evaluation |
|---|---|---|---|
| Task 1: autonomous mapping | Update the map while moving. | Map image, unexplored regions, camera, semantic YAML, Nav2 goal | Free-space coverage and semantic recording |
| Task 2: spatial navigation | Go to the smallest room. | Metric grid, room boundary, relative area, target pose | Success in 30 trials |
| Task 3: semantic navigation | Fire detected nearby. Navigate to the tool used for it. | Functional description, fire-extinguisher record, nearest waypoint | Success in 30 trials |
The prompts in the table are reproduced from Table 2 of the paper. For each model, Task 1 is run independently, producing a model-specific map and semantic store. Task 2 and Task 3 then use the material produced by the same model. This prevents one model from benefiting from the other's annotations, but it also means that downstream scores combine reasoning quality with the quality of the prior exploration and labeling run.
The trajectory in Figure 3 is not a fixed coverage pattern. The model selects the next target from the visible information gap in the current map. The center images become progressively less gray as unknown space is mapped. The right panel shows that object and layout descriptions are tied to the pose from which they were observed.
This visual sequence is the clearest evidence for the proposed closed loop. If the model were merely generating a command from the initial prompt, the later waypoints would not depend on map growth. If semantic data were disconnected from localization, the observations would not have reusable poses. Both dependencies are visible in the representative output, although the paper does not provide a statistical analysis of the trajectory across multiple Task 1 runs.
In Task 2, the model reads the annotated map, counts grid cells over candidate rooms, estimates their relative sizes, and sends the selected pose. The model output in Figure 4 explicitly compares a large upper-right area with a smaller lower-left room before choosing a destination. This is the intended use of the metric grid: it gives the model a stable way to reason about scale rather than relying on raw pixel area.
In Task 3, the model does not need to detect a fire extinguisher from the current map image. It reads the semantic store created in Task 1, matches the phrase "tool used for it" to the fire-extinguisher entry, and sends the associated waypoint. When multiple relevant entries exist, it compares their distances from the current robot pose and chooses the nearest one.
| Model | Task 1 coverage | Task 2 success | Task 3 success |
|---|---|---|---|
| Claude Sonnet 4.6 | 97.83% | 26/30, 86.67% | 30/30, 100% |
| GPT-5.5 | 99.78% | 28/30, 93.33% | 30/30, 100% |
Both models exceed 97% map coverage in Task 1, showing that the map representation is usable by different multimodal backends. GPT-5.5 reaches 99.78%, which is 1.95 percentage points above Claude. The paper does not report repeated Task 1 runs, variance, path length, mapping duration, collision count, or number of model calls. The coverage result therefore supports feasibility, but it is not enough to claim a systematic efficiency advantage.
Task 2 is the main diagnostic result. Claude succeeds in 26 of 30 trials and GPT-5.5 in 28 of 30. The reported failures occur when the model treats a corridor as a room or estimates room sizes incorrectly. The metric grid reduces scale ambiguity, but it does not remove the need to segment connected free space into semantically meaningful places. Open doorways and long corridors remain structurally ambiguous.
Task 3 reaches 100% for both models under the tested annotation conditions. This means the requested object has a matching semantic record and the model consistently selects its associated pose. It does not show that the system can recognize every fire extinguisher, infer an unseen object, estimate its metric center, or recover from a missing YAML entry.
The contrast between Task 2 and Task 3 is useful. The semantic condition is easier once exploration has produced complete records because the model can retrieve a discrete candidate instead of reconstructing a place category from an image. The spatial condition remains a continuous comparison problem with ambiguous boundaries. A benchmark that reports only the aggregate number of successful tasks would hide this difference.
Discussion
The strongest engineering decision is to represent the map as a structured observation instead of adding more raw context. The image preserves two-dimensional adjacency, the axes and grid provide metric references, and the arrow supplies self-location and heading. A model can inspect this representation without reconstructing the floor plan from tens of thousands of serialized cells.
The second decision is waypoint-level semantic grounding. Pixel-level object grounding would require stable detection, depth or geometry, coordinate transformation, and tracking over time. A waypoint record promises less: the object was visible from this reachable pose. For a command such as "go near the fire extinguisher," that promise is often enough. It is insufficient for manipulation, fine approach behavior, or instructions that depend on the object's exact orientation.
The third decision is preserving the robot-side stack. The LLM chooses a target and the existing planner handles motion. This reuses engineering work in Nav2 and limits the blast radius of model errors to the goal layer. It also makes the system dependent on the quality of the existing map, localization, and navigation stack. The paper does not isolate those factors or test dynamic obstacles, localization drift, communication interruption, or recovery behavior.
A broader implication is that tool-enabled LLM robotics should not stop at function exposure. A ROS action named "navigate" is a low-level capability. A useful agent also needs representations that make the environment legible and records that make past observations retrievable. The paper's contribution sits between those levels: it does not replace perception or planning, but it changes what the model can reason over.
Limitations
The authors acknowledge that performance depends on representation quality and backend capability. Task 2 failures expose sensitivity to ambiguous spatial structures and model-specific interpretation. Task 3 is explicitly limited to waypoint-level anchors with complete annotations. Future work is expected to improve map representation, semantic annotation, and spatial consistency checking under incomplete or noisy observations.
The paper does not quantify semantic annotation quality. Filtering follows a prompt policy, and the authors state that it is not confidence calibration. There is no reported false-positive rate, false-negative rate, inter-run consistency, or comparison against human labels. A 100% Task 3 score can therefore prove retrieval consistency over the generated YAML without proving that the YAML entries are correct or complete.
The evaluation covers one simulated warehouse, one robot platform, and two LLM backends. Tasks 2 and 3 have 30 trials each, but Task 1 repetition, variance, statistical tests, and per-run failures are not reported. The absence of real-robot experiments leaves open localization drift, sensor noise, dynamic people, changing layouts, network latency, and safety recovery.
There is also no matched quantitative baseline against topological semantic navigation, frontier exploration, end-to-end vision-language navigation, or a simpler text map. Table 1 compares capabilities qualitatively, and Table 3 reports absolute results for two models. The study shows that the representation can be used, but it does not establish that this representation is cheaper or more accurate than established alternatives.
Finally, the authors do not release the complete implementation of their added map, pose, semantic, and prompt components. ROS-MCP Server is public and Apache-2.0 licensed, but the repository alone does not reproduce the paper's navigation-specific tools or Isaac Sim setup. Publishing those components and a set of successful and failed trajectories would make the claims easier to verify.
Conclusion
This paper shifts the question of LLM robot navigation from "can the model call a ROS action?" to "what spatial and semantic evidence does the model receive?" Occupancy grids become metric, pose-aware images; observations become waypoint records tied to robot poses; MCP exposes both through reusable tools; and Nav2 remains responsible for motion. The Isaac Sim experiments demonstrate autonomous exploration, smallest-room selection, and fire-extinguisher waypoint selection across two model backends.
The most credible conclusion is representation-mediated navigation is feasible without changing the existing ROS navigation infrastructure. The next steps are equally clear: measure semantic quality, add consistency checks and recovery under incomplete observations, evaluate cost and latency, and test on real robots with dynamic and noisy conditions. Those results would determine whether the representation layer remains useful beyond a controlled indoor simulation.
The model does not need to consume the entire occupancy grid. It needs an external world that aligns language, metric scale, and robot pose.
SOURCE LINKS



