Author: Irfan Tito Kurniawan
An ultraviolet-C (UV-C) irradiation simulation and evaluation implementation in Gazebo and ROS. The simulation is made possible by modelling the UV-C irradiation system as a 3D LIDAR and representing the environment as a voxel map. The evaluation functionality compares the irradiation simulation result to a reference map of the environment to calculate the total irradiation coverage.
Kurniawan, I. T., & Adiprawita, W. (2021, June). A Method of Ultraviolet-C Surface Irradiation Simulation and Evaluation. In 2021 International Symposium on Electronics and Smart Devices (ISESD) (pp. 1-5). IEEE.
Kurniawan, I. T., & Adiprawita, W. (2021, June). Autonomy Design and Development for an Ultraviolet-C Healthcare Surface Disinfection Robot. In 2021 International Symposium on Electronics and Smart Devices (ISESD) (pp. 1-6). IEEE.
The development of this software won't be possible without the following open-source libraries and tools
- octomap
- octomap_mapping
- octomap_ros
- octomap_msgs
- octomap_rviz_plugins
- velodyne_simulator
- hector_localization
- rotors_simulator
- tinycolormap
We have tested the implementation in Ubuntu 20.04 with ROS Noetic and Gazebo 11.1.0.
We use functionalities provided by C++11.
You will need to install Octomap separately in your system.
Create a catkin workspace
mkdir -p catkin_ws/src && cd ./catkin_ws/src
Clone the repository
git clone https://github.com/titoirfan/soca_octomap
Build and source the repository
cd .. && catkin_make && source ./devel/setup.bash
- Add a 3D LIDAR link and P3D ground truth pose publisher to your URDF and Gazebo model. See
example.urdf.xacro
andexample.gazebo.xacro
for reference. - Run the
message_to_tf
to create atf
expressing the ground truth pose between the map frame and the LIDAR link. - Run the Dose Octomap Server node.
- When a satisfactory Dose Octomap is obtained, save the Dose Octomap using the Dose Octomap Saver node.
- Add the RotorS' Octomap Builder plugin to the
world
file of your environment. See the third line ofblock_and_cylinder.world
for reference.
<!-- Add these anywhere between world tags -->
<plugin name='gazebo_octomap' filename='libBuildOctomapPlugin.so'/>
- Generate the binary ground truth Octomap of the environment by calling the plugin's service. Please note that the Octomap sizes should match and you may have to tune the z-origin parameter. See the example section for more information.
- Run the heatmap evaluator node for the full Dose Octomap file to be evaluated against the binary ground truth Octomap.
We provided a simple example of a static platform irradiating a simple model cubes and cylinder.
- Make and source the repository
cd catkin_ws && source ./devel/setup.bash
- Run the example launchfile to set up the simulation environment. This will spawn the example platform defined in
example.urdf.xacro
in the environmentblock_and_cylinder.world
. It will also run themessage_to_tf
node.
roslaunch soca_octomap example.launch
- Run RViz and open the configuration file at
./src/soca_octomap/soca_octomap/example/rviz/example.rviz
rosrun rviz rviz
- Launch the Dose Octomap Server node
roslaunch soca_octomap octomap_dose_mapping.launch
- Save the Dose Octomap once a satisfactory result is obtained
# Save full map
rosrun soca_octomap octomap_dose_saver_node -f ./src/soca_octomap/soca_octomap/example/octomap/meas_octomap.ot
# Save binary map
rosrun soca_octomap octomap_dose_saver_node ./src/soca_octomap/soca_octomap/example/octomap/meas_octomap.bt
- Make and source the repository
cd catkin_ws && source ./devel/setup.bash
- Generate a ground truth reference Octomap of the environment while Gazebo is simulating the environment. You might have to remove any platforms or robots you have in the field. The bounding box length is centered around the origin (e.g. x origin of 0 and x bounding box length of 5 will get you an x range of -2.5 to 2.5). Make sure to set
fill_closed_spaces
to false to get a surface map of the environment. Note that the size has to match the measured Dose Octomap, you might also have to tune the z-origin to match the coordinates.
rosservice call /world/build_octomap '{bounding_box_origin: {x: 0.0, y: 0, z: 0.5}, bounding_box_lengths: {x: 5.0, y: 5.0, z: 2.05}, leaf_size: 0.05, filename: $(PATH_TO_CATKIN_WS)/src/soca_octomap/soca_octomap/example/octomaps/ref_octomap.bt, fill_closed_spaces: false}'
- Edit the file paths and area bounds in
heatmap_eval.config
and launch the evaluator node
roslaunch soca_octomap heatmap_eval.launch
- You can then visualize the difference Octomap
octovis ./src/soca_octomap/soca_octomap/example/octomaps/diff_octomap.bt