Skip to content

ucmercedrobotics/gpt-mission-planner

 
 

Repository files navigation

GPT-Powered Robot Mission Planner

github website python pre-commits Code style: black Checked with mypy

Make sure you initialize the repo with pre-commit hooks:

make repo-init

How To Run GPT Mission Planner

GPT Token

Create a .env file and add your API tokens:

OPENAI_API_KEY=<my_token_here>
ANTHROPIC_API_KEY=<my_token_here>

Docker

On ARM Macs, SPOT will be built from source. If necessary, you can force building SPOT from source on x86/64 by running make build-image BUILD_SPOT=true.

On linux, you may need to install netcat-openbsd.

On arm macs, SPOT will be built from source. If necessary, you can force building SPOT from source on x86/64 by running make build-image BUILD_SPOT=true.

$ make build-image
$ make bash

The above two commands will start the build and bash process of the Docker environment to execute your GPT Mission Planner. From within the Docker container, execute make run to request your first mission plan.

Current Process

This can connect to AgBot over TCP, but running it standalone to debug mission plans can be done as follows:

$ make server
nc -l 0.0.0.0 12345
...

Make sure to run this first before running the mission planner (make run).

Example Execution:

On the host machine running a listening server. Make sure the IP/port matches the YAML config file IP/port:

$ make server
nc -l 0.0.0.0 12345
...
$ make build-image
docker build . -t gpt-mission-planner --target local
...
...

$ make bash
docker run -it --rm \
        -v ./Makefile:/gpt-mission-planner/Makefile:Z \
        -v ./app/:/gpt-mission-planner/app:Z \
        --env-file .env \
        --net=host \
        gpt-mission-planner \
        /bin/bash
root@linuxkit-965cbccc7c1e:/gpt-mission-planner#

root@linuxkit-965cbccc7c1e:/gpt-mission-planner# make run
python3 ./app/mission_planner.py
Enter the specifications for your mission plan: Take a thermal picture of every other tree on the farm.
File sent successfully.

Graphical UI

A web+mobile app implementation of this program is under development at https://github.com/thomasm6m6/mpui/.

Example Queries

The following queries are used to demonstrate the capabilities of this system:

Explicit queries

Implict queries

Farmer queries

About

ChatGPT Powered Robotic Mission Planner

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 58.5%
  • Jupyter Notebook 30.3%
  • Jinja 8.2%
  • Dockerfile 2.1%
  • Makefile 0.9%