Skip to content

StanfordMSL/VISTA-Plan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

VISTA-Plan

ArXiv: https://arxiv.org/abs/2507.01125.

Repository for VISTA-Plan, the planner presented in the paper. For all code associated with the original paper, please see the VISTA repository. This repository includes scripts and ROS2 nodes required for running quadrotor experiments.

Setup & Dependencies

If you have already followed the instructions in the main VISTA repo, there is no need to install the following dependencies, and you can skip to the "Running the Planner" section. The following instructions are for setting up this repository as a stand-alone code. In this repository, we provide example pointcloud data so that the planner code can be run without ROS2 and without the Semantic-SplatBridge repository.

  1. Install Miniconda (or Anaconda) using the installation guide.
  2. Clone this repository in a directory of your choice:
    git clone git@github.com:StanfordMSL/VISTA-Plan.git
  3. In the same directory, additionally clone the VISTA-Map repository, so that VISTA-Map and VISTA-Plan are next to each other:
    git clone git@github.com:StanfordMSL/VISTA-Map.git
  4. Set up a conda environment for this project:
    conda create --name vistaplan -y python=3.10
    
    conda activate vistaplan
    conda env config vars set PYTHONNOUSERSITE=1
    conda deactivate
    
    # Activate conda environment, and upgrade pip
    conda activate vistaplan
    python -m pip install --upgrade pip
    
    # PyTorch, Torchvision dependency
    pip install torch==2.1.2+cu118 torchvision==0.16.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
    
    # CUDA dependency (by far the easiest way to manage cuda versions)
    conda install -c "nvidia/label/cuda-11.8.0" cuda-toolkit
    
    # Numpy 2.0 bricks the current install...
    pip install numpy==1.26.3
    
    # Fix ROS2 CMake version dep
    conda install -c conda-forge gcc=12.1.0
    
    # Navigate to the VISTA-Map repo and pip install
    cd VISTA-Map
    pip install -e .
    
    # Build and source the repo
    cd ../VISTA-Plan
    colcon build --symlink-install
    source install/setup.bash
    
    # pip install
    cd src/vista_plan
    pip install -e .

Requirements for running with ROS2

In addition to the above dependencies, if you want to run the planning code with ROS2, you'll need to follow the install instructions for ROS2 Humble. This code has not been tested with other ROS2 versions.

After installing ROS2 we recommend adding source /opt/ros/humble/setup.bash to your bashrc file. Otherwise, this command needs to be run in each terminal before running any ros2 commands.

Running the Planner

Build and source this code if you haven't already.

cd VISTA-Plan
colcon build --symlink-install
source install/setup.bash

Single Plan Python Script

To run the planner once, run planner.py:

cd VISTA-Plan
python src/vista_plan/scripts/planner.py

Iteratively Plan Python Script

To run the planner in a loop while cyling through updating pointclouds, run test_planner.py:

cd VISTA-Plan
python src/vista_plan/scripts/test_planner.py

Expected Plot Outputs

All output plots will be stored in src/vista_plan/scripts/plots.

  • best_trajectory.png: Top-down view of the room. Plots occupied and unobserved space in blue, and the highest semantically similar points as green markers. Red star is the current state, black star is the current state projected into the closest free cell if the current state is not in free space. All proposed trajectories are plotted in green, with darker shades denoting higher scores. Magenta trajectory is the best trajectory that gets published.

  • current_rgb.png, current_geo.png, current_sim.png: The RGB, geometric information gain, and similarity scores of each voxel in the voxel grid as viewed from the current state of the robot.

  • frontier_grid.png: Shows the occupancy grid definitions from a top-down view of the room. Purple is free space, green is occupied space, blue is unobserved space. Yellow indicates frontier voxels.

  • sim_probs.png: Shows the Gaussian Mixture Model (GMM) that is defined by the highest semantic similarity voxels and frontier voxels.

Using ROS2

To run the planner with ROS2, we provide an example rosbag that can be downloaded by running:

cd VISTA-Plan
python src/vista_plan/scripts/download_data.py

Follow the prompts, and choose the wagon rosbag. This will create the directory VISTA-Plan/src/vista_plan/rosbags with the wagon rosbag.

We then need to add the paths of the conda environment and vista repo to the python path. Note that your paths may be different from what is provided here:

export PYTHONPATH="${PYTHONPATH}:/home/<user>/miniconda3/envs/vistaplan/lib/python3.10/site-packages"
export PYTHONPATH="${PYTHONPATH}:/home/<user>/VISTA-Map"

In the same terminal, source and run the launch file:

cd VISTA-Plan
source install/setup.bash
ros2 launch vista_plan plan_publisher.launch.py

In a second terminal run the ros2 bag:

cd VISTA-Plan/src/vista_plan/rosbags/
ros2 bag play wagon

In a third terminal, you can ros2 topic echo the topic /path, and this will be the trajectory published by the planner.

Hardware Platform

We use a custom StanfordMSL Drone Hardware Platform that uses a PX4 flightcontroller. State machine used on this platform can be found at https://github.com/StanfordMSL/TrajBridge.

If you choose to use a similar platform, you can use the launch file waypoint_publisher.launch.py to publish one waypoint at a time to the robot.

Citation

In case anyone does uses VISTA-Plan as a starting point for research please cite this repository.

# --------------------------- VISTA ---------------------
@article{nagami2025vista,
    title={VISTA: Open-Vocabulary, Task-Relevant Robot Exploration with Online Semantic Gaussian Splatting}, 
    author={Keiko Nagami and Timothy Chen and Javier Yu and Ola Shorinwa and Maximilian Adang and Carlyn Dougherty and Eric Cristofalo and Mac Schwager},
    journal={arXiv preprint arXiv:2507.01125}
    year={2025},
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages