Grasp Pose Generator
Grasp Pose Generator is a Python package that provides bindings for the C++ Grasp Pose Generator (GPG), enabling the creation of grasp candidates for 3D point clouds. This tool is essential for robotic manipulation tasks, allowing robots to determine feasible grasping positions on objects represented by point clouds.
Features
- Generate 6-DOF grasp poses for 2-finger grippers.
- Evaluate grasp candidates for antipodal properties using geometric conditions.
- Seamless integration with Python for easy incorporation into robotic pipelines.
Installation
To install the grasp_pose-generator package, use pip:
pip install grasp-pose-generator
Build
To build the grasp-pose-generator package from source, follow these steps:
Steps
-
Install Vcpkg and configure it on your system.
-
Clone the Pybind11 repository into a
dependenciesdirectory in your project root:mkdir dependencies cd dependencies git clone https://github.com/pybind/pybind11.git
-
Install the package:
pip install .
This process will compile the C++ code using the Vcpkg dependencies and the Pybind11 bindings.
Usage
Here's a basic example demonstrating how to generate grasp poses for a given point cloud:
import numpy as np
import grasp_pose_generator as gpg
# Generate a random point cloud (replace with your actual point cloud data)
points = np.random.rand(3000, 3) # n x 3 numpy array
# Parameters
num_samples = 10000
show_grasp = False
gripper_config_file = "path/to/gripper_params.cfg" # Replace with the path to your gripper configuration file
# Generate grasps
grasps = gpg.generate_grasps(points, num_samples, show_grasp, gripper_config_file)
# Convert grasps to transformation matrices
pose_list = []
for grasp in grasps:
pose = np.eye(4)
pose[:3, 0] = grasp.get_grasp_approach()
pose[:3, 1] = grasp.get_grasp_binormal()
pose[:3, 2] = grasp.get_grasp_axis()
pose[:3, 3] = grasp.get_grasp_bottom()
pose_list.append(pose)
Ensure that you have a valid gripper configuration file. An example configuration file can be found in the gripper_params.cfg.
Example with a Simple Box
To visualize grasp generation on a simple box, you can run the provided example script:
python example/example.py
Press R during the visualization to see the generated grasp poses.
Build
Prerequisites
- Python 3.11 or later
- Vcpkg installed and configured
- A C++ compiler (e.g., GCC, MSVC, Clang)
License
This project is licensed under the MIT License.
Acknowledgments
This package is an improved and extended version of the original pyGPG by Hongzhuo Liang. The core grasp generation functionality is based on the Grasp Pose Generator (GPG) by Andreas ten Pas.
Metadata
Release files for grasp-pose-generator 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| grasp_pose_generator-1.0.1.tar.gz | 443.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| grasp_pose_generator-1.0.1-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
Total release size: 23.1 MB
Release files / grasp_pose_generator-1.0.1.tar.gz
| Download URL | grasp_pose_generator-1.0.1.tar.gz |
|---|---|
| Size | 443.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
291d796a9e76862b38004408f229f86829815bf2e771f14632140b9283d81676
|
|
BLAKE2b-256 checksum How to use checksums |
ac20aa2991b0828f301925cf49a3081c992e6106c7c463c8e15ff7c072be2ff2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / grasp_pose_generator-1.0.1-cp312-cp312-win_amd64.whl
| Download URL | grasp_pose_generator-1.0.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 22.7 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8728e0e81ef9a0d8d4da94e8d5f1f9a421e9fb8f2f8b6b5919a4f8d219d9314b
|
|
BLAKE2b-256 checksum How to use checksums |
015f15d301e82d76d97d74f7e349df632e9f6bcb450fa375548fb3c324a56192
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for grasp-pose-generator 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.