Skip to main content

reBot-RS Multi-Backend Visual Grasping

reBot Arm B601-RS

Orbbec Gemini 336 RGB-D camera Python 3.10 Version v0.1.0 Ubuntu x86-64

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 rebot with 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.

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 anygrasp or --backend graspnet in the setup and check commands. Add --robot if you plan to grasp with the arm. If the GraspNet weights fail to download, add --checkpoint-file /path/to/checkpoint-rs.tar to 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 y to confirm. Pressing Enter, entering n, or running noninteractively skips these changes. See the changes applied below ----.
  • Check the result. Review the summary below ----. Exit code 3 means 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

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

warning

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
reBot Arm B601-RS automatic hand-eye calibration demo

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

warning

--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.

reBot Arm B601-RS filtered OBB grasp demo

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

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
warning

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

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. Check result.json and 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.
  • 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_tcp matches the current gripper. After confirming an offset along the approach direction, use --insertion-depth-mm with 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 code 3 means 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.sh file in its directory. Compatibility launchers are under scripts/legacy/, for example bash scripts/legacy/anygrasp.sh. Run bash scripts/run_python.sh -m rebot_grasp --help to see the project CLI options.

For the complete list of entry points and coordinate conventions, see the example index and project architecture.

Loading Comments...