Skip to content

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

ROS2-SG-VLN: Zero-Shot Hierarchical Vision-Language Navigation on Consumer GPU

A zero-shot, end-to-end Vision-Language Navigation (VLN) stack running in real time on a single consumer RTX 3060 (12GB VRAM), built with ROS 2 Humble, Nav2, vLLM (Qwen2.5-VL-3B-Instruct-AWQ), and a TensorRT FP16 Hybrid Open-Vocabulary 3D Semantic Mapper (YOLO-World).

Designed for Zero-Shot Unseen Environments (building both geometric and 3D semantic maps from scratch during exploration) with clean ROS 2 hardware abstraction for seamless transfer from Gazebo simulation to real quadruped/humanoid robots (e.g., Unitree Go2 / G1, DeepRobotics M20).

Demo (Zero-Shot Unseen Multi-Room VLN, 3× Speed)

demo_3x_hd.mp4

System Architecture (Three-Scale Dual-System VLN)

flowchart LR
    subgraph Sim["Simulation / Robot Hardware (REP-105)"]
        RGBD["RGB-D Camera (640x480, 83deg FOV, 0.75m)"]
        LIDAR["LiDAR + Odometry + TF2"]
        NAV2["SLAM Toolbox + ROS 2 Nav2 (20Hz)"]
    end

    subgraph Sys1["System 1: Fast 3D Perception (TensorRT FP16)"]
        YOLO["Hybrid YOLO-World Server (3.35ms TRT / PyTorch Fallback)"]
        MAPPER["3D Semantic Mapper (Depth Projection + Wall-Raycast Filter)"]
    end

    subgraph Sys2["System 2: Slow Neuro-Symbolic Reasoning (vLLM AWQ)"]
        VLLM["vLLM Qwen2.5-VL-3B-AWQ (Marlin + FA2 + XGrammar JSON Schema)"]
        PLANNER["Neuro-Symbolic VLN Planner (Dynamic Vocab + NBV Frontiers + Active Look-Around)"]
    end

    RGBD --> MAPPER
    LIDAR --> NAV2
    MAPPER <--> YOLO
    MAPPER -->|"3D Relational Scene Graph"| PLANNER
    NAV2 -->|"/map OccupancyGrid"| MAPPER
    NAV2 -->|"/map OccupancyGrid"| PLANNER
    PLANNER <--> VLLM
    PLANNER -->|"NavigateToPose / Active Rotate"| NAV2
Loading

Key Features

  • Decoupled ROS 2 + AI Microservice Architecture: Completely isolates ROS 2 Humble (system Python 3.10 / C++) from PyTorch/vLLM/TensorRT via HTTP/OpenAI APIs.
  • Hybrid TensorRT FP16 + Dynamic Open-Vocabulary Perception: Runs static household vocabulary at 298.7 FPS (3.35 ms) on TensorRT FP16 while transparently falling back to dynamic PyTorch YOLO-World for arbitrary out-of-vocabulary queries.
  • Raycast-Consistent 3D Relational Scene Graph: Synchronizes RGB-D + TF poses prior to inference, filters through-glass/through-wall projections via /map raycasting, and computes spatial neighbor relations (near).
  • Neuro-Symbolic Planning & Strict Constrained Decoding: Uses vLLM XGrammar json_schema to parse instructions into dynamic vocabularies, ranks candidates deterministically by spatial context, and explores unknown rooms via reachability-verified NBV frontier splitting.
  • Active Look-Around & Blind Verification: Mitigates 3B VLM confirmation bias via two-step blind captioning + neuro-symbolic count guards across 0° / +25° / -25° viewpoints.

Benchmarks (Single RTX 3060 12GB)

1. Perception Frontend Acceleration (yolov8s-worldv2, 640×480, 100 runs)

Backend Precision Mean Latency (ms) P95 Latency (ms) Throughput (FPS) Speedup
PyTorch FP32 15.08 21.06 66.3 1.00×
PyTorch FP16 10.00 15.07 100.0 1.51×
TensorRT FP16 3.35 5.36 298.7 4.50×

2. End-to-End VLM & VRAM Budget (Concurrent Sim + Perception + vLLM)

  • VLM Engine: vLLM 0.24.0 serving Qwen2.5-VL-3B-Instruct-AWQ (AutoAWQ Marlin Kernel + FlashAttention-2 + Prefix Caching)
  • VLM Latency: ~0.4–0.6 s (Instruction Parsing) / ~1.0–1.6 s (Visual Verification & Frontier Selection)
  • Total VRAM Footprint: ~9.5–10.5 GiB / 12 GiB (Gazebo RGB-D + RViz2 + TensorRT YOLO-World + vLLM AWQ running concurrently)

Prerequisites & Environment Setup

Architecture Note: To completely avoid dependency conflicts between ROS 2 Humble (system Python 3.10 / cv_bridge) and PyTorch/vLLM/TensorRT, this project strictly separates the ROS 2 System Environment and the AI Microservices Conda Environment (vln_ai).

Tested Environment

  • OS: Ubuntu 22.04 LTS
  • ROS: ROS 2 Humble (ros-humble-desktop-full)
  • GPU: NVIDIA RTX 3060 (12 GB VRAM), CUDA 12.9
  • Inference Stack: torch==2.11.0+cu129, vllm==0.24.0, ultralytics, tensorrt

1. ROS 2 Humble System Dependencies (System Terminal — No Conda)

sudo apt update
sudo apt install -y \
  ros-humble-navigation2 \
  ros-humble-nav2-bringup \
  ros-humble-slam-toolbox \
  ros-humble-gazebo-ros-pkgs \
  ros-humble-turtlebot3-gazebo \
  ros-humble-turtlebot3-description \
  ros-humble-cv-bridge \
  ros-humble-message-filters \
  ros-humble-tf2-geometry-msgs \
  python3-requests

# (Optional) Xbox 360 joystick teleoperation
sudo apt install -y ros-humble-joy ros-humble-teleop-twist-joy joystick

2. Isolated AI Microservices Environment (vln_ai Conda Env)

# 1. Create Conda env and isolate it from ROS 2 PYTHONPATH & ~/.local packages
conda create -n vln_ai python=3.10 -y
conda activate vln_ai
conda env config vars set PYTHONPATH="" PYTHONNOUSERSITE=1
conda deactivate && conda activate vln_ai

# 2. Install vLLM + matched PyTorch (CUDA 12.9 wheels)
# (If your host uses CUDA 13.0+, you can run `pip install vllm` directly.)
pip install vllm==0.24.0 \
  --extra-index-url https://wheels.vllm.ai/0.24.0/cu129/ \
  --extra-index-url https://download.pytorch.org/whl/cu129

# 3. Install YOLO-World, FastAPI, and TensorRT export dependencies
pip install ultralytics fastapi uvicorn opencv-python pillow python-multipart \
            tensorrt onnx onnxslim onnxruntime-gpu

# 4. Verify all GPU backends coexist cleanly
python -c "import torch, ultralytics, vllm, tensorrt; print('torch:', torch.__version__, 'cuda:', torch.cuda.is_available(), 'vllm:', vllm.__version__)"

3. Network & Mirror Tips (Optional)

  • If downloading Qwen/Qwen2.5-VL-3B-Instruct-AWQ from Hugging Face is slow, set export HF_ENDPOINT=https://hf-mirror.com before running vllm serve.
  • launch_small_house_rgbd.py automatically sets GAZEBO_MODEL_DATABASE_URI="" and appends the local aws-robomaker-small-house-world/models path so Gazebo launches offline in seconds.

Quick Start

1. Clone with Submodule (aws-robomaker-small-house-world)

git clone --recursive https://github.com/GeeniTiming/vln_nav_ws.git
cd vln_nav_ws

2. Launch AI Microservices (Independent Conda Env vln_ai)

# Terminal 1: vLLM (Port 8080)
conda activate vln_ai
vllm serve Qwen/Qwen2.5-VL-3B-Instruct-AWQ \
  --port 8080 --dtype half --max-model-len 2048 --max-num-seqs 2 \
  --gpu-memory-utilization 0.50 --enforce-eager --enable-prefix-caching \
  --limit-mm-per-prompt '{"image": 1, "video": 0}'

# Terminal 2: Hybrid TensorRT/PyTorch Perception Server (Port 8001)
conda activate vln_ai
cd ai_services
python3 benchmark_perception.py  # One-time TensorRT FP16 engine build
uvicorn perception_server:app --host 127.0.0.1 --port 8001

3. Launch ROS 2 Humble Simulation & VLN Stack (System Terminal, No Conda)

# Terminal 3: Gazebo Small House + Custom RGB-D Robot (0.75m height, 83deg FOV)
ros2 launch launch_small_house_rgbd.py

# Terminal 4: SLAM Toolbox + Nav2
ros2 launch nav2_bringup bringup_launch.py \
  use_sim_time:=True slam:=True map:=none params_file:=$(pwd)/nav2_params.yaml

# Terminal 5: RViz2
rviz2 -d vln_viz.rviz --ros-args -p use_sim_time:=true

# Terminal 6 & 7: 3D Semantic Mapper + Neuro-Symbolic VLN Planner
python3 semantic_mapper_node.py --ros-args -p use_sim_time:=true
python3 vln_planner_node.py --ros-args -p use_sim_time:=true

4. Send Open-Vocabulary Natural Language Instructions

ros2 topic pub --once /vln/instruction std_msgs/msg/String "{data: '向前探索,找到带四把椅子的长方形餐桌'}"
ros2 topic pub --once /vln/instruction std_msgs/msg/String "{data: '去客厅白色沙发旁边'}"

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages