Gather Data from KUKA arm using EBT¶
Note
This README is housed in /examples/KUKA_with_EBT/gather_data
It is possible to calibrate a camera to a robot and calibrate the tool offset at once using Edge Based Tracking. You will need to have Edge Based Tracking and our KUKA-RSI interface.
You will need to setup your KUKA to talk to the KUKA-RSI interface.
Then load a program with a series of diversified points onto the KUKA
(like those in the tp_files directory) which talks over the RSI
interface and stops for a few seconds at each point.
You then need to setup EBT to track your object with the network interface on.
Run The KUKA-RSI interface, then then EBT, then start the program on the
KUKA, then run python RSI_EBT_LOG.py. Allow the program on the KUKA
to run. Then stop the RSI_EBT_LOG, EBT, and KUKA-RSI interface. A log
file should now exist in the gather_data folder (like
2016-5-31_15-38-12.txt). I have also run the routine without EBT
running and captured images everytime the robot stops for
demonstrationand validation purposes, they are stored in Images.
Note, they aren’t undistorted, so not perfect.
The next step is to extract the useful data from the log file. This is
done using extract_for_calib.m within matlab. Pass in the log file,
a series of figures showing the results will generated as well as a json
file (ex: 2016-5-31_15-38-12.json.
You know have everything you need to run the calibration routines!!.
Calibrate and Verify KUKA arm¶
Note
This README is housed in /examples/KUKA_with_EBT
In order to calibrate a KUKA robot using EBT, you will first have to
gather the appropriate data. For this, read HowToGatherData.md in
the gather_data directory.
First install the software by running “sudo python setup.py install” (or install in a virtual environment)
Once you have gathered the appropriate data, edit the
calibrate+check script as needed and run it. Or run
robot2cam-compute and robot2cam-check from the commandline. Images
showing the calibration results should be placed into output_images
and a file detailing the calibration results should be stored as
transformation.json
Calibrate UR Arm¶
Note
This README is housed in /examples/UR_with_Grid
It is very easy to calibrate a UR Robot to a point grey camera using a grid. Hopefully, in the future, this can be extended to other hardware as well.
In order to do this, you will will need to have pyflycapture2 as well as our ur-cb2 package.
The first step is to attach an asymetric grid to the flange of the UR.
Then save a series of robot poses in which the camera can see the grid
using cb2-record. This will generate a series of points such as
cb2points.json.
You then need to run the ur through the points and capture data. This is
done using the robot2cam-record-ur script.
Note
We have seen problems with pyflycapture2 when using a virtual environment
If you would like to have images to use for validation, those can be gathered
using the robot2cam-images-ur command. You will then need to use
robot2cam-compute to calculate the transformations. Finally, you can
optionally use robot2cam-check to visualize the results. All of this
is packages into calibrate_ur.