Image title

ATOM

What is ATOM?

ATOM is a calibration framework using the Atomic Transformations Optimization Method.

https://github.com/lardemua/atom

It contains a set of calibration tools for multi-sensor, multi-modal, robotic systems, based on the optimization of atomic transformations, as provided by a ROS based robot description. Moreover, it provides several scripts to facilitate all the steps of a calibration procedure.

If this work is helpful for you please cite our publications.

Calibration Pipeline

In order to calibrate a robotic system one needs to carry out several tasks, such as acquiring data, labeling data, executing the calibration, interpreting the result of the calibration, etc. ATOM provides several scripts to address all the stages of a calibration procedure. These scripts are seamlessly integrated into ROS, and make use of RViz to provide extensive visualization functionalites. We have divided the calibration procedure into several stages, shown in the scheme below.

Image title

ATOM calibration pipeline.

The greyed out boxes are steps considered to be out of the scope of ATOM, i.e., these are tasks one should do in order to properly configure and run a robotic system in ROS, even if ATOM is not going to be used. Dashed line boxes represent steps which are optional, i.e., they may improve the calibration but are not essential to the procedure.

Below we describe each of these stages, giving examples for the MMTBot.

Robotic System Configuration

Robotic System Configuration concerns the design and implementation of your robotic system in ROS. It generally involves the writing of an UDRF or a xacro file that describes the links and joints of your robotic system, among other things. If you are not familiar with this there are ROS tutorials to build your robot URDF and also to create your robot xacro.

Note

To calibrate your robot with ATOM, we recommend using xacro files instead of urdfs.

This stage may also include de configuration of a simulation of your system in Gazebo.

Typically one creates a couple of ros packages for our robot, as described below.

<my_robot>_description ros package contains the xacro files that describe your robot. It sometimes also contains cad models inside a models folder. An example from MMTBot is here.

<my_robot>_bringup ros package contains the launch files used to bringup your robotic system. Tipically there is a bringup.launch that starts the complete system. An example from the MMTBot.

Data Logging

Data Logging is the procedure by which a ros bagfile is recorded to be used in the calibration later on.

You may record data by calling rosbag record directly, e.g.:

rosbag record /topic1 ... /topicN -o output.bag

We typically have a roslaunch file to record data and produce a bagfile for each robotic system. Here's the example for MMTBot.

A bagfile should contain several topics, namely transformations and joint state messages, as well as messages produced by the sensors in the system. For example, in the case of MMTBot, which has sensors world_camera, hand_camera and lidar, we record the following topics:

  • /tf
  • /tf_static
  • /joint_states
  • /world_camera/rgb/image_raw/compressed
  • /world_camera/rgb/camera_info
  • /hand_camera/rgb/image_raw/compressed
  • /hand_camera/rgb/camera_info
  • /lidar/points

Initial Positioning of Sensors

The goal of this stage is to allow the user to define interactively the poses of each sensor, so that the optimization starts close to the optimal solution and thus avoids local minima. This stage may be skipped if the transformations from the URDF are believed to be "sufficiently" accurate.

More details here.

Data Collection and Labeling

This stage reads the bagfile and allows the user to assist the labeling procedure, i.e., the identification of the calibration pattern in the data of the sensors, and then to decide when to save each collection. The output is an ATOM dataset.

More details here.

Dataset playback

This stage is used to review ATOM datasets. The reviewing may identify incorrect labels, which can be corrected through manual annotation. It produces a corrected ATOM dataset.

More details here.

Calibration

This is where finally the system is calibrated. ATOM provides extensive visualization functionalities so that it is possible to observe how the calibration is performing.

More details here.

Calibration Evaluation

ATOM provides several scripts designed to measure the accuracy of the calibration. These tools are pairwise evaluations, which means it is possible to compare the accuracy of ATOM with other state of the art pairwise approaches.

More details here.

Running the calibrated system

After calibration ATOM produces a calibrated URDF file which can be directly used in ROS.

If you get here unscathed, you are a very lucky person :-) ... Enjoy!

What is a label?

A label is a set of data points selected from the complete sensor data, obtained through a labeling or pattern detection procedure. The representation of a label differs according to the sensor modality, as detailed next.

RGB camera labels are a list of image pixel coordinates of the corners of the pattern.

Image title

Labels for RGB modality.

3D Lidar labels contain the list of 3D point coordinates of the Lidar data points that belong to the pattern. In addition to this, 3D Lidar labels also contain a list of 3D points of the physical boundaries of the pattern.

Image title

Labels for the 3D Lidar modality. Small green spheres are the pattern support points, larger green spheres are the points annotated as boundaries of the pattern.

Depth modality labels contain a list of image pixel coordinates that are annotated to be inside the pattern. In addition to this, depth labels also contain a set of pixel coordinates of the boundaries of the pattern.

Image title

Labels for the depth modality. Pattern support points in yellow, and boundaries in pink.

What is a collection?

A collection is a recording of the data from all the sensors in the system at a particular time instant selected by the user. Collections also contain information about labels for the sensor data, as well as the state of the robotic system at that time, i.e., all the transformations.

Image title

Sensor data from an MMTBot collection.

Incomplete collections

A collection is referred to as an incomplete collection when it is not possible to detect the pattern in at least one of the sensors of the robotic system.

What is an ATOM dataset?

An ATOM dataset is a folder which contains data used for the calibration of a robotic system. Every ATOM dataset contains a dataset.json which provides details about the dataset, such as the defined configuration, the number of sensors, etc.

Several scripts in the calibration pipeline require an ATOM dataset, but it is worth mentioning that the files are also human readable.

Below you can see the structure of an ATOM dataset.

Image title

Structure of an ATOM dataset json file.

A dataset.json file contains a _metadata field, where details about the date, user and others are stored. It also contains a calibration_config, which is a copy of the state of the configuration file at the time of creation of the dataset. The sensors field describes each of the sensors in the system, in particular those selected to be calibrated.

Finally, the collections field contains several collections, i.e. snapshots of data. Each collection contains a subfield data, that stores a dictionary obtained through the conversion of the ROS message to a python dictionary, the subfield labels contains information about annotations (automatic or manual) of each sensor data, and the subfield transforms contains all the transformations published at (or near) the time of the collection.

In addition to the dataset.json file, ATOM datasets also contain dedicated files for larger data blobs, such as point clouds or images, which are saved separately in the same folder.

Because the transformations are stored for each collection, it is possible to recover the complete state of the robotic system at the time of each collection. ATOM then provides visualization functionalities to display all collections at once. Below we can see the different poses of the manipulator and the calibration pattern for each collection of an MMTBot dataset.

Image title

Several collections in an MMTBot dataset.

Here is an ATOM dataset example from LARCC.

ATOM in ROS2

At the moment, ATOM is developed in ROS1 (Noetic), Ubuntu 20.04 LTS.

However, it is possible to calibrate systems developed in ROS2. Check these instructions.