Skip to content

LorenzoBonanni/MCTS_VO_ROS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Safe Monte Carlo Planning for Mobile Robots in Dynamic Environments

This repository contains the implementation for the paper "Safe Monte Carlo Planning for Mobile Robots in Dynamic Environments". The project was tested on:

  • Ubuntu 20.04
  • Python 3.8.10
  • ROS2 Foxy
  • Unity

Repository Structure

  • env_build/: Contains the compiled Unity environments
    • sin_env/: Sinusoidal obstacle trajectories environment
    • int_env/: Intention-based obstacle trajectories environment
  • mctsVoRos/: Contains the Python implementation of the algorithms and experiment runner
  • mcts_vo_Turtlebot3UnityROS2/: Unity project implementing the simulation environment

Installation

  1. Install system dependencies:

    sudo apt update
    sudo apt install ffmpeg
  2. Clone this repository into your colcon workspace:

    git clone https://github.com/LorenzoBonanni/MCTS_VO_ROS.git ~/colcon_ws/src/MCTS_VO_ROS
  3. Navigate to the project directory:

    cd ~/colcon_ws/src/MCTS_VO_ROS/mctsVoRos
  4. Remove the existing MCTS_VO directory and clone the ROS branch:

    rm -rf MCTS_VO
    git clone -b ros https://github.com/Isla-lab/MCTS_VO.git
  5. Return to the main project directory:

    cd ..
  6. Create and activate a Python virtual environment:

    python3 -m venv venv/
    source venv/bin/activate
  7. Install required Python packages:

    pip install -r mctsVoRos/requirements.txt
  8. Build the project:

    colcon build
    source install/setup.bash

Running Experiments

Important Pre-Run Requirements

  1. Navigate to the mctsVoRos directory:

    cd ~/colcon_ws/src/MCTS_VO_ROS/mctsVoRos
  2. Create debug directory:

    mkdir debug

Reproducing Paper Experiments

Note: All commands should be run from the ~/colcon_ws/src/MCTS_VO_ROS/mctsVoRos directory.

python3 run.py

Configuration Options:

  1. Obstacle Trajectories (default: sinusoidal): Modify loopHandler_copy.py:

    # For sinusoidal obstacles (default)
    process = subprocess.Popen(["../env_build/sin_env/env.x86_64"], preexec_fn=os.setpgrp)
    
    # For intention-based obstacles
    # process = subprocess.Popen(["../env_build/int_env/env.x86_64"], preexec_fn=os.setpgrp)
  2. Algorithm Selection (default: MCTS-VO): Modify the --algorithm argument in run.py:

    • VO-TREE: MCTS-VO (default)
    • MCTS: Standard MCTS
    • VO-PLANNER: VO-Planner

Running Single Experiments

python3 loopHandler_copy.py --exp_num <EXPERIMENT_NUMBER> --algorithm <ALGORITHM>

Example:

python3 loopHandler_copy.py --exp_num 1 --algorithm VO-TREE

Final Directory Structure

After completing the installation steps, your directory structure should look like this:

~/colcon_ws/src/MCTS_VO_ROS/
├── env_build/
│   ├── sin_env/
│   └── int_env/
├── mctsVoRos/
│   ├── MCTS_VO/
│   │   ├── bettergym/
│   │   ├── environment_creator.py
│   │   ├── experiment_utils.py
│   │   ├── __init__.py
│   │   └── mcts_utils.py
│   ├── debug/
│   ├── debug_utils.py
│   ├── estimate_obs.py
│   ├── __init__.py
│   ├── loopHandler_copy.py
│   ├── requirements.txt
│   └── run.py
├── build/
├── install/
├── log/
├── mcts_vo_Turtlebot3UnityROS2/
├── package.xml
├── README.md
├── resource/
├── setup.cfg
├── setup.py
├── test/
└── venv/

Always make sure to run the experiments from the ~/colcon_ws/src/MCTS_VO_ROS/mctsVoRos directory to ensure correct path references.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages