Skip to content

RiddheshMore/ros-component-explorer

Repository files navigation

ROS Component Explorer

A hybrid semantic search system for discovering and exploring ROS 2 packages using knowledge graphs and vector embeddings. Combines traditional BM25 text search with BERT-based semantic understanding for intelligent package discovery.

License: MIT Python ROS 2

Quick Start

Prerequisites

  • Python 3.12+
  • Java 11+ (for Apache Solr)
  • CUDA-capable GPU (optional, for faster vector encoding)
  • 8GB RAM minimum, 16GB recommended

Installation

  1. Clone the repository

    git clone https://github.com/RiddheshMore/ros-component-explorer.git
    cd ros-component-explorer
  2. Set up Apache Solr

    Option A: Automated Setup (Recommended)

    # Download and start Solr 9.x
    ./setup.sh

    Option B: Manual Setup

    # Download Apache Solr 9.x
    wget https://archive.apache.org/dist/lucene/solr/9.0.0/solr-9.0.0.tgz
    tar -xzf solr-9.0.0.tgz
    
    # Start Solr on port 8984
    cd solr-9.0.0
    bin/solr start -p 8984
    
    # Create the 'ros_explorer' core
    bin/solr create_core -c ros_explorer -p 8984

    To manage Solr:

    # Check Solr status
    bin/solr status
    
    # Stop Solr
    bin/solr stop -p 8984
    
    # Restart Solr
    bin/solr restart -p 8984
  3. Install Python dependencies

    pip install -r requirements.txt
  4. Index ROS Components into Solr

    The application automatically indexes components from TTL files on first startup. For manual indexing, use the provided script:

    # Index all default TTL files
    python index_components.py
    
    # Clear existing index and re-index everything
    python index_components.py --clear
    
    # Index a specific TTL file
    python index_components.py --file data/custom_components.ttl
    
    # List all indexed components
    python index_components.py --list

    Available TTL data files:

    • data/components_clean.ttl - Primary component dataset (recommended)
    • data/components.ttl - Original component data
    • data/mobile_robot_packages_hierarchical.ttl - Mobile robot packages
    • data/expanded_components_ros.ttl - Extended component data
    • data/ros_knowledge_graph.ttl - Full knowledge graph
  5. Start the application

    python main.py

    Note: The application expects Solr to be running on http://localhost:8984. Make sure Solr is started before running the application.

  6. Access the web interface Open your browser to http://localhost:8083

Usage Examples

Web Interface Search Queries

Navigate to http://localhost:8083 and try these context-aware queries:

Integration Compatibility

  • "I'm using nav2 for autonomous navigation. What localization packages are compatible?"
  • "My robot uses gazebo_ros2_control. What controller plugins work with it?"

Hardware Constrained

  • "I have a Velodyne VLP-16 LIDAR. What SLAM packages support this sensor?"
  • "I'm building a robot with RPLIDAR A1. What SLAM packages work with 2D LIDAR?"

Dependency Based

  • "I'm using robot_localization for sensor fusion. What IMU drivers provide input?"
  • "My navigation stack uses tf2. What packages depend on it?"

Feature Addition

  • "I'm using nav2_costmap for obstacles. What costmap layers improve detection?"
  • "I need to smooth my navigation paths. What smoothing algorithms work with nav2?"

Project Structure

ros-component-explorer/
├── backend/
│   ├── solr_manager.py        # Solr indexing and search
│   ├── vector_generator.py    # BERT vector embeddings
│   └── ros_agent.py           # Query processing
├── frontend/
│   └── modern_ui.py           # NiceGUI web interface
├── data/
│   ├── components_clean.ttl   # Primary TTL dataset
│   └── ros_knowledge_graph.ttl # Full knowledge graph
├── evaluation/                # Benchmarking and evaluation tools
├── main.py                    # Application entry point
├── index_components.py        # Manual Solr indexing script
├── setup.sh                   # Automated setup script
└── requirements.txt           # Python dependencies

Areas for Enhancement

  • Knowledge Base Expansion: Add more ROS 2 packages to the dataset
  • Query Dataset: Contribute more context-aware test queries
  • Feature Development: New search algorithms or UI improvements
  • Evaluation Metrics: Additional performance measures
  • Integration: APIs for ROS 2 development tools

License

This project is licensed under the MIT License - see the LICENSE file for details.


Get Started: python main.py → Open http://localhost:8083

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors