Environment Setup Guide
Overview
This guide provides detailed instructions for setting up the development environment required for the Physical AI & Humanoid Robotics course. The setup includes ROS 2, simulation environments, AI frameworks, and all necessary dependencies.
Development Environment Setup Flow
┌─────────────────────────────────────────────────────────────────┐
│ System Prerequisites │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ Hardware │ │ Operating │ │ User Account & │ │
│ │ Requirements │ │ System │ │ Dependencies │ │
│ │ │ │ Requirements │ │ │ │
│ │ • GPU/CUDA │ │ • Ubuntu │ │ • sudo privileges │ │
│ │ • RAM/Storage │ │ • Kernel │ │ • Git, curl, wget │ │
│ └──────────────┘ └──────────────┘ └──────────────────────┘ │
└─────────────────────────────────┬───────────────────────────────┘
│
┌─────────────────────────────────▼───────────────────────────────┐
│ Core Frameworks Setup │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ ROS 2 │ │ NVIDIA & │ │ Python Environment │ │
│ │ Installation│ │ Isaac │ │ & AI Libraries │ │
│ │ │ │ Installation │ │ │ │
│ │ • Humble │ │ • GPU Drivers│ │ • Virtual Env │ │
│ │ • Packages │ │ • Isaac Sim │ │ • PyTorch, TF, etc │ │
│ │ • Tools │ │ • Isaac ROS │ │ • OpenAI Whisper │ │
│ └──────────────┘ └──────────────┘ └──────────────────────┘ │
└─────────────────────────────────┬───────────────────────────────┘
│
┌─────────────────────────────────▼───────────────────────────────┐
│ Simulation Environments │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ Gazebo │ │ Unity │ │ Development Tools │ │
│ │ Installation│ │ Installation│ │ & Configuration │ │
│ │ │ │ │ │ │ │
│ │ • Physics │ │ • Rendering │ │ • VS Code/Editors │ │
│ │ • Simulation │ │ • HRI │ │ • Aliases & Paths │ │
│ └──────────────┘ └──────────────┘ └──────────────────────┘ │
└─────────────────────────────────┬───────────────────────────────┘
│
┌───────▼───────┐
│ Verification │
│ & Testing │
└───────────────┘
Prerequisites
Hardware Requirements
- CPU: Multi-core processor (Intel i7 or AMD Ryzen equivalent recommended)
- RAM: 16GB minimum, 32GB recommended
- GPU: NVIDIA GPU with compute capability 6.0+ (RTX series recommended)
- Storage: 100GB+ free space for all components
- Network: Reliable internet connection for downloads
Software Requirements
- Operating System: Ubuntu 22.04 LTS (recommended) or Ubuntu 20.04 LTS
- Kernel: Latest stable kernel for optimal hardware support
- User Account: Non-root user with sudo privileges
ROS 2 Installation
1. System Preparation
# Update system packages
sudo apt update && sudo apt upgrade -y
# Install locale support
sudo apt install locales
sudo locale-gen en_US.UTF-8
sudo update-locale LANG=en_US.UTF-8
2. Set Up Sources
# Add ROS 2 GPG key
sudo apt update && sudo apt install -y curl gnupg lsb-release
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
# Add ROS 2 repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
3. Install ROS 2 Humble Hawksbill
# Update package list
sudo apt update
# Install ROS 2 desktop package
sudo apt install -y ros-humble-desktop
# Install colcon build tools
sudo apt install -y python3-colcon-common-extensions
# Install additional ROS packages
sudo apt install -y python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
4. Initialize rosdep
# Initialize rosdep
sudo rosdep init
rosdep update
5. Set Up ROS 2 Environment
# Source ROS 2 in your shell
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
source ~/.bashrc
NVIDIA Isaac Setup
1. Install NVIDIA GPU Drivers
# Check for available drivers
ubuntu-drivers devices
# Install recommended NVIDIA driver
sudo ubuntu-drivers autoinstall
# Reboot after installation
sudo reboot
2. Verify GPU and Driver Installation
# Check GPU
nvidia-smi
# Check CUDA version
nvcc --version
3. Install Isaac Sim
- Download Isaac Sim from NVIDIA Developer website
- Extract the downloaded package
- Run the installation script:
# Navigate to extracted Isaac Sim directory
cd isaac_sim_path
bash install_deps.sh
4. Install Isaac ROS Dependencies
# Install Isaac ROS dependencies
sudo apt install -y python3-pip python3-dev
# Install Python dependencies
pip3 install --user numpy scipy matplotlib
# Install CUDA toolkit (if not already installed)
wget https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run
sudo sh cuda_12.2.0_535.54.03_linux.run
Python Environment Setup
1. Install Python 3.10
# Install Python 3.10 and pip
sudo apt update
sudo apt install -y python3.10 python3.10-venv python3.10-dev python3-pip
# Set Python 3.10 as default (optional)
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
2. Create Virtual Environment
# Create virtual environment
python3 -m venv ~/physical_ai_env
# Activate virtual environment
source ~/physical_ai_env/bin/activate
# Upgrade pip
pip install --upgrade pip
3. Install Python Dependencies
# Activate environment
source ~/physical_ai_env/bin/activate
# Install core dependencies
pip install numpy scipy matplotlib pandas
# Install AI/ML libraries
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install tensorflow
pip install transformers # For LLM integration
# Install audio processing libraries
pip install pyaudio speechrecognition
# Install OpenAI Whisper
pip install openai-whisper
# Install other dependencies
pip install opencv-python open3d
Gazebo Installation
Install Gazebo Garden
# Add Gazebo repository
sudo curl -sSL http://get.gazebosim.org | sh
# Install Gazebo Garden
sudo apt install gz-garden
Unity Setup (Optional)
For Unity-based simulation:
- Download Unity Hub from Unity website
- Install Unity Hub and use it to install Unity 2022.3 LTS
- Install required Unity packages for robotics:
- Universal Render Pipeline
- Visual Effect Graph
- ProBuilder
Development Tools
1. Install Git and Version Control
sudo apt install -y git git-lfs
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
2. Install IDE/Editor
Choose one of the following:
For VS Code:
sudo snap install --classic code
# Install ROS extension in VS Code
For other editors:
- Vim with ROS plugins
- Emacs with ROS packages
- PyCharm with ROS integration
3. Install Additional Tools
# Install monitoring tools
sudo apt install htop iotop nethogs
# Install build tools
sudo apt install cmake build-essential
# Install network tools
sudo apt install net-tools curl wget
Verification Steps
1. Verify ROS 2 Installation
# Source ROS 2
source /opt/ros/humble/setup.bash
# Test ROS 2
ros2 run demo_nodes_cpp talker
# In another terminal, run: ros2 run demo_nodes_py listener
2. Verify Python Environment
# Activate environment
source ~/physical_ai_env/bin/activate
# Test Python packages
python3 -c "import torch; print('PyTorch:', torch.__version__)"
python3 -c "import cv2; print('OpenCV:', cv2.__version__)"
python3 -c "import whisper; print('Whisper: installed')"
3. Verify GPU Acceleration
# Check CUDA
nvidia-smi
nvcc --version
# Test PyTorch with GPU
python3 -c "import torch; print('CUDA available:', torch.cuda.is_available())"
Troubleshooting Common Issues
1. ROS 2 Installation Issues
Problem: Package not found during ROS 2 installation
- Solution: Verify Ubuntu version is supported and repository is correctly added
Problem: rosdep initialization fails
- Solution: Check internet connection and try again, or manually initialize
2. GPU Issues
Problem: nvidia-smi command not found
- Solution: Install NVIDIA drivers properly and reboot
Problem: CUDA not working with PyTorch
- Solution: Ensure CUDA version compatibility with PyTorch version
3. Isaac Sim Issues
Problem: Isaac Sim fails to launch
- Solution: Verify GPU drivers and check system requirements
Problem: Isaac Sim performance issues
- Solution: Check system resources and adjust quality settings
4. Python Environment Issues
Problem: Package installation fails
- Solution: Check virtual environment activation and internet connection
Problem: Audio packages not working
- Solution: Check audio system setup and permissions
Environment Configuration
1. Bash Profile Setup
Add these lines to your ~/.bashrc:
# ROS 2 setup
source /opt/ros/humble/setup.bash
# Python virtual environment (optional - uncomment if desired)
# source ~/physical_ai_env/bin/activate
# Custom aliases for robotics development
alias cb='cd ~/ros2_ws && colcon build'
alias sb='source ~/ros2_ws/install/setup.bash'
alias rb='cd ~/ros2_ws && colcon build && source install/setup.bash'
2. Workspace Setup
# Create ROS 2 workspace
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws
# Build workspace (initially empty)
colcon build
# Source workspace
source install/setup.bash
Testing the Complete Setup
1. Basic ROS 2 Test
# Test basic communication
ros2 run demo_nodes_cpp talker &
ros2 run demo_nodes_py listener
2. Python AI Test
# Activate environment
source ~/physical_ai_env/bin/activate
# Test AI libraries
python3 -c "
import torch
import numpy as np
import cv2
import whisper
print('All libraries loaded successfully')
print('CUDA available:', torch.cuda.is_available())
"
3. Simulation Test
Launch a basic Gazebo simulation:
gz sim -v 4
Maintenance and Updates
1. Regular Updates
# Update system packages
sudo apt update && sudo apt upgrade -y
# Update ROS 2 packages
sudo apt update && sudo apt upgrade -y ros-humble-*
# Update Python packages (in virtual environment)
source ~/physical_ai_env/bin/activate
pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
2. Backup Configuration
Create a backup of your setup configuration:
# Create setup script backup
cp ~/.bashrc ~/setup_backup/bashrc_backup_$(date +%Y%m%d)
cp -r ~/physical_ai_env ~/setup_backup/python_env_backup_$(date +%Y%m%d)
Summary
This setup guide provides a complete environment for the Physical AI & Humanoid Robotics course. After completing these steps, you should have:
- ROS 2 Humble Hawksbill installed and configured
- NVIDIA GPU drivers and Isaac Sim ready
- Python environment with AI/ML libraries
- Gazebo simulation environment
- All necessary development tools
The environment is ready for all course modules including ROS 2 communication, simulation, AI perception, and Vision-Language-Action integration. Regular maintenance and updates will keep your environment current and secure.
Accessibility Features
This setup guide includes the following accessibility features:
- Semantic HTML structure with proper heading hierarchy (H1, H2, H3)
- Sufficient color contrast for text and background
- Clear navigation structure with logical tab order
- Descriptive headings and section titles
- Keyboard navigable interactive elements
- Code blocks with syntax highlighting for better readability