This guide provides a step-by-step setup for running the cave exploration project on Ubuntu 20.04 using ROS Noetic.
First, add the official ROS repository to your system:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'Next, add the ROS GPG key:
sudo apt install curl gnupg lsb-release
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -sudo apt updatesudo apt install ros-noetic-desktop-fullsudo apt install python3-rosdep
sudo rosdep init
rosdep updatesource /opt/ros/noetic/setup.bashTo make this permanent, add it to your .bashrc:
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrcsudo apt install python3-catkin-tools python3-wstool python3-pippip3 install -U rosdep networkx scikit-learn numpycd ~
git clone --recurse-submodules https://gitlab.lrz.de/shotaro_itahara/as24ws.git
cd as24ws
git checkout mastergit submodule init
git submodule update --recursivegit clone -b noetic https://github.com/ros-perception/image_pipeline.git src/image_pipelinerosdep install --from-paths src --ignore-src -r -ycatkin build
source devel/setup.bashDownload the simulator and place the following files inside ~/as24ws/src/simulation:
Simulation.x86_64UnityPlayer.soSimulation_Data
Make the simulation file executable:
chmod +x Simulation.x86_64roslaunch simulation simulation.launchIn a new console,
cd ~/as24ws
source devel/setup.bash
roslaunch exploration_planner explore.launchThe generated map will be saved automatically at the end of the mission.
The saved file will be available at:
~/.ros/cave.bt
To visualize it:
rosrun octomap_server octomap_server_node cave.bt- If
catkin buildfails:
catkin clean
catkin build- Ensure you source the workspace before launching ROS nodes:
source devel/setup.bash- On lower-end computers, the pipeline might not work correctly. If this is the case, go to line 20 ~ 23 of
src/exploration_planner/scripts/ExplorationPlanner.py, and increase the following numbers.
# Exploration Config
self.time_traverse_single = 5.0
self.time_traverse_multiple = 35.0
self.time_scan = 1.5This will cause the drone to move slower, allowing the processing to catch up even on slower computers.