This repository contains the complete project files for FlexiCupβa multimodal suction cup with wireless electronics that integrates dual-zone vision-tactile sensing. The modular mechanical design supports both vacuum and Bernoulli actuation modes while maintaining the identical sensing architecture, demonstrating sensing-actuation decoupling. Included are hardware designs (CAD/STEP, PCB schematics/layout/BOM/Gerber), ESP32-S3 firmware, the full learning pipeline, and documentation.
FlexiCup/
βββ Hardware/ # Hardware design and firmware
β βββ Fabrication/ # Physical hardware design files
β β βββ CAD/ # 3D CAD models and mechanical designs
β β β βββ FlexiCup_Vacuum.STEP # Vacuum mode assembly (109MB)
β β β βββ FlexiCup_Bernoulli.STEP # Bernoulli mode assembly (109MB)
β β β βββ suction cup bottom I.STEP # Bottom configuration I
β β β βββ suction cup bottom II.STEP # Bottom configuration II
β β β βββ suction cup bottom III.STEP # Bottom configuration III
β β β βββ suction cup bottom IV.STEP # Bottom configuration IV
β β β βββ suction cup top.STEP # Top assembly
β β β βββ FlexiCup_CAD_BOM.xlsx # CAD Bill of Materials
β β β
β β βββ PCB/ # PCB design files
β β βββ FlexiCup_Schematic.pdf # Circuit schematic
β β βββ FlexiCup_PCB.pdf # PCB layout
β β βββ FlexiCup_PCB_BOM.xlsx # PCB Bill of Materials
β β βββ Gerber_PCB.zip # Manufacturing files
β β
β βββ Firmware/ # Embedded firmware code
β βββ ESPCAM/ # ESP32S3 camera firmware
β βββ main/ # Main application code
β β βββ inc/ # Header files
β β β βββ camera.h
β β β βββ httpServer.h
β β β βββ led.h
β β β βββ wifiConnect.h
β β βββ src/ # Source files
β β β βββ camera.c
β β β βββ httpServer.c
β β β βββ led.c
β β β βββ wifiConnect.c
β β βββ html/ # Web interface
β β βββ main.c # Main entry point
β β
β βββ managed_components/ # ESP32-Camera library
β βββ CMakeLists.txt
β βββ sdkconfig
β βββ README.md
β
βββ Software/ # High-level software and algorithms
β βββ diffusion_policies/ # Diffusion policy implementation
β βββ data_collect.py # Data collection pipeline
β βββ train.py # Training script
β βββ deploy.py # Deployment script
β βββ environment.yml # Conda environment
β βββ README.md # Software documentation
β
βββ PDF/ # Documentation
β βββ paper.pdf # Research paper
β
βββ static/ # Website assets
β βββ css/ # Stylesheets
β βββ js/ # JavaScript files
β βββ images/ # Images and figures
β βββ video/ # Video demonstrations
β βββ optimized/ # Optimized videos for web (12.2MB total)
β βββ websitevideo/# Original high-quality videos
β
βββ index.html # Project website
All mechanical and electronic designs are provided for complete system reproduction:
CAD Models (STEP Format) All mechanical designs are provided in STEP format for maximum compatibility:
-
Main Assemblies:
FlexiCup_Vacuum.STEP(109MB): Complete vacuum suction mode assemblyFlexiCup_Bernoulli.STEP(109MB): Complete Bernoulli suction mode assembly
-
Modular Components:
suction cup top.STEP: Top housing with camera and electronicssuction cup bottom I-IV.STEP: Four interchangeable bottom configurations- I & II: For vacuum mode operation
- III & IV: For Bernoulli mode operation
-
Bill of Materials:
FlexiCup_CAD_BOM.xlsx: Complete list of mechanical components
PCB Design Files Complete electronics design for the FlexiCup controller:
- Schematic:
FlexiCup_Schematic.pdf- Circuit diagram - Layout:
FlexiCup_PCB.pdf- PCB layout design - BOM:
FlexiCup_PCB_BOM.xlsx- Electronic components list - Manufacturing:
Gerber_PCB.zip- Gerber files for PCB fabrication
Key Components:
- ESP32S3 microcontroller with Wi-Fi
- OV5640 camera interface
- LED driver circuits
- Power management (3.7V LiPo battery)
- Wireless charging circuit
ESP32S3 Camera Firmware
Located in Hardware/Firmware/ESPCAM/, built with ESP-IDF framework.
Main Features:
- Camera Control (
camera.c/h): OV5640 camera configuration and image capture - LED Control (
led.c/h): Illumination switching for vision-tactile sensing - HTTP Server (
httpServer.c/h): Web interface and video streaming - Wi-Fi (
wifiConnect.c/h): Wireless communication
Key Specifications:
- Image Resolution: 640Γ480 @ 30 Hz
- Streaming: Real-time video over Wi-Fi (UDP)
- Power: 3.7V 300mAh LiPo battery with wireless charging
- Runtime: ~30 minutes continuous operation
Building the Firmware
cd Hardware/Firmware/ESPCAM
idf.py build
idf.py flashLocated in Software/diffusion_policies/, this contains the complete machine learning pipeline for contact-aware manipulation.
Main Components:
- Data Collection (
data_collect.py): Automated data collection pipeline for demonstration gathering - Training (
train.py): Diffusion policy training with multimodal observations - Deployment (
deploy.py): Real-time deployment for robot control - Environment (
environment.yml): Conda environment with all dependencies
Key Features:
- Multimodal fusion of dual-zone vision-tactile data via multi-head attention (8 heads, 512-d)
- Diffusion policy with action chunking (8-step history, 48-step horizon)
- AdamW optimizer with cosine annealing, 500 epochs training
- Real-time inference for robot control at 10 Hz
- Contact-aware manipulation with illumination switching and valve control
Setup and Usage
cd Software/diffusion_policies
conda env create -f environment.yml
conda activate flexicup
python train.py --config configs/flexicup_config.yaml- Normal Force: 41.5 N (mean, at β80 kPa vacuum)
- Shear Force: 8.34 N (mean)
- Modes: Vacuum (sustained-contact adhesion) and Bernoulli (contactless lifting)
- Configurations: 4 modular bottom designs (IβII vacuum, IIIβIV Bernoulli)
- Material: Dual-layer PDMS membrane (30:1 base + Ag:PDMS 100:1 reflective layer)
- Controller: ESP32-S3 (dual-core, Wi-Fi enabled)
- Camera: OV5640 with 180Β° fisheye lens
- Resolution: 640Γ480 @ 30 Hz
- Connectivity: Wi-Fi 802.11 b/g/n (UDP streaming)
- Power: 3.7V 300mAh LiPo with wireless charging (12.5 ΞΌH coil, 200 mA)
- Runtime: ~30 minutes continuous operation
- Dual-Zone: Central (switchable vision-tactile via LED control) + Peripheral (continuous spatial awareness)
- Modality Switching: Real-time illumination control by ESP32-S3
- Multimodal Recognition: 100% accuracy (vs. vision-only 82.5%, tactile-only 46.7%)
- Research Paper:
PDF/paper.pdf - Tutorial:
TUTORIAL.pdf- Complete fabrication and deployment guide - Companion Website:
index.html(view at https://jump-howl.github.io/FlexiCup/) - Hardware README:
Hardware/README.md - Software README:
Software/diffusion_policies/README.md
Optimized videos are available in static/video/optimized/:
overview.mp4: System overviewintegrated_show.mp4: Hardware integration and assemblymultimodal_performance.mp4: Vision-tactile sensing demonstrationmodular_task.mp4: Modular perception-driven grasping (vacuum & Bernoulli)dptask1.mp4: Inclined transport task (diffusion policy)dptask2.mp4: Orange extraction task (diffusion policy)baseline1.mp4/baseline2.mp4: BC-RNN baseline comparisonsWafer_Bernoulli.mp4/Wafer_Vaccum.mp4: Wafer handling comparisonMove_Orange.mp4/Move_Bottle.mp4: Dynamic performance evaluation
- Review CAD models in
Hardware/Fabrication/CAD/ - Fabricate PCB using files in
Hardware/Fabrication/PCB/ - Follow BOM files for component sourcing
- Assemble according to CAD models
- Install ESP-IDF framework
- Navigate to
Hardware/Firmware/ESPCAM/ - Configure Wi-Fi settings in
main/src/wifiConnect.c - Build and flash firmware
- Set up the diffusion policy environment:
cd Software/diffusion_policies conda env create -f environment.yml conda activate flexicup - Collect training data or use provided datasets
- Train the diffusion policy model
- Deploy for real-time robot control
- Power on the device
- Connect to FlexiCup Wi-Fi network
- Access web interface via browser
- Test vision and tactile sensing modes
- Run software algorithms for manipulation tasks
For questions or collaboration inquiries, please refer to the paper for contact information.
This project is licensed under Creative Commons Attribution-ShareAlike 4.0 International License.
Note: Large CAD files (*.STEP) are managed with Git LFS. Clone with git lfs clone to download all files.