An automated LLM-powered patching system for RoboStack/ros-humble.
This project extends the original RoboStack ROS-Humble repository by implementing a Large Language Model (LLM) workflow that automatically generates and applies patches to the RoboStack project.
- Runs on Ubuntu Linux (Windows and macOS not supported)
- Ollama for LLM API
- Clone the repository
cd <desired-project-location>
git clone https://github.com/Striker146/ros-humble-github-actions.git
- Create and configure development environment
micromamba create -n robostackenv python=3.11
micromamba activate robostackenv
micromamba config append channels conda-forge
micromamba config append channels robostack-staging
micromamba install pip conda-build anaconda-client mamba conda catkin_pkg ruamel_yaml rosdistro empy networkx requests boa
- Install additional required packages
pip install git+https://github.com/RoboStack/vinca.git --no-deps
pip install GitPython
Note: If running Ollama on a different machine or VM, follow the network configuration guide to enable LLM access across your local network.
Activate the LLM workflow from the project root:
micromamba activate robostackenv
python .scripts/run_patch_workflow.py --ip <LLM_IP_ADDRESS> --port <LLM_PORT> --model <LLM_MODEL>
For development work, you can significantly reduce build times (from hours to minutes) using the --skip_existing
flag. Here's how to set it up:
- Create a modified configuration:
- Copy
vinca_linux_64.yaml
tovinca.yaml
. - Under
packages_select_by_deps:
, remove all entries and add only- ros_base
. - Increment the
build_number
by 1.
- Copy
- Build the base packages:
python .scripts/builder.py
- After the build completes, copy the build directory to an accessible location.
- You can now use the
skip_existing
flag in the workflow by using the copied directory:
python .scripts/run_patch_workflow.py --ip <LLM_IP_ADDRESS> --port <LLM_PORT> --model <LLM_MODEL> --skip_existing <ROS_BASE_BUILD_DIR>
This ensures that the ROS Base package and it dependencies are not rebuilt, but allows for all other packages to be built.
GitHub Actions is used to automate the workflow defined in workflows/verify_patch.yaml
. This workflow is triggered automatically when a pull request is opened and runs .scripts/run_patch_workflow.py
. If the build fails, the LLM (Large Language Model) attempts to repair the code, and any successful changes are automatically applied.
Development setup instructions adapted from Robostack's contribution guide.