ROS package that consumes the stream of Compton cones from compton_cone_generator and fuses them into a full-state hypothesis of the compact radiation source position, in real time.
Each incoming cone constrains the set of possible source positions to its surface. As the camera (and cone origin) moves along with the vehicle, the filter fuses the stream of cones — using their orthogonal distance to the current position estimate — into a converging hypothesis of the source location, without needing to estimate the radiation intensity gradient.
compton_camera_filter is the final layer of a three-package pipeline for real-time gamma radiation source localization from a single-detector Compton camera:
- Rospix3 — drives the MiniPIX TPX3 detector and publishes the stream of detected particle clusters (
rad_msgs/ClusterList). - compton_cone_generator — subscribes to the cluster stream, pairs coincident events, and publishes the reconstructed Compton cones (
rad_msgs/Cone). - compton_camera_filter (this package) — subscribes to the cone stream and publishes the fused source-position hypothesis (
geometry_msgs/PoseWithCovarianceStamped).
The main logic lives in the ComptonFilter nodelet (src/compton_filter.cpp). It runs two independent linear Kalman filters (mrs_lib::LKF) side by side: a 2-state (x, y) filter that assumes the source lies on the ground plane, and a full 3-state (x, y, z) filter — both modeling a static source, driven only by process noise q (kalman_2D/kalman_3D params, tunable live via dynamic_reconfigure).
- Initialization (
callbackOptimizer) — the filters stay dormant until the first message arrives onoptimizer_in(an external position prior, e.g. from an intensity-gradient-based search). That pose seeds both filters' state and covariance, after which thelocalization_outservice is called to switch the vehicle into localization mode. - Correction (
callbackCone), once per incomingrad_msgs/Cone:- Cones that geometrically point above the horizon ("point to the sky") are rejected outright.
- For each of the 2D/3D filters,
projectPointOnCone()finds the closest point on the cone's surface to the current state estimate and uses that projection — not the raw cone — as the Kalman measurement. This sidesteps having to resolve where along the cone the source actually lies. - If the angular deviation between the state and its projection exceeds
max_projection_error, the correction is dropped and an error counter is incremented instead. - The fixed measurement-noise covariance
Ris rotated to align with the projection direction (tight radially, elongated tangentially along the cone surface) beforelkf.correct()is called. - The corrected pose is also published on
correction_2d_out/correction_3d_outfor debugging/visualization.
projectPointOnCone()— given a cone and an arbitrary 3D point, it rotates the point's direction vector (relative to the cone's apex) by the angular gap between it and the cone surface, about the axiscone.direction() × point_vector. This snaps the point onto the nearest generator line of the cone, i.e. the closest point on the cone's surface.mainTimer(main_timer_rate) — runs the LKF predict step for both filters every tick, republishes the current state estimate + covariance aspose_2D_out/pose_3D_out, and draws the hypothesis as a cuboid in RViz. It also watches two failure conditions: if no valid cone correction arrived forno_cone_timeoutseconds, it resets the optimizer, disables localization, and re-triggers a search/"sweeping" behavior; if projection errors pile up pastn_projection_errorin a row, it resets the 3D covariance and restarts the hypothesis from scratch.
The optimizer script additionally requires:
pip install sympy scipyIf you use this package in your research, please cite the following papers:
@inproceedings{baca2019timepix,
author = {Baca, Tomas and Jilek, Martin and Manek, Pavel and others},
title = {{Timepix Radiation Detector for Autonomous Radiation Localization and Mapping by Micro Unmanned Vehicles}},
booktitle = {2019 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
year = {2019},
publisher = {IEEE},
pages = {1--8},
}
@inproceedings{baca2021gamma,
author = {Baca, Tomas and Stibinger, Petr and Doubravova, Daniela and Turecek, Daniel and Solc, Jaroslav and Rusnak, Jan and Saska, Martin and Jakubek, Jan},
title = {{Gamma Radiation Source Localization for Micro Aerial Vehicles with a Miniature Single-Detector Compton Event Camera}},
booktitle = {2021 International Conference on Unmanned Aircraft Systems (ICUAS)},
year = {2021},
publisher = {IEEE},
}
@article{stibinger2020localization,
author = {Stibinger, Petr and Baca, Tomas and Saska, Martin},
title = {{Localization of Ionizing Radiation Sources by Cooperating Micro Aerial Vehicles With Pixel Detectors in Real-Time}},
journal = {IEEE Robotics and Automation Letters},
volume = {5},
number = {2},
pages = {3634--3641},
year = {2020},
doi = {10.1109/LRA.2020.2978456},
}