We present an active simultaneous localisation and mapping system that optimises the pose of the sensor for the 3D reconstruction of an environment, while a 2D Rapidly-Exploring Random Tree algorithm controls the motion of the mobile platform for the ground exploration strategy. You can find a video demo in simulation here: https://www.youtube.com/watch?v=NAPj3_A2e74.
The code has been only tested in Ubuntu 18.04 with ROS Melodic.
To use it, the steps are those common to any ROS package, which are:
-
Move and install outside the ROS workspace the uncertainty octomap package: aslam_system/octomap
-
Compile the workspace where this repository is located.
Note: some dependencies may have to be installed manually.
-
Run main launch file, which includes yocs_cmd_vel_mux, slam_gmapping, move_base_turtlebot3_omni, octomap_uncertainty_server_node, rviz:
roslaunch aslam_bringup aslam_system.launch
-
Run 2D RRT exploration:
roslaunch aslam_bringup rrt_simple.launch
-
Run optimal camera pose planner:
roslaunch aslam_bringup planner.launch
Here, we should have all the required nodes and services ready. To start exploration:
-
Start calling the service /optimize_current_pose (offered by the planner) to estimate the camera's next best pose for exploration. To call it in a loop, use the script:
roscd aslam_bringup/
./optimize_service_loop.sh
-
Start the 2D exploration system. You can follow the instructions from here.
It requieres 5 points to be published in the /clicked_point topic. It can be done using rviz, and must follow this order:
- top-left
- bottom-left
- bottom-right
- top-right
- initial point
At this point, the robot should start navigating towards frontiers.
If the robot gets stucked, teleop_key_turtlebot3.launch allows to move it manually:
roslaunch aslam_bringup teleop_key_turtlebot3.launch
To know the value representing the number of voxels added to the 3D map, the service /octomap_server/get_map_voxels can be called:
rosservice call /octomap_server/get_map_voxels "{}"
To know the value representing the information offered by the 3D map, the service /octomap_server/get_map_info can be called:
rosservice call /octomap_server/get_map_info "{}"
If you use this code, please cite the related paper:
@article{lluvia2023camera,
author={Lluvia, Iker and Lazkano, Elena and Ansuategi, Ander},
journal={IEEE Access},
publisher={IEEE},
title={Camera pose optimisation for 3D mapping},
year={2023},
volume={11},
number={},
pages={9122-9135},
doi={10.1109/ACCESS.2023.3239657}
}
Iker Lluvia. Autonomous and Intelligent Systems, Tekniker.