A ROS 2 Humble framework integrating Large Language Models (LLMs) with Nav2 for high-level task planning and autonomous robot navigation.
This project combines the reasoning capabilities of Large Language Models with ROS 2's Nav2 navigation stack. It allows a mobile robot to:
- Plan complex tasks based on high-level natural language instructions
- Navigate autonomously in a simulated environment
- Integrate sensor data and costmaps for safe movement
It is designed to be modular and simulation-ready, making it easy to extend for research or development purposes.
- Task Planning with LLMs: Generate sequences of robot actions from natural language instructions.
- Autonomous Navigation: Leverages ROS 2 Nav2 stack for path planning, local and global costmaps.
- Simulation Ready: Compatible with Gazebo or other ROS 2 simulation environments.
- Modular Architecture: Easy to extend with new behaviors or navigation algorithms.
LLM-Task-Planner/
├── src/ # Source packages
│ ├── llm_nav/ # LLM-based task planning package
│ │ ├── behavior_trees/ # Behavior tree XMLs and configurations
│ │ ├── launch/ # ROS 2 launch files for nodes
│ │ ├── llm_nav/ # Node implementations
│ │ ├── maps/ # Map YAML / PGM files
│ │ ├── params/ # Parameter files
│ │ ├── rviz/ # RViz visualization configs
│ │ ├── resource/ # Other resources
│ │ └── test/ # Unit and integration tests
│ └── my_gazebo_worlds/ # Custom simulation worlds
│ ├── launch/ # Launch files for simulation
│ ├── maps/ # Map YAML / PGM files
│ ├── models/ # Simulation models
│ ├── photos/ # Screenshots and images
│ └── worlds/ # Gazebo world files
├── README.md # Project description and instructions
└── requirements.txt # Python dependenciesNotes:
src/contains all ROS 2 packages (llm_nav,my_gazebo_worlds).llm_nav/: main ROS2 package that implements the task planner and integration with Nav2.my_gazebo_worlds/: auxiliary ROS2 package that contains simulation environments and assets.
-
Install ROS 2 Humble
- Follow the official guide: ROS 2 Humble Installation
-
Clone this repository
git clone https://github.com/Dacossti/LLM-Task-Planner.git
cd LLM-Task-Planner/llm_ros2_humble- Install ROS dependencies
rosdep install --from-paths src --ignore-src -r -y- Install Python dependencies
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt- Build the workspace
colcon build
source install/setup.bash- Launch LLM parsing, Navigation and Gazebo+RViz Simulation:
ros2 launch llm_nav bringup.launch.py use_nav2:=true instruction:="your_instruction"Instruction example: Bring me coffee in the dining room