rai-debug-assistant
v1.1.2
Published
ROS2 Debugging Assistant from RAI framework using Python virtual environments
Maintainers
Readme
RAI Debug Assistant
A direct Python-based package for the ROS2 Debugging Assistant from the RAI framework.
Requirements
- Node.js and npm
- Python 3.8+
- ROS 2 (Humble or later)
Installation
From npm Registry
If the package has been published to npm:
# Install globally from npm
npm install -g rai-debug-assistantFrom Local Package
# Pack the package
cd /path/to/rai-debug-npm
npm pack
# Creates rai-debug-assistant-1.1.2.tgz
# Install from the tarball
npm install -g ./rai-debug-assistant-1.1.2.tgzDirect Installation
# Or install directly from the source directory
cd /path/to/rai-debug-npm
npm install -g .Publishing to npm (For Maintainers)
# Login to npm
npm login
# Publish the package
npm publish
# Or for scoped packages
npm publish --access publicNOTE: For security information about API keys, review the SECURITY.md file.
Usage
# Start with API key passed as argument
rai-debug --api-key YOUR_OPENAI_API_KEY
# Start with API key from environment variable
export OPENAI_API_KEY=YOUR_OPENAI_API_KEY
rai-debug
# Install required dependencies
rai-debug --install-deps
# Specify a different port (default is 8501)
rai-debug --port 8502
# Debug mode for more verbose output
rai-debug --debugIf no API key is provided via arguments or environment variables, you will be prompted to enter one.
How It Works
This package:
- Creates a Python virtual environment in your home directory (~/.rai-debug-assistant/venv)
- Uses Streamlit to run the debugging assistant in this environment
- Integrates directly with your local ROS 2 environment
- Provides a web interface to interact with the assistant
The assistant:
- Shows active ROS 2 nodes, topics, and services in the sidebar
- Allows you to ask questions about your ROS 2 system
- Provides contextual help based on your ROS 2 setup
- Allows direct execution of ROS2 commands from the chat
- Includes tools for inspecting nodes, topics, and services
- Shows command history and execution results
- Displays detailed system information and resource usage
- Auto-detects and suggests ROS2 commands
- Provides a comprehensive dashboard for ROS2 debugging
Troubleshooting
- Missing Python dependencies: Run
rai-debug --install-depsto set up the virtual environment and install all required packages - "Python not found": Make sure you have Python 3.8+ installed and available in your PATH
- "venv module not found": Install the venv module for your Python version
- "ROS 2 integration not available": Make sure ROS 2 is installed and properly set up in your environment
- "Error initializing ROS commands": Check that you have properly sourced your ROS 2 setup file
- Integration with ROS: Source your ROS 2 environment before running:
source /opt/ros/humble/setup.bash && rai-debug
Options
-k, --api-key <key>: OpenAI API key-p, --port <port>: Port to run the server on (default: 8501)-i, --install-deps: Install required Python dependencies-d, --debug: Enable debug mode with more verbose output-v, --version: Show version-h, --help: Show help
License
Apache-2.0
