/sorts

Code base for Social Robot Tree Search (SoRTS).

Primary LanguagePythonBSD 4-Clause "Original" or "Old" LicenseBSD-4-Clause

Social Robot Tree Search (SoRTS)

This repository contains the code for the paper:

SoRTS: Learned Tree Search for Long-Horizon Social Robot Navigation

Ingrid Navarro *, Jay Patrikar *, Joao P. A. Dantas, Rohan Baijal, Ian Higgins, Sebastian Scherer and Jean Oh

*Equal contribution

Model Overview

Social Robot Tree Search (SoRTS) is an algorithm for the safe navigation of mobile robots in social domains. SoRTS aims to augment existing socially-aware trajectory prediction policies with a Monte Carlo Tree Search (MCTS) planner for improved downstream navigation of mobile robots.

SoRTS

Installation

Setup a conda environment:

conda create --name sorts python=3.8
conda activate sorts

Download the repository and install requirements:

git clone --recurse-submodules git@github.com:cmubig/sorts.git
git submodule init 
git submodule update
pip install -e . 

Setting up the repository

The data folder is structured as followed:

data/
├─ dataset
|   ├─ 111days1        
|   |   ├─ test
|   |   |   ├─ n.txt
|   |   |   ...
|   |   ├─ train
|   |   |   ├─ n.txt
|   |   |   ...
|   |   ├─ val
|   |   |   ├─ n.txt
|   |   |   ...
├─ sprnn
|   ├─ config.json
|   ├─ model.pth   
├─ dic2d.pkl
├─ traj_lib.txt

Below we describe the files contained within this folder.

Dataset

This work leverages a subset of the TrajAir dataset consisting of 111 days of aircraft trajectory data collected at the Pittsburgh-Butler Airport. You can download the dataset following the instructions in this link. For more details about the dataset, here's the original paper and code.

Our code expects the dataset to be located within the data/dataset folder, in the format shown above.

SPRNN: Socially-aware intent prediction

Our work uses an intent prediction algorithm to guide the tree search of the MCTS-based planner. We leverage the Social-Patternn (sprnn) algorithm whose configuration files and model checkpoint are located within the data/sprnn folder. For more details about sprnn, here's the corresponding paper. The corresponding code is cloned and used as a submodule in policies/social_policies.

Other files

Our code also uses dic2d.pkl which is a dictionary of specified goal locations, and traj_lib.txt, which is a file containing the set of motion primitives of the agent.

Running the code

To run our code you need to provide a configuration file specifying the parameters to run the planner, the social policy, the environment, visualization, etc.

The configuration files to run SoRTS can be found in config/sorts. For example, to run the two-agent experiment, run:

python run.py --exp config/sorts/2_agents.json

The configuration files to run the baseline can be found in config/baseline. For example, to run the two-agent experiment, run:

python run.py --exp config/baseline/2_agents.json

Results

This repo provides a socially-aware baseline and SoRTS, a socially-aware MCTS-based algorithm.

Baseline SoRTS

Citing

@ARTICLE{10449372,
  author={Navarro, Ingrid and Patrikar, Jay and Dantas, Joao P. A. and Baijal, Rohan and Higgins, Ian and Scherer, Sebastian and Oh, Jean},
  journal={IEEE Robotics and Automation Letters}, 
  title={SoRTS: Learned Tree Search for Long Horizon Social Robot Navigation}, 
  year={2024},
  volume={9},
  number={4},
  pages={3759-3766},
  keywords={Navigation;Robots;Social robots;Predictive models;Behavioral sciences;Monte Carlo methods;Costs;Aerial Systems: Perception and Autonomy;human-aware motion planning;safety in HRI},
  doi={10.1109/LRA.2024.3370051}
}