Skip to content

cmu-rss-lab/ROS-bug-dataset-collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS Bug Dataset Collection

Tools for collecting a bug dataset focused on behavioral architecture miscomposition bugs in ROS (Robot Operating System).

Prerequisites

  • Docker installed on your machine
  • Python 3.8.10
  • Pipenv
  • GPU support for running machine learning models (optional, but recommended)

Setup

1. Clone the Repository

git clone <your-repository-url>
cd <repository-name>

2. Install Dependencies

pipenv install

3. Set Up GitHub Token

  1. Create a GitHub Personal Access Token:

  2. Run the Setup Script:

    bash setup.sh
    • The script will prompt you to enter your GitHub Personal Access Token
    • It creates a .env file with secure, restricted permissions

4. Set Up Llama Model

  1. Start Ollama Docker Container:

    docker compose up -d

    Note: If your machine does not have a GPU, you need to adjust the compose.yml file by uncommenting the following lines to remove GPU requirements:

    # deploy:
    #   resources:
    #     reservations:
    #       devices:
    #         - driver: nvidia
    #           count: 1
    #           capabilities: [gpu]
  2. Initialize Llama Model:

    docker exec -it ollama_service ollama run llama3

Usage

Running Commit Difference Analysis

To analyze commit differences for a specific repository:

pipenv run python commit_diff.py <Owner/repo>

Example

pipenv run python commit_diff.py autowarefoundation/autoware

Output

After running the script, a CSV file will be generated with the following format:

Filename: autoware_verified_commits.csv

Columns:

  • link: Direct link to the GitHub commit
  • answer: Binary classification (True/False) indicating whether the commit represents a Behavioral Architecture Miscomposition Bug (BABC)
  • reason: Detailed explanation of why the commit was classified as a BABC or not

Example CSV Contents:

link,answer,reason
https://github.com/autowarefoundation/autoware/commit/abc123,True,"Significant changes in node communication pattern indicating potential behavioral architecture miscomposition"
https://github.com/autowarefoundation/autoware/commit/def456,False,"Minor refactoring without substantial behavioral changes"

Configuration

Arguments

  • repo_name: GitHub repository name in the format 'Owner/repo'
    • Example: autowarefoundation/autoware

Troubleshooting

  • Ensure Docker is running before executing scripts
  • Verify your GitHub token has the necessary permissions
  • Check that Pipenv environment is activated

About

Tools for collecting a bug dataset for behavioral architecture miscomposition bugs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •