roboreg
Eye-to-hand calibration from RGB-D images using robot mesh as calibration target.
| Unregistered | Registered |
|---|---|
Table of Contents
Installation
Two install options are provided:
Pip (Requires CUDA Toolkit Installation)
To pip intall roboreg, simply run
pip install roboreg
Docker (Comes with CUDA Toolkit)
A sample Docker container is provided for testing purposes. First:
- Install Docker, see Docker Install Instructions
- Install NVIDIA Container Toolkit, see NVIDIA Container Toolkit Install Instructions
Next:
-
Clone this repository
git clone git@github.com:lbr-stack/roboreg.git
-
Build the Docker image (currently only runtime support, i.e. no rendering via compiled kernels)
cd roboreg docker build \ -t roboreg:latest \ -f .docker/Dockerfile \ --build-arg PYTORCH_VERSION=2.10.0 \ --build-arg CUDA_VERSION=13.0 \ .
For CUDA 12.4, use:
docker build \ -t roboreg:latest \ -f .docker/Dockerfile \ --build-arg PYTORCH_VERSION=2.6.0 \ --build-arg CUDA_VERSION=12.4 \ .
-
Run container (on Linux host with NVIDIA Container Toolkit)
docker run -it \ --gpus all \ --network host \ --ipc host \ --volume /tmp/.X11-unix:/tmp/.X11-unix \ --volume /dev/shm:/dev/shm \ --volume /dev:/dev --privileged \ --env DISPLAY \ --env QT_X11_NO_MITSHM=1 \ roboreg:latest
Command Line Interface
Segment
This is a required step to generate robot masks.
rr-sam2 \
--path test/assets/lbr_med7_r800/samples \
--pattern "left_image_*.png" \
--n-positive-annotations 5 \
--n-negative-annotations 5 \
--device cuda
Hydra Robust ICP
The Hydra robust ICP implements a point-to-plane ICP registration on a Lie algebra. It does not use rendering and can also be used on CPU.
rr-hydra \
--intrinsics-file test/assets/lbr_med7_r800/samples/left_camera_info.yaml \
--path test/assets/lbr_med7_r800/samples \
--mask-pattern mask_sam2_left_image_*.png \
--depth-pattern depth_*.npy \
--joint-states-pattern joint_states_*.npy \
--urdf-path test/assets/lbr_med7_r800/description/lbr_med7_r800.urdf \
--root-link-name lbr_link_0 \
--end-link-name lbr_link_7 \
--number-of-points 5000 \
--display-results \
--output-file HT_hydra_robust.csv
Camera Swarm
The camera swarm optimization can serve for finding an initial guess to Monocular Differentiable Rendering or Stereo Differentiable Rendering.
rr-cam-swarm \
--collision-meshes \
--n-cameras 1000 \
--min-distance 0.5 \
--max-distance 3.0 \
--angle-range 3.141 \
--w 0.7 \
--c1 1.5 \
--c2 1.5 \
--max-iterations 100 \
--display-progress \
--urdf-path test/assets/lbr_med7_r800/description/lbr_med7_r800.urdf \
--root-link-name lbr_link_0 \
--end-link-name lbr_link_7 \
--target-reduction 0.8 \
--scale 0.1 \
--n-samples 1 \
--camera-info-file test/assets/lbr_med7_r800/samples/left_camera_info.yaml \
--path test/assets/lbr_med7_r800/samples \
--image-pattern left_image_*.png \
--joint-states-pattern joint_states_*.npy \
--mask-pattern mask_sam2_left_image_*.png \
--output-file HT_cam_swarm.csv
Monocular Differentiable Rendering
This monocular differentiable rendering refinement requires a good initial estimate, as e.g. obtained from Hydra Robust ICP or Camera Swarm
rr-mono-dr \
--optimizer AdamW \
--lr 0.03 \
--max-iterations 400 \
--convergence-tolerance 0.001 \
--convergence-patience 100 \
--scheduler-factor 0.1 \
--scheduler-patience 40 \
--scheduler-threshold 0.0001 \
--display-progress \
--urdf-path test/assets/lbr_med7_r800/description/lbr_med7_r800.urdf \
--root-link-name lbr_link_0 \
--end-link-name lbr_link_7 \
--intrinsics-file test/assets/lbr_med7_r800/samples/left_camera_info.yaml \
--extrinsics-file test/assets/lbr_med7_r800/samples/HT_hydra_robust.csv \
--path test/assets/lbr_med7_r800/samples \
--image-pattern left_image_*.png \
--joint-states-pattern joint_states_*.npy \
--mask-pattern mask_sam2_left_image_*.png \
--output-file HT_dr.csv
Stereo Differentiable Rendering
This stereo differentiable rendering refinement requires a good initial estimate, as e.g. obtained from Hydra Robust ICP or Camera Swarm
rr-stereo-dr \
--optimizer AdamW \
--lr 0.03 \
--max-iterations 400 \
--convergence-tolerance 0.001 \
--convergence-patience 100 \
--scheduler-factor 0.1 \
--scheduler-patience 40 \
--scheduler-threshold 0.0001 \
--display-progress \
--urdf-path test/assets/lbr_med7_r800/description/lbr_med7_r800.urdf \
--root-link-name lbr_link_0 \
--end-link-name lbr_link_7 \
--left-intrinsics-file test/assets/lbr_med7_r800/samples/left_camera_info.yaml \
--right-intrinsics-file test/assets/lbr_med7_r800/samples/right_camera_info.yaml \
--left-extrinsics-file test/assets/lbr_med7_r800/samples/HT_hydra_robust.csv \
--right-extrinsics-file test/assets/lbr_med7_r800/samples/HT_right_to_left.csv \
--path test/assets/lbr_med7_r800/samples \
--left-image-pattern left_image_*.png \
--right-image-pattern right_image_*.png \
--joint-states-pattern joint_states_*.npy \
--left-mask-pattern mask_sam2_left_image_*.png \
--right-mask-pattern mask_sam2_right_image_*.png \
--left-output-file HT_left_dr.csv \
--right-output-file HT_right_dr.csv
Render Results
Generate renders using the obtained extrinsics:
rr-render \
--batch-size 1 \
--num-workers 0 \
--urdf-path test/assets/lbr_med7_r800/description/lbr_med7_r800.urdf \
--root-link-name lbr_link_0 \
--end-link-name lbr_link_7 \
--camera-info-file test/assets/lbr_med7_r800/samples/left_camera_info.yaml \
--extrinsics-file test/assets/lbr_med7_r800/samples/HT_left_dr.csv \
--images-path test/assets/lbr_med7_r800/samples \
--joint-states-path test/assets/lbr_med7_r800/samples \
--image-pattern left_image_*.png \
--joint-states-pattern joint_states_*.npy \
--output-path /tmp/renders/lbr_med7_r800
Testing
For testing on the xarm data, follow Docker (Comes with CUDA Toolkit). Inside the container, do
Hydra Robust ICP
To run Hydra robust ICP on provided xarm and realsense data, run
rr-hydra \
--intrinsics-file test/assets/xarm_7/samples/camera_info.yaml \
--path test/assets/xarm_7/samples \
--mask-pattern mask_*.png \
--depth-pattern depth_*.npy \
--joint-states-pattern joint_state_*.npy \
--urdf-path test/assets/xarm_7/description/xarm_7.urdf \
--root-link-name link_base \
--end-link-name link7 \
--number-of-points 5000 \
--display-results \
--output-file HT_hydra_robust.csv
Render Results
Generate renders using the obtained extrinsics:
rr-render \
--batch-size 1 \
--num-workers 0 \
--urdf-path test/assets/xarm_7/description/xarm_7.urdf \
--root-link-name link_base \
--end-link-name link7 \
--camera-info-file test/assets/xarm_7/samples/camera_info.yaml \
--extrinsics-file test/assets/xarm_7/samples/HT_hydra_robust.csv \
--images-path test/assets/xarm_7/samples \
--joint-states-path test/assets/xarm_7/samples \
--image-pattern img_*.png \
--joint-states-pattern joint_state_*.npy \
--output-path /tmp/renders/xarm_7
Acknowledgements
Organizations and Grants
We would further like to acknowledge following supporters:
| Logo | Notes |
|---|---|
| This work was supported by core and project funding from the Wellcome/EPSRC [WT203148/Z/16/Z; NS/A000049/1; WT101957; NS/A000027/1]. | |
| This project has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No 101016985 (FAROS project). | |
| Built at RViMLab. | |
| Built at CAI4CAI. | |
| Built at King's College London. |
Metadata
Release files for roboreg 0.6.7
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 | Actions |
|---|---|---|---|---|
| roboreg-0.6.7.tar.gz | 209.4 kB | With provenance | Details for roboreg-0.6.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| roboreg-0.6.7-py3-none-any.whl | Python 3 | none | any | Details for roboreg-0.6.7-py3-none-any.whl |
Total release size: 276.0 kB
Release files / roboreg-0.6.7.tar.gz
| Download URL | roboreg-0.6.7.tar.gz |
|---|---|
| Size | 209.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc1f1644966e11defa47a8a15af0e3b4afa0fdafb7c7bbd6a77af8da30980633
|
|
BLAKE2b-256 checksum How to use checksums |
8e8f325a36f59a416ee57875f10fcdc6a52215b96ba7a31f8f77cd841d58c8f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logRelease files / roboreg-0.6.7-py3-none-any.whl
| Download URL | roboreg-0.6.7-py3-none-any.whl |
|---|---|
| Size | 66.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7f770aae18c41edd0411037a43ba49a6fa26ec4e8e68ba9a3ec3bb703ea0495
|
|
BLAKE2b-256 checksum How to use checksums |
e3b1be4dbef0539e5bf21fa6b3f5df44bd90935e11cdf4ff03955c2c2bcf9fae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logSecurity for roboreg 0.6.7
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for roboreg-0.6.7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logA 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.