Skip to content
/ rag_gpsr Public

A Retrieval Augmented Generation Approach for Planning on General Purpose Service Robots

Notifications You must be signed in to change notification settings

LCAS/rag_gpsr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAG GPSR

This repository implements Retrieval-Augmented Generation (RAG) for GPSR (General Purpose Service Robot) tasks.

Installation

git clone https://github.com/lcas/rag_gpsr.git
cd rag_gpsr
pip install -r requirements.txt #Tested with Python 3.10.12

Ollama Server (Required)

The scripts require ollama server to be running at the local machine at localhost:11434 (default port)

1. Installing and Runnning Ollama

curl -fsSL https://ollama.com/install.sh | sh
ollama serve

For latest info please see : Ollama

2. Pull llama

ollama pull llama3.2

Any model could be pulled and used, but specify inside rag_gpsr.py

Docker (Optional)

1. Build the Docker Image

cd rag_gpsr/docker
./build-docker.sh

2. Open a container

./run-docker.sh

This opens a container with all requirements installed.

Once inside the docker, go to

cd /home/rag_gpsr/rag_gpsr

and follow the instructions below

Usage

Usage Instructions

1. Configure Settings

Build the vector database with

cd db
python vector_embedding.py

2. Run the Application

Wait till the embedding is built, and then run the following with your task.

python rag_gpsr.py "<task>"

3. Usage inside a python script

from rag_gpsr import RAG_GPSR
query = "<task>"
gpsr_instance = RAG_GPSR()
output_func = gpsr_instance.handle_query(query)
#To execute the function
exec(output_func)

Configuration

1. Configuring the Data

By Default, the dataset corresponds to a copy of RoboCup Data inside db/data

The Files maps/location_names.md ,maps/room_names.md and objects/objects.md are markdown files which can be modified (or added) as per requirements.

2. Configuring Robot Capabilities

The Robot capabilities can be modified (or added) inside utils/capabilities.py by defining the functions within the file. Though most of the current implementations assume the existence of primitive actions that are called inside each of the defined functions, independent functions and capabilities can be defined.

After any change to the configurations, the vector database needs to be rebuilt with Configure Settings

Citation

If you use this repository in your research, please cite the following paper:

@article{Attenborough2025,
author = "Eden Attenborough and Hariharan Arunachalam and Juan Pablo Vasconez and Francesco Del Duchetto and Riccardo Polvara and Leonardo Guevara",
title = "{A Retrieval Augmented Generation Approach for Planning on General Purpose Service Robots}",
booktitle={Advanced Research in Technologies, Information, Innovation and Sustainability (ARTIIS)},
year = "2025"
}

The dataset used in the paper above, including GPSR command list, environmental information, robot capabilities, manually labeled task decompositions, and benchmark results from experiments, can be found in Paper_Dataset.xlsx

Contributing

Pull requests are welcome. For major changes, please open an issue first.

About

A Retrieval Augmented Generation Approach for Planning on General Purpose Service Robots

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published