After defining how i was going to be measuring efficiency. The next step was to ascertain if the surfaces were adequately receiving sufficient UV-C exposure. Unfortunately, there didn’t seem to be an effective UV-c plugin which would enable this in gazebo.
Instead to simulate the uv-c light, i am using a LiDAR sensor, as this emits beams of light, just as a UV-c lamp would. To calculate uv-c exposure, we’d need the inverse square law which is as follows.

With P being the power of the light source, which is already known, and r being the euclidean distance between the source and the point. The great thing about using LiDAR to simulate UVC is that r is already calculated for us. We also already get a location for where the light beam hits too. The assumptions that are made here are that the light source is 100% efficient at converting energy to light and that there is a 100% absorption rate. By using a 3D 360 lidar, we can emit light in all directions.

Example of A Lidar point cloud
To monitor the radiation dose at each point of the environment, the environment can be represented as a voxel map, this is using the octomap plugin. A voxel is simply a container of data. By superimposing the lidar point cloud onto the voxel map, we are able to view the surfaces where the radiation had hit. We can then change the color of a voxel if a certain dosage had been received.

The first line
‘for (auto it = meas_octree->begin_leafs(); it != meas_octree->end_leafs(); ++it) ‘
iterates over leaf nodes in the octree. starting from begin_leafs() to end_leafs.
the next line
if (it->isDoseSet()) {
checks if a dose is set.
the next line then checks if this node is with given boundary
if (isInBounds(it.getCoordinate(), x_min, x_max, y_min, y_max, z_min, z_max))
This reduces noise of unwanted voxels.
If node has dose value , and is within a boundary, we can then check if its above a certain threshold.
if (it->getDose() >= dose_threshold)
Then, finally we can search for corresponding node in ground truth octree and compare using the following lines
OcTreeNode* node = gtruth_octree->search(it.getKey());
if (node && compareDouble(node->getOccupancy(), gtruth_clamp_threshold)) {
then if a node is found, it is then stored and incremented.
Essentially, with the Lidar scanner and voxel map, we can store data about uv exposure for each voxel, and change the color accordingly, below is the result.
Result:
The higher the dose received, the brighter the node and the color of the voxel.