Python Bin Picking is an application designed to automate the identification and picking of objects in a bin using an Intel RealSense camera. Leveraging computer vision techniques, the script detects specific objects by their color and size, and guides robotic mechanisms to pick these objects efficiently.
- Real-time cube detection using an Intel RealSense camera.
- Python 3.6 or higher
- OpenCV (
cv2
) pyrealsense2
- NumPy
Ensure you have the required libraries installed. You can install them using pip:
pip install numpy opencv-python pyrealsense2
python RealSenseBinPicking.py --object_size 150 --width 640 --height 480 --log INFO --output_mode json
- object_size: Minimum contour area to consider a shape suitable for picking (default is 150 pixels squared).
- width and --height: Resolution of the video stream (default is 640x480).
- log: Logging level (default is INFO).
- output_mode: Specifies the output format (e.g., json for integration with robotics systems).
- Color Ranges: Define the color ranges in HSV for object detection based on the specific objects in your bin.
- Process Frame: Adjust image processing steps to optimize detection under varying lighting and bin conditions.
- Robot Arm: Ufactory xArm 850
- Gripper: Custom Made
- Camera: Intel RealSense D435i
The detected objects will be displayed in a window with their respective bounding boxes and identified color labels. If output_mode is set to json, the script will output the coordinates and dimensions of detected objects in a JSON format for use by robotic picking systems.
Contributions to enhance the functionality or adapt the script to specific picking tasks or different environments are welcome. Please follow the existing code style and add comprehensive comments.
This project is open source and available under the MIT License.