ros2ai  by fujitatomoya

CLI tool extends ROS 2 with LLMs

created 1 year ago
268 stars

Top 96.5% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a ROS 2 command-line interface (CLI) extension that integrates with Large Language Models (LLMs) like OpenAI and Ollama. It aims to simplify ROS 2 interactions for beginners and experienced users alike by allowing natural language queries to retrieve information, execute commands, and understand ROS 2 concepts.

How It Works

The extension leverages the OpenAI Python API or Ollama's compatible API to process natural language queries. It then translates these queries into executable ROS 2 commands or provides explanations of ROS 2 concepts. The backend can be configured to use either OpenAI or Ollama, with environment variables controlling API keys, model names, and endpoints.

Quick Start & Requirements

  • Installation (Docker): docker run -it --rm --net=host -e OPENAI_API_KEY=$OPENAI_API_KEY tomoyafujita/ros2ai:humble (OpenAI API key not required for Ollama).
  • Installation (Package): pip install openai ollama validators --break-system-packages --ignore-installed (for Rolling/Jazzy) or pip install openai ollama validators --ignore-installed (for Humble).
  • Prerequisites: OpenAI API key (optional, if not using Ollama), Ollama service running (if using Ollama), Python.
  • Build: Requires building from source using colcon build in a ROS 2 workspace.
  • Demo: https://github.com/fujitatomoya/ros2ai/assets/43395114/78a0799b-40e3-4dc8-99cb-488994e94769

Highlighted Details

  • Supports ROS 2 distributions: Rolling Ridley, Jazzy Jalisco, Humble Hawksbill.
  • Allows natural language queries for ROS 2 commands (ros2 ai exec "...").
  • Supports multiple languages for queries.
  • Can be configured to use OpenAI or Ollama as the LLM backend.

Maintenance & Community

  • Project is hosted on GitHub. No specific community channels (Discord/Slack) or roadmap are explicitly mentioned in the README.

Licensing & Compatibility

  • The README does not explicitly state a license.

Limitations & Caveats

  • Requires building from source for direct installation, as no released package is available.
  • The --break-system-packages flag is required for installation on some Python environments due to PEP 668, which may have implications for system stability.
  • The license is not specified, which could impact commercial use or integration into closed-source projects.
Health Check
Last commit

1 month ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
1
Star History
16 stars in the last 90 days

Explore Similar Projects

Starred by Peter Norvig Peter Norvig(Author of Artificial Intelligence: A Modern Approach; Research Director at Google).

python-openai-demos by pamelafox

0%
374
Python scripts for OpenAI API demos
created 1 year ago
updated 1 week ago
Feedback? Help us improve.