A comprehensive textbook covering the fundamental and advanced concepts of Physical AI and Humanoid Robotics, from ROS 2 fundamentals to Visual Language-Action (VLA) models.
This textbook provides a structured learning path for students and practitioners interested in robotics, artificial intelligence, and human-robot interaction. It covers the complete spectrum of humanoid robotics, from basic communication frameworks to advanced AI-powered decision making.
Learn the Robot Operating System 2 (ROS 2), the foundational framework for robot software development.
Chapters:
- Introduction & Architecture
- CLI Tools, Packages & Client Libraries
- Data Types & Transformations
- Launch Files & Labs
Topics Covered:
- Nodes, topics, services, and actions
- Package and workspace management
- Python and C++ client libraries
- Coordinate transformations with tf2
- System orchestration
Master robotic simulation environments for developing and testing robotic systems without physical hardware.
Chapters:
- Robotic Simulation Environments
- Robot Description & ROS Integration
- Physics, Sensors & Kinematics
- Labs - Robot Models & Sensors
Topics Covered:
- Gazebo and simulation platforms
- URDF and SDF robot descriptions
- Physics engine configuration
- Sensor simulation (lidar, camera, IMU)
- Forward and inverse kinematics
Explore the artificial intelligence aspects of robotics, including perception, navigation, and manipulation.
Chapters:
- Perception & SLAM
- Navigation, Path Planning & State Estimation
- Robot Manipulation & Labs
Topics Covered:
- Computer vision and perception systems
- Simultaneous Localization and Mapping (SLAM)
- ROS 2 Navigation Stack
- Path planning algorithms (A*, RRT)
- State estimation (Kalman filters, particle filters)
- Robot manipulation with MoveIt 2
Discover the cutting-edge intersection of large language models, computer vision, and robotic action.
Chapters:
- LLMs & Vision-Language Models
- VLA Integration & NLU
- Action Generation & Labs
- Case Studies & Ethics
Topics Covered:
- Transformer architecture and LLMs
- Vision-language models (VLMs)
- Natural language understanding for robotics
- Visual Language-Action integration
- Ethical considerations in AI robotics
- Basic programming knowledge (Python recommended)
- Understanding of linear algebra and calculus
- Familiarity with Linux command line
# Install ROS 2 Humble (recommended)
sudo apt update
sudo apt install ros-humble-desktoppip install numpy opencv-python cv-bridge# Install dependencies
npm install
# Start development server
npm run start# Build the documentation
npm run build
# Serve locally
npm run serveEach module includes hands-on lab exercises:
- Lab 1: ROS 2 Basic Communication
- Lab 2: ROS 2 Service & Action
- Lab 3: Robot Model in Simulation
- Lab 4: Sensor Integration & Data Acquisition
- Lab 5: SLAM and Navigation
- Lab 6: Object Detection & Grasping
- Lab 7: Natural Language Task Planning
- Lab 8: VLA for Environment Interaction
After completing this textbook, you will be able to:
- Develop ROS 2 applications for robot communication
- Create and simulate robot models in Gazebo
- Implement perception and navigation systems
- Apply AI techniques for robot control
- Integrate natural language with robotic actions
- Consider ethical implications in AI robotics
Contributions are welcome! Please read our contributing guidelines before submitting pull requests.
This textbook is for educational purposes.
This project includes a FastAPI backend with an intelligent RAG Agent for the Physical AI Textbook chatbot.
- FastAPI Backend: REST API server running on localhost:8000
- RAG Agent: Intelligent agent using OpenAI GPT-4o-mini and Qdrant vector database
- Two Query Modes:
/chat- Normal chat query/chat-with-context- Contextual chat with selected text
- Source Citations: Answers include module, chapter, and section references
# Navigate to backend
cd backend
python -m venv venv
venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Copy and configure environment
cp .env.example .env
# Add your API keys to .env
# Start the server
uvicorn src.main:app --reload --port 8000| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Health check |
/chat |
POST | Normal chat query |
/chat-with-context |
POST | Contextual chat with selected text |
# Health check
curl http://localhost:8000/health
# Normal chat
curl -X POST http://localhost:8000/chat \
-H "Content-Type: application/json" \
-d '{"question": "What is ROS2?"}'
# Contextual chat
curl -X POST http://localhost:8000/chat-with-context \
-H "Content-Type: application/json" \
-d '{"question": "Explain this", "selected_text": "ROS2 is the next generation of ROS"}'| Variable | Description |
|---|---|
OPENAI_API_KEY |
OpenAI API key for GPT model |
COHERE_API_KEY |
Cohere API key for embeddings |
QDRANT_URL |
Qdrant server URL |
QDRANT_API_KEY |
Qdrant API key |
QDRANT_COLLECTION |
Vector collection name (default: physical-ai-textbook) |
backend/
├── src/
│ ├── main.py # FastAPI application
│ ├── config.py # Settings loader
│ ├── api/
│ │ └── routes.py # API endpoints
│ ├── agents/
│ │ └── rag_agent.py # RAG agent logic
│ ├── services/
│ │ ├── embedding.py # Cohere embedding client
│ │ └── retrieval.py # Qdrant retrieval
│ └── models/
│ └── schemas.py # Pydantic models
└── requirements.txt # Python dependencies
Ingest documents into the Qdrant vector database for the RAG chatbot.
# Navigate to backend
cd backend
# Activate virtual environment
venv\Scripts\activate
# Prepare documents
# Place .txt or .md files in ./data/docs/
# Run ingestion (API-limit-safe)
python scripts/ingest_qdrant.py
# Or use legacy script
python scripts/ingest_book.pyThe ingestion script:
- Reads documents from
./data/docs/ - Chunks text using LangChain (500 tokens, 50 overlap)
- Generates embeddings with Cohere embed-english-v3.0
- Uploads to Qdrant collection
physical-ai-textbook - Tracks progress to skip already-embedded chunks on re-run
| Variable | Description |
|---|---|
COHERE_API_KEY |
Cohere API key for embeddings |
QDRANT_URL |
Qdrant server URL |
QDRANT_API_KEY |
Qdrant API key |
QDRANT_COLLECTION |
Collection name (default: physical-ai-textbook) |
DOCS_PATH |
Path to docs folder (default: ./data/docs) |
Integrate the RAG chatbot with the Docusaurus documentation site for interactive Q&A about the textbook.
- Chat Interface: ChatGPT-style conversational UI
- Theme Support: Light/dark mode that matches Docusaurus theme
- Text Selection: Select text on any page and click "Ask AI" to ask about it
- Source Citations: AI responses include relevant module/chapter references
- Mobile Support: Full-screen chat on mobile devices
# Start Docusaurus
cd docusaurus
npm startAdd the Chatbot to your pages using the wrapper:
// In your page or layout
import Chatbot from '@site/src/components/Chatbot';
export default function MyLayout({ children }) {
return (
<>
{children}
<Chatbot />
</>
);
}Or use the wrapper component:
import ChatbotWrapper from '@site/src/components/Chatbot/wrappers/ChatbotWrapper';
export default function MyPage() {
return (
<ChatbotWrapper>
<YourPageContent />
</ChatbotWrapper>
);
}Edit docusaurus/src/components/Chatbot/config.ts to configure:
API_BASE_URL: Backend URL (default: http://localhost:8000)TIMEOUTS.REQUEST: Request timeout (default: 10s)DIMENSIONS.*: UI dimensions
docusaurus/src/components/Chatbot/
├── index.tsx # Main component
├── ChatWindow.tsx # Chat interface
├── FloatingButton.tsx # Toggle button
├── MessageList.tsx # Message display
├── styles.module.css # Styling
├── types/index.ts # TypeScript types
├── config.ts # Configuration
├── services/
│ └── api.ts # API service
├── hooks/
│ ├── useChat.ts # Chat state
│ ├── useTheme.ts # Theme detection
│ └── useTextSelection.ts # Text selection
├── components/
│ └── SelectionButton.tsx # "Ask AI" button
└── wrappers/
└── ChatbotWrapper.tsx # Page wrapper
| Endpoint | Method | Description |
|---|---|---|
/chat |
POST | Normal chat query |
/chat-with-context |
POST | Chat with selected text |
- ROS 2 Community
- Open Source Robotics Foundation
- NVIDIA Isaac Sim
- Gazebo Simulator Team
Version: 1.0 Last Updated: 2026