codecrypt112/openenv-hackathon-ctrlaltwin-tiffenpacker
0
Smart Tiffin Packing Environment ๐ฑ๐ค
Semantic-aware constrained packing under real-world constraints An OpenEnv-compliant RL environment where an LLM agent controls a robotic arm to pack an Indian tiffin meal. The agent uses VLM-derived food classification to reason about container compatibility, volume constraints, temperature zones, and fragility โ then physically executes packing decisions.
๐ฏ What is this?
This environment simulates the real-world task of packing an Indian meal into tiffin containers. An AI agent must:
- Identify food items using a Vision-Language Model (VLM)
- Reason about which container each item should go into
- Execute packing commands via a robotic arm
- Satisfy multiple constraints simultaneously
Why Tiffin Packing?
Every day, millions of people in India pack tiffin boxes for lunch. It's a genuine spatial-reasoning task with real constraints:
- Liquids (sambar, dal) must go in sealed containers
- Fragile items (papad, chapati) shouldn't be crushed
- Hot and cold foods should be separated
- Volume limits mean you can't just stuff everything in one box
๐๏ธ Architecture
LLM Agent (via OpenAI API)
โ
โโโ observe โ See scene description
โโโ identify โ VLM classifies food item
โโโ pick โ Robotic arm picks up food
โโโ place โ Place item in container
โโโ pour โ Pour liquid into container
โ
โผ
OpenEnv Server (FastAPI)
โ
โโโ Simulation Engine (logic + PyBullet physics)
โโโ VLM Classifier (cached food_db.json)
โโโ Task Manager (easy/medium/hard)
โโโ Deterministic Grader (0.0-1.0)๐ฎ Tasks
๐ Scoring (0.0 โ 1.0)
๐ Quick Start
Run locally
pip install -r requirements.txt
uvicorn server.app:app --host 0.0.0.0 --port 7860Run inference
export API_BASE_URL=https://api.openai.com/v1
export MODEL_NAME=gpt-4o
export HF_TOKEN=your-api-key
export ENV_URL=http://localhost:7860
python inference.pyDocker
docker build -t tiffin-packer .
docker run -p 7860:7860 tiffin-packer๐ง Action Space
{
"command": "identify | pick | place | pour | observe",
"target_id": 1
}๐๏ธ Observation Space
{
"scene_description": "Natural language scene state",
"food_items": [{"id": 1, "name": "rice", "status": "on_table", ...}],
"containers": [{"id": 1, "type": "sealed_round", "capacity_ml": 300, ...}],
"held_item": null,
"vlm_result": {"type": "solid", "fragility": 0.1, ...},
"available_commands": ["observe", "identify", "pick"],
"step_feedback": "Successfully picked up rice"
}๐ Project Structure
tiffen-packer/
โโโ openenv.yaml # OpenEnv manifest
โโโ inference.py # LLM inference script (OpenAI Client)
โโโ Dockerfile # HF Spaces deployment
โโโ tiffin_packer/ # Core package
โ โโโ models.py # Pydantic Action/Observation/State
โ โโโ simulation/
โ โ โโโ engine.py # Logic simulation engine
โ โ โโโ pybullet_renderer.py # Physics visualization
โ โโโ vlm/
โ โ โโโ classifier.py # VLM food classifier
โ โ โโโ food_db.json # 15 Indian food items
โ โโโ tasks.py # Easy/Medium/Hard task configs
โ โโโ grader.py # Deterministic scoring
โโโ server/
โโโ tiffin_environment.py # OpenEnv Environment
โโโ app.py # FastAPI server๐ OpenEnv Compliance
- โ Typed Pydantic models (Action, Observation, State)
- โ
step()/reset()/state()API - โ
openenv.yamlmanifest - โ 3 tasks with deterministic graders (0.0โ1.0)
- โ Dense reward function with partial progress signals
- โ Baseline inference script using OpenAI Client
- โ Docker deployment for HF Spaces
๐ฅ Team
CtrlAltWin โ Meta PyTorch OpenEnv Hackathon 2026
๐ License
MIT
