reBot-RS Multi-Backend Visual Grasping

AnyGrasp · GraspNet · OBB · Hand-Eye Calibration · YOLOE
This tutorial uses an Orbbec Gemini 336 mounted on the end effector of the reBot Arm B601-RS to identify and grasp tabletop objects. YOLOE segments objects using text labels. The grasp backend estimates grasp poses from the target contour and depth data. After hand-eye calibration, the software transforms the candidates into the robot base frame and checks workspace limits and inverse kinematics (IK).
Start by previewing grasp candidates from the filtered oriented bounding box (OBB) backend. Then calibrate the camera and try a grasp on the arm. Use AnyGrasp or GraspNet-Baseline to estimate six-degree-of-freedom grasp poses from point clouds. For a ROS 2 pick-and-place workflow, see the ROS 2 method in the B601-RS Visual Grasping Demo.
Prepare the hardware and host
- Robot arm. Gather a reBot Arm B601-RS, gripper, suitable power supply, and configured USB-to-CAN adapter. Complete assembly, zero-position setup, and basic communication checks first. B601-RS Quick Start
- Camera. Use an Orbbec Gemini 336, a USB 3.0 data cable, and an end-effector camera mount. The project also provides drivers for the Orbbec Gemini 2, RealSense D405, and RealSense D435i. Recheck the camera view and repeat hand-eye calibration after replacing the camera or mount. Camera SDK setup
- Host. Use an Ubuntu x86-64 machine with a graphical desktop, Git, and curl. The scripts create a Conda environment named
rebotwith Python 3.10. AnyGrasp and GraspNet-Baseline require a compatible NVIDIA GPU and driver. - Test object and calibration board. Prepare a banana or another object from the configured class list. For hand-eye calibration, secure an ArUco calibration board to the work surface. Download the 100 mm ArUco board (PDF)
1. Set up the environment and SDKs
Clone the project from an Ubuntu terminal. Run the remaining commands from the repository root.
git clone https://github.com/LAN-GER/Rebot-Arm-B601-Visual-Grasping.git
cd Rebot-Arm-B601-Visual-Grasping
Open config/default.yaml and set camera.type to match your device. The Gemini 336 defaults are orbbec_gemini336, 640 × 480, and 30 FPS. Set camera.serial if you have multiple cameras of the same model. Select the model before running the setup script so it installs the matching driver.
Choose either automatic or manual setup. Automatic setup lets you install what you need, from an OBB camera preview on the CPU to all grasping backends. Choose manual setup to install the dependencies component by component.
- Automatic setup
- Manual setup
Option A — Automatic setup
Check and install dependencies
Choose one set of commands below. Run the initial check, the setup script, and the post-install check in order. If the initial check reports missing dependencies, continue with the setup command. You can disconnect the camera and arm during setup.
For OBB camera preview only, you can use the CPU. After installing and activating the environment, continue to Section 2.
bash scripts/check_env.sh --backend obb
bash scripts/setup_env.sh --backend obb
bash scripts/check_env.sh --backend obb
For OBB grasping with the arm, add --robot to install and check the B601 control SDK. OBB can run on the CPU.
bash scripts/check_env.sh --backend obb --robot
bash scripts/setup_env.sh --backend obb --robot
bash scripts/check_env.sh --backend obb --robot
To install all backends and the B601 control SDK, use a compatible NVIDIA GPU and driver. Run nvidia-smi -L to confirm the host detects the GPU before running these commands. The setup script builds the required CUDA operators.
bash scripts/check_env.sh
bash scripts/setup_env.sh
bash scripts/check_env.sh
- Install a single point cloud backend. Use
--backend anygraspor--backend graspnetin the setup and check commands. Add--robotif you plan to grasp with the arm. If the GraspNet weights fail to download, add--checkpoint-file /path/to/checkpoint-rs.tarto the setup command and replace the path with your local copy. - Review changes. The script installs missing components and reuses existing Git SDKs. It shows the changes and asks before switching dependency versions, Conda builds, or SDK branches. Enter
yto confirm. Pressing Enter, enteringn, or running noninteractively skips these changes. See the changes applied below----. - Check the result. Review the summary below
----. Exit code3means only[MANUAL]items remain. For AnyGrasp, configure the license and weights as described below. For grasping with the arm, generate the hand-eye matrix in Section 3. After supplying the files for your setup, rerun the check with the same options.
Activate the environment
If the script installed Miniforge, run source ~/miniforge3/etc/profile.d/conda.sh in the current terminal first. Then activate the environment.
conda activate rebot
Option B — Manual setup
Create the environment and install PyTorch
Run the following commands in a terminal with Conda available. The environment.yml file specifies Python 3.10, NumPy below version 2, and Pinocchio 3.9.0 for the B601. If you already have a rebot environment, activate it and check its dependencies against the environment file.
conda env create -f environment.yml
conda activate rebot
- NVIDIA GPU
- CPU
Install the GPU build of PyTorch to use all backends or to run AnyGrasp or GraspNet. The project has verified PyTorch 2.5.1 with CUDA 12.1. The check should show 12.1 and True.
python -m pip install 'torch==2.5.1+cu121' 'torchvision==0.20.1+cu121' 'torchaudio==2.5.1+cu121' \
--index-url https://download.pytorch.org/whl/cu121
python -c 'import torch; print(torch.__version__, torch.version.cuda, torch.cuda.is_available())'
For OBB on a CPU-only system, install the CPU build of PyTorch.
python -m pip install -r requirements-pytorch.txt --index-url https://download.pytorch.org/whl/cpu
Install the camera driver, YOLOE, and B601 SDK
For the Orbbec Gemini 336, run python -m pip install 'pyorbbecsdk2==2.0.18'. For the RealSense D405 or D435i, run python -m pip install 'pyrealsense2>=2.54'. Follow the camera manufacturer's instructions to configure USB access. Camera SDK setup
python -m pip install -e '.[obb,yolo,visualization]' scipy
python -m pip install 'git+https://github.com/ultralytics/CLIP.git@7ffa84b3bfa40c42ecc1c77147a855e69cb2dd40'
mkdir -p models
curl -fL --retry 3 -o models/yoloe-26s-seg.pt \
https://github.com/ultralytics/assets/releases/download/v8.4.0/yoloe-26s-seg.pt
curl -fL --retry 3 -o mobileclip2_b.ts \
https://github.com/ultralytics/assets/releases/download/v8.4.0/mobileclip2_b.ts
git clone https://github.com/Seeed-Projects/reBotArm_control_py.git sdk/reBotArm_control_py
python -m pip install 'motorbridge==0.6.0' 'meshcat>=0.3.2' 'matplotlib>=3.10'
If OBB is the only backend you plan to use with the arm, run bash scripts/check_env.sh --backend obb --robot to check dependencies and continue to Section 2. You will generate the hand-eye matrix in Section 3.
Set up the CUDA toolchain for AnyGrasp and GraspNet
In the active rebot environment, install a compiler and toolchain compatible with CUDA 12.1. Confirm that nvcc --version shows release 12.1 before proceeding.
conda install --override-channels -c conda-forge 'gcc_linux-64=12' 'gxx_linux-64=12'
conda install --override-channels -c nvidia/label/cuda-12.1.1 -c conda-forge 'cuda-toolkit=12.1'
conda activate rebot
export CUDA_HOME="$CONDA_PREFIX"
export PATH="$CUDA_HOME/bin:$PATH"
export MAX_JOBS=2
nvcc --version
python -m pip install wheel ninja
python -m pip install 'transforms3d>=0.4.2' \
'graspnetAPI @ git+https://github.com/graspnet/graspnetAPI.git@eb57dd2092d8dbe05312a29c3d0c22f3226efbfc'
AnyGrasp. Install the SDK and its PointNet2 extension, then build MinkowskiEngine with OpenBLAS. Follow AnyGrasp license and weights to place the required files.
git clone https://github.com/graspnet/anygrasp_sdk.git sdk/anygrasp_sdk
git clone --branch cuda-12-1 https://github.com/chenxi-wang/MinkowskiEngine.git sdk/MinkowskiEngine-cuda-12-1
conda install --override-channels -c conda-forge 'openblas>=0.3.30,<0.4' 'numpy<2'
python -c 'import ctypes, sys; ctypes.CDLL(sys.prefix + "/lib/libopenblas.so")'
python -m pip install --no-build-isolation --no-deps ./sdk/anygrasp_sdk/pointnet2
(
cd sdk/MinkowskiEngine-cuda-12-1 &&
python setup.py bdist_wheel --force_cuda --blas=openblas \
--blas_include_dirs="$CONDA_PREFIX/include" --blas_library_dirs="$CONDA_PREFIX/lib" &&
python -m pip install --no-deps dist/*.whl
)
GraspNet-Baseline. Install the PointNet2 and kNN extensions in separate subdirectories of the GraspNet-Baseline SDK. This lets AnyGrasp and GraspNet use their own PointNet2 builds in the same rebot environment. Download the RealSense pretrained weights and save them to sdk/graspnet-baseline/checkpoints/checkpoint-rs.tar. Official GraspNet-Baseline pretrained weights
git clone https://github.com/graspnet/graspnet-baseline.git sdk/graspnet-baseline
baseline="$PWD/sdk/graspnet-baseline"
python -m pip install --no-build-isolation --no-deps --upgrade --target "$baseline/pointnet2" "$baseline/pointnet2"
touch "$baseline/pointnet2/pointnet2/__init__.py"
python -m pip install --no-build-isolation --no-deps --upgrade --target "$baseline/knn" "$baseline/knn"
mkdir -p "$baseline/checkpoints"
After completing the full manual setup, run bash scripts/check_env.sh. If you set up only some of the backends, use --backend obb, --backend anygrasp, or --backend graspnet to check the relevant dependencies. Add --robot to check the arm as well. Project manual setup guide
AnyGrasp license and weights
To use AnyGrasp, obtain the official license and detection weights, then configure them with bash scripts/anygrasp_license.sh. The steps apply to both automatic and manual setup. Running the script without arguments opens an interactive menu.
Get the machine feature ID
On the machine that will run inference, use the network interface you will use in deployment. Select 1 to retrieve the feature_id, then use it to request the license and matching weights. Official AnyGrasp license registration
bash scripts/anygrasp_license.sh 1
Install the license and weights
Put the official license ZIP or extracted license directory alongside checkpoint_detection.tar in the same delivery directory. Select 2 to install both. Replace /path/to/delivery with the path to your delivery directory.
bash scripts/anygrasp_license.sh 2 "/path/to/delivery"
The script uses the official SDK to validate the license and checks that it can read the weights. It then installs the files according to config/backends/anygrasp.yaml.
Default file locations. Look in license/ for the license files and in log/ for the detection weights, checkpoint_detection.tar.
sdk/anygrasp_sdk/grasp_detection/
├── gsnet.so
├── license/
│ ├── licenseCfg.json
│ ├── *.lic
│ ├── *.public_key
│ └── *.signature
└── log/
└── checkpoint_detection.tar
When needed, the environment setup script and option 2 place a version of gsnet.so compatible with the active Python environment next to license/.
If the filtered backend uses a separate SDK or weights path, use the command below. The script installs the files according to config/backends/anygrasp_filtered.yaml.
bash scripts/anygrasp_license.sh --backend anygrasp_filtered 2 "/path/to/delivery"
Verify the installation
Review the license and weights status below ----. [PARTIAL] and exit code 3 mean the license is ready and the detection weights are still missing. Once you have the weights, pass the path to checkpoint_detection.tar directly to option 2. If the script reports [ERROR], check the reported cause, such as a machine ID mismatch or unreadable weights. Rerun the AnyGrasp environment check.
bash scripts/check_env.sh --backend anygrasp
Once the check passes, use the AnyGrasp camera preview in Section 5 to verify model loading and inference.
2. Preview camera frames and grasp candidates
Run conda activate rebot before launching the examples. They use scripts/run_python.sh to run Python from that environment. By default, the launcher isolates rebot from inherited PYTHONPATH, LD_LIBRARY_PATH, and user-site Python packages so dependencies from ROS Humble or other environments do not get loaded. Python launcher
Record an RGB-D frame
Connect the camera and record a frame. The command should write an .npz file.
bash examples/rgbd_capture/run.sh --output "outputs/rgbd/frame-$(date +%s%N).npz"
Open the filtered OBB preview
Place the target in the center of the image and open the filtered OBB preview. The example defaults to yellow banana. Use --target-class to select another class from the configured list. This command connects only to the camera.
bash examples/obb_filtered/run.sh
Compare grasp candidates
Press G in the image window to save a snapshot and compare the raw and filtered candidates for the same frame. Confirm that the mask covers the target and that the filtered grasp center and gripper opening axis suit the object. Press Q or Esc to exit. To inspect segmentation or point cloud quality, run bash examples/camera_check/run.sh --target-class "yellow banana". Filtered OBB details
3. Perform hand-eye calibration
Prepare the calibration board
Download aruco_100mm.pdf and print it at 100% scale. Measure the side length of the black square. In config/default.yaml, set calibration.aruco.marker_length_m to that length in meters. The default length is 0.100 m and the marker ID is 0. Secure the board to the work surface where the camera can see it from several poses. Download the 100 mm ArUco board (PDF)
Check marker detection
Check the marker with the camera. The terminal reports how many of 10 frames contain a detection of the configured marker. If detection is inconsistent, adjust the lighting, distance, or board angle.
bash examples/hand_eye/run.sh --check-marker
Check the arm connection
In sdk/reBotArm_control_py/config/rebotarm.yaml, confirm that hardware_yaml: rebotarm_rs.yaml is set. Check the CAN interface and kinematic model for that hardware profile. Replace the example can0 with the interface name you configured. B601-RS control SDK and CAN setup
ip -details link show can0
Run automatic calibration
Automatic calibration moves the arm along preset trajectories. Secure the base, clear the entire motion envelope, and leave enough slack in the camera cable. Be ready to cut actuator power if necessary. You can back up an existing hand_eye.npz before recalibrating.
Start automatic calibration. The program pairs end-effector poses with marker poses observed by the camera. After collecting the samples, it solves for the fixed transform from the camera to the end effector.
bash examples/hand_eye/run.sh

Verify the calibration result
Confirm that the terminal reports [OK] Saved to .../hand_eye.npz for the current run. If the script reports fewer than 15 valid samples, adjust the board position or lighting so the marker is visible from more poses, then run calibration again.
The Gemini 336 calibration file is config/calibration/orbbec_gemini336/hand_eye.npz. For other cameras, the output goes into the matching model directory under config/calibration/. In config/default.yaml, check calibration.hand_eye_path. Relative paths are resolved from config/. Then check the arm dependencies and the calibration file.
bash scripts/check_env.sh --backend obb --robot
4. Execute a filtered OBB grasp
Check the target and arm settings
Confirm that the preview consistently finds the target. Check robot.ready_pose, the gripper orientation, and the workspace limits. If you have modified the gripper, also check planning.T_grasp_tcp.
Run the grasp
--execute enables the arm and moves it to the ready pose at startup. Pressing G starts the grasp. Before running the command, confirm that the motion area is clear of people, cables, and obstacles.
bash examples/obb_filtered/run.sh --execute --target-class "yellow banana"
Wait for the arm to stop at the ready pose. Press G in the image window to capture the current scene and select a filtered grasp candidate that passes the checks. The program skips the attempt if it finds no target or executable candidate. Press Q or Esc to end the session.

Inspect the results
Open the run directory printed in the terminal. The result/snapshot-NNN/ directory contains the captured frame.npz, grasp candidates and plans in result.json, and the raw-versus-filtered results in comparison.png and comparison.json. After a grasp attempt starts, the program also writes execution.json. The object_held field records the gripping status reported by the controller.
5. Try point cloud grasping backends
- AnyGrasp
- GraspNet-Baseline
AnyGrasp
After completing the environment setup in Section 1 and placing the files from AnyGrasp license and weights, start the camera preview.
bash examples/anygrasp_filtered/run.sh --target-class "yellow banana"
Press G in the image window to save a snapshot. The left panel shows the raw point cloud reference and the right panel shows the filtered result. The default class order is pen, orange, and yellow banana. Press 1, 2, or 3 in the image window to switch classes. After checking the candidates, press Q or Esc to exit the preview.
After verifying the preview and hand-eye calibration, check the arm dependencies.
bash scripts/check_env.sh --backend anygrasp --robot
The grasping command enables the arm and moves it to the ready pose at startup. Before running it, clear people, cables, and obstacles from the motion area.
Once the checks pass, run the following command to start grasping with the arm.
bash examples/anygrasp_filtered/run.sh --target-class "yellow banana" --execute
Wait for the arm to stop at the ready pose. Press G in the image window to capture a fresh frame and execute a candidate from the right panel that passes the workspace and IK checks. Press Q or Esc to end the session. Filtered AnyGrasp details


GraspNet-Baseline
After setting up the GraspNet-Baseline environment and weights in Section 1, check the dependencies and open the camera preview.
bash scripts/check_env.sh --backend graspnet
bash examples/graspnet_camera/run.sh
Press G or Space in the camera window to generate candidates, then inspect them in the point cloud window. Press R to resume the live feed. After checking the candidates, press Q or Esc to exit the preview.
Complete hand-eye calibration and the arm connection check in Section 3, then check the dependencies for grasping with GraspNet.
bash scripts/check_env.sh --backend graspnet --robot
The grasping command enables the arm and moves it to the ready pose at startup, even with --dry-run. Before running it, clear people, cables, and obstacles from the motion area.
Once the checks pass, run the following command to start grasping with the arm.
bash examples/graspnet_grasp/run.sh --target-class "yellow banana"
Wait for the arm to stop at the ready pose. Press G or Space in the image window to run inference and execute a reachable grasp. Press Q or Esc to end the session and return the arm to its home position. GraspNet arm example
Troubleshooting
- The camera cannot record. Check
camera.type, the serial number, and USB permissions. Confirm the camera supports the selected resolution and frame rate, then rerun the capture command in Section 2. - The arm stays still after pressing G.
- Filtered OBB or AnyGrasp. Confirm that the command includes
--execute. Checkresult.jsonand the terminal logs to see whether the detector missed the target, the point cloud failed quality checks, the candidate was outside the workspace, or IK found no solution. - GraspNet-Baseline. Confirm that you are running
examples/graspnet_grasp/run.sh. With--dry-run, the program skips the grasp motion. Check the terminal for a missing or invalid hand-eye calibration or an indication that no candidate is reachable.
- Filtered OBB or AnyGrasp. Confirm that the command includes
- The candidate looks correct in the image, but the grasp is offset. Check whether the camera mount moved, whether the hand-eye matrix belongs to the current camera, and whether
planning.T_grasp_tcpmatches the current gripper. After confirming an offset along the approach direction, use--insertion-depth-mmwith the filtered backends to override the additional insertion distance for the run, in millimeters. Filtered OBB defaults to 0 mm and filtered AnyGrasp defaults to 5 mm. Check the candidate and the clearance between the gripper and the table after each adjustment. - The environment check reports
[MANUAL]. Exit code3means you need to supply the remaining items manually, such as the AnyGrasp license, detection weights, or hand-eye matrix. Add the files and rerun the check with the same arguments. Environment and SDK troubleshooting - An older script is missing. Start each example with the
run.shfile in its directory. Compatibility launchers are underscripts/legacy/, for examplebash scripts/legacy/anygrasp.sh. Runbash scripts/run_python.sh -m rebot_grasp --helpto see the project CLI options.
For the complete list of entry points and coordinate conventions, see the example index and project architecture.