Skip to content

Latest commit

 

History

49 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Failure Probability Estimation for Robotic Grasping (FPERG)

Success Grasp Failure Mode 1 Failure Mode 2
Left: Successful grasp. Middle and Right: Common failure modes.

This repository contains the implementation of three different failure probability estimation methods for robotic grasping tasks: Direct Estimation (DE), Importance Sampling (IS), and Adaptive Importance Sampling (AIS). Using a simulated robotic arm with a parallel-jaw gripper in PyBullet, we compare these methods in terms of efficiency, accuracy, and computational cost.

Project Overview

Reliable grasping is fundamental for robotic manipulation tasks, and understanding failure modes is crucial for deployment in real-world applications. This project aims to:

  1. Implement and compare three different approaches for estimating the probability of failures in robotic grasping
  2. Evaluate these methods in terms of sample efficiency, convergence rate, and failure case coverage
  3. Analyze the sources of discrepancies and propose validation techniques to ensure accurate estimation

Installation

  1. Clone this repository:
git clone https://github.com/jfrausto7/FPERG.git
cd FPERG
  1. Create a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install the required packages:
pip install -r requirements.txt

Usage

Training a Grasping Policy

To train a hill climbing grasping policy:

python train.py --episodes 2000 --gui  # Use GUI for visualization

Options:

  • --episodes: Number of training episodes (default: 2000)
  • --gui: Use GUI mode instead of DIRECT mode (default: False)
  • --load: Load existing policy (default: False)
  • --eval: Evaluate only (no training) (default: False)

Running Failure Probability Estimation

To run failure probability estimation experiments:

python main.py [OPTIONS]

Options:

  • --gui: Use GUI mode instead of DIRECT mode
  • --multiple N: Run N grasp attempts
  • --seed N: Set random seed
  • --hill: Use Hill Climbing policy instead of default policy
  • --policy-file PATH: Path to policy file (default: src/best_hill_climbing_policy.pkl)

Direct Estimation

python main.py --estimate --trials 1000 --hill

Importance Sampling

python main.py --importance --trials 1000 --depth 1000 --hill

Adaptive Importance Sampling

python main.py --adaptive_importance --trials 1000 --depth 1000 --hill

Example: Comparing All Methods

To run a comparison of all three methods with 1000 trials each:

python main.py --estimate --trials 1000 --hill
python main.py --importance --trials 1000 --depth 1000 --hill
python main.py --adaptive_importance --trials 1000 --depth 1000 --hill

The results will be saved in the results/ directory and printed to the console.

Visualization

To visualize and compare results from different methods, use the analysis notebook.

Contributors

About

CS238v/AA228v Final Project: Failure Probability Estimation for Robotic Grasping

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages