From fd690889d33841d53736119c8552d52cbe123b43 Mon Sep 17 00:00:00 2001 From: Paul Nechifor Date: Thu, 30 Oct 2025 05:22:50 +0200 Subject: [PATCH 1/4] improve readme --- README.md | 69 +++++++--------------------- bootstrap-repo.sh | 114 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+), 52 deletions(-) create mode 100755 bootstrap-repo.sh diff --git a/README.md b/README.md index 1db93e9887..04f8cc9ec3 100644 --- a/README.md +++ b/README.md @@ -59,87 +59,52 @@ We are shipping a first look at the DIMOS x Unitree Go2 integration, allowing fo Tested on Ubuntu 22.04/24.04 ```bash -sudo apt install python3-venv - -# Clone the repository git clone --branch dev --single-branch https://github.com/dimensionalOS/dimos.git cd dimos - -# Create and activate virtual environment -python3 -m venv venv -source venv/bin/activate - -sudo apt install portaudio19-dev python3-pyaudio - -# Install LFS -sudo apt install git-lfs -git lfs install - -# Install torch and torchvision if not already installed -# Example CUDA 11.7, Pytorch 2.0.1 (replace with your required pytorch version if different) -pip install torch==2.0.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 +./bootstrap-repo.sh ``` -#### Install dependencies -```bash -# CPU only (reccomended to attempt first) -pip install -e .[cpu,dev] +#### Configuration -# CUDA install -pip install -e .[cuda,dev] +Open `.env` and customize the environment variables you need. -# Copy and configure environment variables -cp default.env .env -``` +* Set `OPENAI_API_KEY` if you want to run agentic robots. Make sure you have access to `gpt-4o`. +* Set `ALIBABA_API_KEY` for the Qwen VL uses +* Set `ROBOT_IP` to control the robot. #### Test the install ```bash -pytest -s dimos/ +pytest -s dimos ``` #### Test Dimensional with a replay UnitreeGo2 stream (no robot required) ```bash -CONNECTION_TYPE=replay python dimos/robot/unitree_webrtc/unitree_go2.py +dimos-robot --replay run unitree-go2 ``` -#### Test Dimensional with a simulated UnitreeGo2 in MuJoCo (no robot required) +#### Test Dimensional with a simulated UnitreeGo2 in a MuJoCo simulator (no robot required) ```bash -pip install -e .[sim] -export DISPLAY=:1 # Or DISPLAY=:0 if getting GLFW/OpenGL X11 errors -CONNECTION_TYPE=mujoco python dimos/robot/unitree_webrtc/unitree_go2.py +dimos-robot --simulation run unitree-go2 ``` #### Test Dimensional with a real UnitreeGo2 over WebRTC ```bash -export ROBOT_IP=192.168.X.XXX # Add the robot IP address -python dimos/robot/unitree_webrtc/unitree_go2.py +dimos-robot --robot-ip=192.168.X.XXX run unitree-go2 ``` +You can add `ROBOT_IP=192.168.X.XXX` in `.env` and omit `--robot-ip`. + #### Test Dimensional with a real UnitreeGo2 running Agents *OpenAI / Alibaba keys required* ```bash -export ROBOT_IP=192.168.X.XXX # Add the robot IP address -python dimos/robot/unitree_webrtc/run_agents2.py +dimos-robot --robot-ip=192.168.X.XXX run unitree-go2-agentic ``` ---- - -### Agent API keys - -Full functionality will require API keys for the following: -Requirements: -- OpenAI API key (required for all LLMAgents due to OpenAIEmbeddings) -- Claude API key (required for ClaudeAgent) -- Alibaba API key (required for Navigation skills) +In a separate terminal run `human-cli` and instruct it to do something (e.g. "Do a pounce.") -These keys can be added to your .env file or exported as environment variables. -``` -export OPENAI_API_KEY= -export CLAUDE_API_KEY= -export ALIBABA_API_KEY= -``` +--- -### ROS2 Unitree Go2 SDK Installation +### ROS2 Unitree Go2 SDK Installation (OUT OF DATE) #### System Requirements - Ubuntu 22.04 diff --git a/bootstrap-repo.sh b/bootstrap-repo.sh new file mode 100755 index 0000000000..ec16dcc913 --- /dev/null +++ b/bootstrap-repo.sh @@ -0,0 +1,114 @@ +#!/bin/bash + +set -euo pipefail + +readonly COLOR_RESET='\033[0m' +readonly COLOR_RED='\033[0;31m' +readonly COLOR_GREEN='\033[0;32m' +readonly COLOR_YELLOW='\033[0;33m' +readonly COLOR_BLUE='\033[0;34m' +readonly COLOR_CYAN='\033[0;36m' +readonly COLOR_BOLD='\033[1m' + +log_info() { + echo -e "${COLOR_BLUE}${COLOR_BOLD}==>${COLOR_RESET} ${COLOR_BOLD}$*${COLOR_RESET}" +} + +log_success() { + echo -e "${COLOR_GREEN}${COLOR_BOLD}✓${COLOR_RESET} ${COLOR_GREEN}$*${COLOR_RESET}" +} + +log_warning() { + echo -e "${COLOR_YELLOW}${COLOR_BOLD}⚠${COLOR_RESET} ${COLOR_YELLOW}$*${COLOR_RESET}" +} + +log_error() { + echo -e "${COLOR_RED}${COLOR_BOLD}✗${COLOR_RESET} ${COLOR_RED}$*${COLOR_RESET}" >&2 +} + +log_prompt() { + echo -e "${COLOR_CYAN}${COLOR_BOLD}?${COLOR_RESET} ${COLOR_CYAN}$*${COLOR_RESET}" +} + +# Check Ubuntu version +IS_COMPATIBLE=false +if [ -f /etc/os-release ]; then + . /etc/os-release + if [[ "$ID" == "ubuntu" ]]; then + UBUNTU_VERSION=$(echo "$VERSION_ID" | cut -d. -f1) + if [[ "$UBUNTU_VERSION" == "22" || "$UBUNTU_VERSION" == "24" ]]; then + IS_COMPATIBLE=true + log_success "Detected Ubuntu $VERSION_ID - compatible version" + fi + fi +fi + +if [[ "$IS_COMPATIBLE" == "false" ]]; then + log_warning "This script is designed for Ubuntu 22.04 or 24.04. It might not work correctly on your system." + read -p "Do you want to continue anyway? (y/N) " -n 1 -r + echo + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + log_error "Installation cancelled" + exit 1 + fi +fi + +log_info "Installing system dependencies..." + +sudo apt update + +ubuntu_packages=( + build-essential # Development tools + git-lfs # For LFS. + libturbojpeg0-dev # For fast encoding JPEG in transports + portaudio19-dev + python3-pyaudio + python3-venv # For the virtual environment +) + +sudo apt install -y "${ubuntu_packages[@]}" +log_success "System dependencies installed" + +log_info "Installing git lfs..." +git lfs install +log_success "Git LFS installed" + +log_info "Creating the python virtual environment..." +python3 -m venv venv +source venv/bin/activate +log_success "Python virtual environment created and activated" + +log_info "Installing python dependencies..." +pip install -e .[cpu,dev,sim] 'mmengine>=0.10.3' 'mmcv>=2.1.0' +log_success "Python dependencies installed" + +log_info "Downloading MuJoCo Menagerie..." +python -m mujoco_playground || true +log_success "MuJoCo Menagerie downloaded" + +log_info "Copying default .env file..." +cp default.env .env +log_success "Default .env file copied" + +# Check if Foxglove is installed and ask user if they want to install it +if ! command -v foxglove-studio >/dev/null 2>&1; then + log_warning "Foxglove Studio is not installed" + log_prompt "Would you like to install Foxglove Studio? (y/N)" + read -p "" -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + log_info "Downloading Foxglove Studio..." + wget https://get.foxglove.dev/desktop/latest/foxglove-studio-latest-linux-amd64.deb + log_info "Installing Foxglove Studio..." + sudo apt install -y ./foxglove-studio-*.deb + rm ./foxglove-studio-*.deb + log_success "Foxglove Studio installed" + else + log_info "Skipping Foxglove Studio installation" + fi +else + log_success "Foxglove Studio is already installed" +fi + +log_success "Repository bootstrap complete!" +log_info "To activate the virtual environment in the future, run: source venv/bin/activate" From fe67b64efa9586147ee295938b956ab9530e7a49 Mon Sep 17 00:00:00 2001 From: Paul Nechifor Date: Fri, 7 Nov 2025 06:25:07 +0200 Subject: [PATCH 2/4] remove bootstrap-repo.sh --- README.md | 40 +++++++++++++--- bootstrap-repo.sh | 114 ---------------------------------------------- 2 files changed, 34 insertions(+), 120 deletions(-) delete mode 100755 bootstrap-repo.sh diff --git a/README.md b/README.md index 04f8cc9ec3..963e89af93 100644 --- a/README.md +++ b/README.md @@ -59,9 +59,37 @@ We are shipping a first look at the DIMOS x Unitree Go2 integration, allowing fo Tested on Ubuntu 22.04/24.04 ```bash +sudo apt install python3-venv + +# Clone the repository git clone --branch dev --single-branch https://github.com/dimensionalOS/dimos.git cd dimos -./bootstrap-repo.sh + +# Create and activate virtual environment +python3 -m venv venv +source venv/bin/activate + +sudo apt install portaudio19-dev python3-pyaudio + +# Install LFS +sudo apt install git-lfs +git lfs install + +# Install torch and torchvision if not already installed +# Example CUDA 11.7, Pytorch 2.0.1 (replace with your required pytorch version if different) +pip install torch==2.0.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 +``` + +#### Install dependencies +```bash +# CPU only (reccomended to attempt first) +pip install -e .[cpu,dev] + +# CUDA install +pip install -e .[cuda,dev] + +# Copy and configure environment variables +cp default.env .env ``` #### Configuration @@ -74,7 +102,7 @@ Open `.env` and customize the environment variables you need. #### Test the install ```bash -pytest -s dimos +pytest -s dimos/ ``` #### Test Dimensional with a replay UnitreeGo2 stream (no robot required) @@ -82,8 +110,10 @@ pytest -s dimos dimos-robot --replay run unitree-go2 ``` -#### Test Dimensional with a simulated UnitreeGo2 in a MuJoCo simulator (no robot required) +#### Test Dimensional with a simulated UnitreeGo2 in MuJoCo (no robot required) ```bash +pip install -e .[sim] +export DISPLAY=:1 # Or DISPLAY=:0 if getting GLFW/OpenGL X11 errors dimos-robot --simulation run unitree-go2 ``` @@ -102,9 +132,7 @@ dimos-robot --robot-ip=192.168.X.XXX run unitree-go2-agentic In a separate terminal run `human-cli` and instruct it to do something (e.g. "Do a pounce.") ---- - -### ROS2 Unitree Go2 SDK Installation (OUT OF DATE) +### ROS2 Unitree Go2 SDK Installation #### System Requirements - Ubuntu 22.04 diff --git a/bootstrap-repo.sh b/bootstrap-repo.sh deleted file mode 100755 index ec16dcc913..0000000000 --- a/bootstrap-repo.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -readonly COLOR_RESET='\033[0m' -readonly COLOR_RED='\033[0;31m' -readonly COLOR_GREEN='\033[0;32m' -readonly COLOR_YELLOW='\033[0;33m' -readonly COLOR_BLUE='\033[0;34m' -readonly COLOR_CYAN='\033[0;36m' -readonly COLOR_BOLD='\033[1m' - -log_info() { - echo -e "${COLOR_BLUE}${COLOR_BOLD}==>${COLOR_RESET} ${COLOR_BOLD}$*${COLOR_RESET}" -} - -log_success() { - echo -e "${COLOR_GREEN}${COLOR_BOLD}✓${COLOR_RESET} ${COLOR_GREEN}$*${COLOR_RESET}" -} - -log_warning() { - echo -e "${COLOR_YELLOW}${COLOR_BOLD}⚠${COLOR_RESET} ${COLOR_YELLOW}$*${COLOR_RESET}" -} - -log_error() { - echo -e "${COLOR_RED}${COLOR_BOLD}✗${COLOR_RESET} ${COLOR_RED}$*${COLOR_RESET}" >&2 -} - -log_prompt() { - echo -e "${COLOR_CYAN}${COLOR_BOLD}?${COLOR_RESET} ${COLOR_CYAN}$*${COLOR_RESET}" -} - -# Check Ubuntu version -IS_COMPATIBLE=false -if [ -f /etc/os-release ]; then - . /etc/os-release - if [[ "$ID" == "ubuntu" ]]; then - UBUNTU_VERSION=$(echo "$VERSION_ID" | cut -d. -f1) - if [[ "$UBUNTU_VERSION" == "22" || "$UBUNTU_VERSION" == "24" ]]; then - IS_COMPATIBLE=true - log_success "Detected Ubuntu $VERSION_ID - compatible version" - fi - fi -fi - -if [[ "$IS_COMPATIBLE" == "false" ]]; then - log_warning "This script is designed for Ubuntu 22.04 or 24.04. It might not work correctly on your system." - read -p "Do you want to continue anyway? (y/N) " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]]; then - log_error "Installation cancelled" - exit 1 - fi -fi - -log_info "Installing system dependencies..." - -sudo apt update - -ubuntu_packages=( - build-essential # Development tools - git-lfs # For LFS. - libturbojpeg0-dev # For fast encoding JPEG in transports - portaudio19-dev - python3-pyaudio - python3-venv # For the virtual environment -) - -sudo apt install -y "${ubuntu_packages[@]}" -log_success "System dependencies installed" - -log_info "Installing git lfs..." -git lfs install -log_success "Git LFS installed" - -log_info "Creating the python virtual environment..." -python3 -m venv venv -source venv/bin/activate -log_success "Python virtual environment created and activated" - -log_info "Installing python dependencies..." -pip install -e .[cpu,dev,sim] 'mmengine>=0.10.3' 'mmcv>=2.1.0' -log_success "Python dependencies installed" - -log_info "Downloading MuJoCo Menagerie..." -python -m mujoco_playground || true -log_success "MuJoCo Menagerie downloaded" - -log_info "Copying default .env file..." -cp default.env .env -log_success "Default .env file copied" - -# Check if Foxglove is installed and ask user if they want to install it -if ! command -v foxglove-studio >/dev/null 2>&1; then - log_warning "Foxglove Studio is not installed" - log_prompt "Would you like to install Foxglove Studio? (y/N)" - read -p "" -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - log_info "Downloading Foxglove Studio..." - wget https://get.foxglove.dev/desktop/latest/foxglove-studio-latest-linux-amd64.deb - log_info "Installing Foxglove Studio..." - sudo apt install -y ./foxglove-studio-*.deb - rm ./foxglove-studio-*.deb - log_success "Foxglove Studio installed" - else - log_info "Skipping Foxglove Studio installation" - fi -else - log_success "Foxglove Studio is already installed" -fi - -log_success "Repository bootstrap complete!" -log_info "To activate the virtual environment in the future, run: source venv/bin/activate" From 4228579659e0dfdcac3206ed2bdc047fceb8e875 Mon Sep 17 00:00:00 2001 From: Paul Nechifor Date: Fri, 7 Nov 2025 06:28:27 +0200 Subject: [PATCH 3/4] updated Qwen description --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 963e89af93..8e0f70bdea 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ cp default.env .env Open `.env` and customize the environment variables you need. * Set `OPENAI_API_KEY` if you want to run agentic robots. Make sure you have access to `gpt-4o`. -* Set `ALIBABA_API_KEY` for the Qwen VL uses +* Set `ALIBABA_API_KEY` for Qwen VL (used by agents). * Set `ROBOT_IP` to control the robot. #### Test the install From 4c39671b03323fe9c648f9eff4136a71ee23cb85 Mon Sep 17 00:00:00 2001 From: Paul Nechifor Date: Fri, 7 Nov 2025 08:11:30 +0200 Subject: [PATCH 4/4] add libturbojpeg0-dev --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e0f70bdea..9869eaae73 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ cd dimos python3 -m venv venv source venv/bin/activate -sudo apt install portaudio19-dev python3-pyaudio +sudo apt install portaudio19-dev python3-pyaudio libturbojpeg0-dev # Install LFS sudo apt install git-lfs @@ -113,6 +113,7 @@ dimos-robot --replay run unitree-go2 #### Test Dimensional with a simulated UnitreeGo2 in MuJoCo (no robot required) ```bash pip install -e .[sim] +python -m mujoco_playground || true # Download the MuJoCo Menagerie. export DISPLAY=:1 # Or DISPLAY=:0 if getting GLFW/OpenGL X11 errors dimos-robot --simulation run unitree-go2 ```