|
1.INTRODUCTIONIn this work we introduce a geometric calibration method for using a flexible robotic arm with seven degrees of freedom as a sample holder within a laboratory X-ray Computed Tomography (CT) setup. The calibration mechanism is required as a result of the insufficient placement accuracy of the robotic arm. A purpose-built sample holder with an embedded geometric structure is used to calibrate the position and orientation of the sample for later use in the reconstruction step. The robotic arm adds flexibility to the setup as a sample holder by enabling arbitrary rotation and placement of the sample. This allows non-standard trajectories that are not restricted in their sequence, such as conventional circular or helical trajectories. In addition, the robotic sample holder can avoid occlusions on the projections that would normally be introduced by limitations of static setups where the sample is inherently mounted to non-moving parts (e.g. mounted on a plate). In the following we present our work on the integration of a robotic arm with seven degrees of freedom within a lab X-ray CT setup together with a suitable calibration mechanism. The system can easily execute specific trajectories that can overcome the limitations of fixed trajectories which will enable imaging modalities that require non-standard acqusition sequences in the future, such as Anisotropic X-ray Dark-field Tomography, a novel imaging technique that allows the extraction of X-ray scattering and phase contrast information by employing grating interferometers.1, 2 The robotic sample holder will enable arbitrary rotations covering the full sphere and hence expose the 3D structures of the target object by measuring the full dark-field contrast from all possible angles. 2.ROBOTIC SAMPLE HOLDERIn this section the methods for operating the robotic arm as a sample holder in a lab X-ray CT setup are discussed in detail. After introducing the hardware components of the system more specific parts like the sample holder, calibration and reconstruction are described. 2.1Hardware SetupThe hardware components of the system are displayed in fig. 1 and 2. The main difference to a conventional X-ray CT setup is the seven degrees of freedom robotic arm Panda from the manufacturer FRANKA EMIKA.3 It has a maximum reach of 855 mm and a repeatability of 0.1 mm when repeatedly moved from a specific starting pose to a goal pose. It has two fingers that can move on a fixed axis and grasp objects. The maximum allowed payload is 3 kg. The robotic arm and the depth cameras are connected directly to a computer while the detector is accessible through a network interface. The robotic arm can be turned off in case of emergency from outside of the safety hutch with a power switch (see fig. 2). Two Intel Realsense D435 depth camera capture the movements of the robot and provide 3D information about the surroundings as a point cloud. The cameras are connected directly to the workstation and they are used for the collision detection mechanism. The robotic arm is mounted on a table inside a safety hutch for X-ray CT which houses the X-ray source and the detector (see fig. 1). The detector has a maximum resolution of 2880x2880 and is connected to a different workstation on the network which provides a network interface for triggering image capturing. 2.2Sample HolderThe sample holder is a critical component of the system as it allows the robotic arm to grasp samples of arbitrary shape and is a fundamental part of the calibration process where the position and orientation of the sample is identified. The 3D models of the sample holder and the rail component are visualized in figure 1. The sample holder consists of two parts. The bottom part is where the robot’s fingers can grasp the holder steadily. The upper part fulfills the actual purpose of placing a geometric structure around the sample on a cylinder. The cylinder is 5.6 cm tall and 3.5 cm in diameter inside. The sample holder was designed with a 3D modeling software and printed using a 3D printer with accuracy of 0.08 to 0.2 mm on all three axes. The printing accuracy is important as the local coordinates of the spheres in the 3D model are used as reference points in the calibration algorithm. The geometric structure embedded in the sample holder is a helix which is made up of 50 embedded aluminium spheres of 0.678 mm diameter. These spheres were fixed by hand on notches that were included in the design process of the holder. The spheres appear as circles on the detector images that will be segmented during calibration. The helix can be parametrized by the following 3D parametric curve: τ runs between the local w coordinates of the first sphere and the last sphere of the helix: wmin < τ < wmax where wmin, wmax ∈ ℝ. The parameters r (radius), ρ (frequency) and ϕ (phase shift) parametrize the helix. They can be determined by fitting the sphere coordinates from the 3D model of the sample holder to eq. (1) with a least-squares term. The source code of this process can be found in the file helix_fitter.py in our repository.4 The helix can be discretized by choosing a fixed number H ∈ ℕ of points {τ i}i=1,…,H ∈ [wmin, wmax] for the free parameter τ : 2.3CalibrationThe calibration procedure tackles the issue that the robotic arm does not sufficiently accurately place the sample at the desired position due to inaccurate path planning and inaccurate electrical motors at its joints. With the calibration procedure we are able to identify the actual positions and orientations of the sample for the reconstruction step. For the calibration a sample holder with an embedded geometric structure that can be detected on the detector images is necessary. A suitable sample holder was introduced in section 2.2. The calibration is implemented in multiple steps (see fig. 3). The first step is the post-processing of the detector image. Its contrast is enhanced and a median filter with kernel size 5 is applied to reduce noise and improve the segmentation results. The calibration circles on the image are detected in the next step with the circle Hough transform algorithm.5 The result is a set of 2D circle center coordinates j = (dx,j dy,j)⊤ on the detector. Eq. (1) and the current position of the robotic arm are now used to project a set of helix points hi (eq. (2)) onto the detector image for comparison with the segmented points j and determining the geometry of the sample. For this projection the intrinsic camera matrix K and the external parameters R and t are needed. K is fixed for the current X-ray CT setup and R, t are determined by the robotic arm’s current position. There are three critical coordinate systems in our setup. The first is fixed to the X-ray source with x, y and z-axis. The second is fixed to the center of the sample holder with u,v and w-axis and moves with the robotic arm as it is attached to the arm’s fingers. The third is fixed to the detector with dx and dy axis. The rotation R of the sample holder relative to the source can be parametrized w.l.o.g. by consecutive rotations about the z, y and x-axis: t is the offset of the source center to the sample holder’s center: K is fixed for the current setup and can be calculated with the parameters sdd (source to detector distance), dx,p, dy,p (principal points on dx and dy-axis) and dw, dh (detector pixel width and height): We introduce the short notation ζ = (α, β, γ, x, y, z) for the free parameters. The camera projection matrix P can now be calculated: The projection matrix is now used to project a set of H ∈ ℕ fixed points hi ∈ ℝ4 on the discretized helix from eq. (2) onto the detector: are the homogeneous detector pixel coordinates and mi are the projected analytical helix points on the detector. These points resemble the expected position of the helix structure and they will be used for constructing an error term in the 2D detector image domain. An appropriate cost function for comparing the error between the current and expected position of a measured circle center j and a projected point on the helix mi is the reprojection error: Eq. (9) will only measure the error for a specific pair of points. In our case there are c (detected) circles on the current image, s spheres glued onto the holder and H projected points on the helix from eq. (1). It is important to note that c ≤ s because the segmentation algorithm might fail to detect all circles. We now compare each of the c detected circle centers j to all H sampled and projected points mi and choose the pair with the smallest distance. We can formulate this algorithm as a least-squares problem: The optimization problem is nonlinear due to the sine and cosine terms in the rotation parametrization. In our implementation we use the Levenberg Marquardt algorithm. The resulting parameters α, β, γ, x, y, z can be used for the reconstruction as the geometry of the given acquisition. 2.4ReconstructionFor tomographic reconstruction, the sinogram contained 1000 equidistant X-ray projections along a circular trajectory sized 720×720 pixels with a spacing of 600μm. The reconstruction volume was sized 720×720×720 with isotropic voxel spacing of 100μm. Using our C++ reconstruction framework elsa,6 reconstruction was performed using an iterative conjugate gradient solver run for 50 iterations on a Tikhonov regularized weighted least squares problem, with the Josephs method for X-ray transform discretization and parallel beam geometry. Further iterations showed no improvement on the cost function. 2.5Software StackThe central part of our software stack is the Robot Operating System (ROS).7 Robot manipulation is accomplished with the MoveIt! framework8, 9 and the franka_ros configuration package.10 For image processing tasks and the circle segmentation we use OpenCV, 11 for multithreading on the CPU OpenMP12 and for the tomographic reconstruction elsa.6 The scientific calculations in section 2.3 are implemented with scipy.13 2.6CT measurementsWe conducted two experiments: a walnut was measured with the robotic arm and with a conventional rotational stage. For each CT measurement, 1000 images were acquired with a source voltage of 30 kV, source power of 1445μA, and exposure time of 1s. In fig. 4 a) the reconstruction of the walnut with the rotational stage is compared to the robotic arm as the sample holder. The two volumes were registered manually as we found automatic registration of the two discretized volumes to be unreliable. The slices were chosen manually for illustration purposes. The center slices of the volume from the top and the front view were extracted and cropped to the region of interest. Our observation is that there is no qualitative difference between the results of the two different sample holders. 2.7Future workIn future work the system can be improved in several ways. The sample holder could be more flexible. Its size currently limits the size of the sample but this can be tackled in another design iteration by embedding the geometrical calibration structure into the base of the holder when it is positioned upwards of the base and compressed in its height. The cylindrical envelope surrounding the sample could be removed and as a consequence, the sample also doesn’t strictly need to be inserted from the top. Moreover, experiments with non-standard trajectories are subject of future work. Finally, the accuracy of the calibration algorithm could be improved by improving the circle detection algorithm that is run on the acquired images. Currently, we are using the circle Hough transform algorithm which could be replaced by a more precise algorithm with sub-pixel segmentation accuracy. 3.CONCLUSIONIn this work we have demonstrated a geometric calibration method for the use of a seven degrees of freedom robot as a sample holder for X-ray computed tomography. Our findings have confirmed that this kind of robot can be used for computed tomography with consistent results when compared to more conventional sample holders. A suitably sized sample holder with a geometric structure that can be used for calibration must be provided. AcknowledgmentsWe acknowledge financial support through the Center for Advanced Laser Applications (CALA). REFERENCESWieczorek, M., Schaff, F., Pfeiffer, F., and Lasser, T.,
“Anisotropic x-ray dark-field tomography: A continuous model and its discretization,”
Physical review letters, 117
(15),
(2016). https://doi.org/10.1103/PhysRevLett.117.158101 Google Scholar
Wieczorek, M., Schaff, F., Jud, C., Pfeiffer, D., Pfeiffer, F., and Lasser, T.,
“Brain connectivity exposed by anisotropic x-ray dark-field tomography,”
Scientific reports, 8 1
–6
(2018). https://doi.org/10.1038/s41598-018-32023-y Google Scholar
EMIKA, F.,
“Panda datasheet,”
(2020). Google Scholar
Pekel, E.,
“Robotic sample holder,”
(2021) https://gitlab.lrz.de/IP/robotic-sample-holder/robotic-sample-holder Google Scholar
Ballard, D. H.,
“Generalizing the Hough transform to detect arbitrary shapes,”
Pattern Recognition, 13
(2), 111
–122
(1981). https://doi.org/10.1016/0031-3203(81)90009-1 Google Scholar
Lasser, T., Hornung, M., and Frank, D.,
“elsa - an elegant framework for tomographic reconstruction,”
15th International Meeting on Fully Three-Dimensional Image Reconstruction in Radiology and Nuclear Medicine, 11072 570
–573 SPIE(2019). Google Scholar
Quigley, M., Conley, K., Gerkey, B., Faust, J., Foote, T., Leibs, J., Wheeler, R., and Ng, A. Y.,
“Ros: an open-source robot operating system,”
ICRA workshop on open source software, 3
(3.2), 5 Kobe, Japan
(2009). Google Scholar
Coleman, D., Sucan, I., Chitta, S., and Correll, N.,
“Reducing the barrier to entry of complex robotic software: a moveit! case study,”
(2014). Google Scholar
Sucan, I. A. and Chitta, S.,
“MoveIt: [online],”
http://moveit.ros.org/ Google Scholar
FRANKA, E.,
“franka ros,”
(2021) https://github.com/frankaemika/franka_ros Google Scholar
Bradski, G.,
“The OpenCV Library,”
Dr. Dobb’s Journal of Software Tools,
(2000). Google Scholar
Dagum, L. and Menon, R.,
“Openmp: an industry standard api for shared-memory programming,”
(1998). https://doi.org/10.1109/99.660313 Google Scholar
Virtanen, P. et al.,
“SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python,”
Nature Methods, 17 261
–272
(2020). https://doi.org/10.1038/s41592-019-0686-2 Google Scholar
|