Repolode
fujitatomoya

fujitatomoya/ros2ai

A ROS 2 command line extension that lets you query, explore and run ROS 2 commands in natural language using OpenAI or Ollama LLMs.

Stars
335
Forks
27
Open issues
7
Last commit
yesterday

What is it?

ros2ai adds an AI-powered subcommand to the ROS 2 command line, so developers can ask questions about ROS 2 or issue requests in plain language instead of looking up exact CLI syntax. It is aimed at beginners and students who are not yet familiar with ros2cli.

The tool offers three main modes: status checks whether the configured API key or endpoint is valid, query returns answers and suggested commands for a question, and exec runs the appropriate ROS 2 command for a request, such as listing nodes or showing topic details. Questions can be asked in languages other than English.

The backend uses the OpenAI Python API, which can also talk to a local Ollama server that exposes an OpenAI-compatible endpoint. Model, endpoint and temperature are set through environment variables. It is installable as a Debian package or runnable in Docker, and it supports the Humble, Jazzy, Kilted and Rolling ROS 2 distributions.

Key features

  • 01Answers ROS 2 questions and suggests the matching ros2 command.
  • 02Executes natural-language requests such as listing nodes or topic details.
  • 03Works with OpenAI models or a local Ollama server via an OpenAI-compatible endpoint.
  • 04Configurable model, endpoint and temperature through environment variables.
  • 05Available as a Debian package or Docker image, and buildable with colcon.

Use cases

  • Learning ROS 2 CLI commands as a beginner or student.
  • Quickly looking up the right ros2 command for a task without browsing documentation.
  • Running a local Ollama model to query a ROS 2 system without sending requests to a cloud API.

Quick start

  1. 1

    Install the binary package for ROS 2 Kilted

    apt install ros-kilted-ros2ai
  2. 2

    Install required Python packages (rolling, kilted, jazzy)

    pip install openai ollama validators --break-system-packages --ignore-installed
  3. 3

    Set your OpenAI API key, or set up Ollama and pull a model

    export OPENAI_API_KEY='your-api-key-here'

Things to know

  • Requires an OpenAI API key or a running Ollama service with a downloaded model.
  • No released package is available for some setups; building from source in a colcon workspace is needed.
  • Only supports ROS 2 Humble, Jazzy, Kilted and Rolling distributions.

In collections

Topics

FAQ

What is ros2ai?
A ROS 2 command line extension that lets you query, explore and run ROS 2 commands in natural language using OpenAI or Ollama LLMs. ros2ai adds an AI-powered subcommand to the ROS 2 command line, so developers can ask questions about ROS 2 or issue requests in plain language instead of looking up exact CLI syntax. It is aimed at beginners and students who are not yet familiar with ros2cli.
Is ros2ai free to use? What license does it have?
ros2ai is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is ros2ai still maintained?
Actively maintained. The last commit to ros2ai was on Nov 6, 2026.
What can I use ros2ai for?
Learning ROS 2 CLI commands as a beginner or student. Quickly looking up the right ros2 command for a task without browsing documentation. Running a local Ollama model to query a ROS 2 system without sending requests to a cloud API.
How do I install ros2ai?
Install the binary package for ROS 2 Kilted: apt install ros-kilted-ros2ai Install required Python packages (rolling, kilted, jazzy): pip install openai ollama validators --break-system-packages --ignore-installed Set your OpenAI API key, or set up Ollama and pull a model: export OPENAI_API_KEY='your-api-key-here'
Where can I get ros2ai?
The source code and installation instructions are on GitHub: https://github.com/fujitatomoya/ros2ai

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects