![]() |
easy_handeye2 repositoryrobot camera calibration hand-eye-calibration ros2 hand-eye easy_handeye2 easy_handeye2_msgs |
Repository Summary
Description | Automated, hardware-independent Hand-Eye Calibration for ROS2 |
Checkout URI | https://github.com/marcoesposito1988/easy_handeye2.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2024-10-27 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | robot camera calibration hand-eye-calibration ros2 hand-eye |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
Name | Version |
---|---|
easy_handeye2 | 0.5.0 |
easy_handeye2_msgs | 0.5.0 |
README
easy_handeye2: automated, hardware-independent Hand-Eye Calibration for ROS2
This package provides functionality and a GUI to:
-
sample the robot position and tracking system output via
tf
, - compute the eye-on-base or eye-in-hand calibration matrix through the OpenCV library’s hand-eye calibration algorithms (e.g. Tsai-Lenz),
- store the result of the calibration,
-
publish the result of the calibration procedure as a
tf
transform at each subsequent system startup, - evaluate the accuracy of the resulting calibration matrix,
- (optional) automatically move a robot around a starting pose via
MoveIt!
to acquire the samples.
The intended result is to make it easy and straightforward to perform the calibration, and to keep it up-to-date throughout the system. Two launch files are provided to be run, respectively to perform the calibration and check its result. A further launch file can be integrated into your own launch files, to make use of the result of the calibration in a transparent way: if the calibration is performed again, the updated result will be used without further action required.
You can try out this software in a simulator, through the
easy_handeye2_demo package. This package also serves as an
example for integrating easy_handeye2
into your own launch scripts.
This is a port of easy_handeye to ROS2.
News
- version 0.5.0
- port to ROS2
- addition of rqt evaluator script
Use Cases
If you are unfamiliar with Tsai’s hand-eye calibration [1], it can be used in two ways:
- eye-in-hand to compute the static transform between the reference frames of a robot’s hand effector and that of a tracking system, e.g. the optical frame of an RGB camera used to track AR markers. In this case, the camera is mounted on the end-effector, and you place the visual target so that it is fixed relative to the base of the robot; for example, you can place an AR marker on a table.
- eye-on-base to compute the static transform from a robot’s base to a tracking system, e.g. the optical frame of a camera standing on a tripod next to the robot. In this case you can attach a marker, e.g. an AR marker, to the end-effector of the robot.
A relevant example of an eye-on-base calibration is finding the position of an RGBD camera with respect to a robot for object collision avoidance, e.g. with MoveIt!: an example launch file is provided to perform this common task between an Universal Robot and a Kinect through aruco. eye-on-hand can be used for vision-guided tasks.
The (arguably) best part is, that you do not have to care about the placement of the auxiliary marker (the one on the table in the eye-in-hand case, or on the robot in the eye-on-base case). The algorithm will “erase” that transformation out, and only return the transformation you are interested in.
eye-on-base | eye-on-hand |
---|---|
![]() |
![]() |
Getting started
- clone this repository into your catkin workspace:
cd ~/easy_handeye2_ws/src # replace with path to your workspace
git clone https://github.com/marcoesposito1988/easy_handeye2
- satisfy dependencies
cd .. # now we are inside ~/easy_handeye2_ws
rosdep install -iyr --from-paths src
- build
colcon build
Usage
Two launch files, one for computing and one for publishing the calibration respectively, are provided to be included in your own. The default arguments should be overridden to specify the correct tf reference frames, and to avoid conflicts when using multiple calibrations at once.
The suggested integration is:
- create a new
handeye_calibrate.launch.py
file, which includes the robot’s and tracking system’s launch files, as well aseasy_handeye
’scalibrate.launch.py
as illustrated below in the next section “Calibration” - in each of your launch files where you need the result of the calibration, include
easy_handeye
’spublish.launch.py
as illustrated below in the section “Publishing”
Calibration
For both use cases, you can either launch the calibrate.launch.py
launch file, or you can include it in another launchfile as shown below. Either
way, the launch file will bring up a calibration script. By default, the script will interactively ask you
to accept or discard each sample. At the end, the parameters will be saved in a yaml file.
eye-in-hand
```xml