Skip to content

sitahara/as24ws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS Noetic Installation and Project Setup

This guide provides a step-by-step setup for running the cave exploration project on Ubuntu 20.04 using ROS Noetic.

1. Installing ROS Noetic

1.1 Setup ROS Repositories

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 -

1.2 Update Package Index

sudo apt update

1.3 Install ROS Noetic

sudo apt install ros-noetic-desktop-full

1.4 Install and Initialize rosdep

sudo apt install python3-rosdep
sudo rosdep init
rosdep update

2. Environment Setup

2.1 Source ROS Setup File

source /opt/ros/noetic/setup.bash

To make this permanent, add it to your .bashrc:

echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

2.2 Install Python Packages for ROS Workspaces

sudo apt install python3-catkin-tools python3-wstool python3-pip

2.3 Install Required Python Libraries

pip3 install -U rosdep networkx scikit-learn numpy

3. Clone and Initialize the Workspace

3.1 Clone the Repository

cd ~
git clone --recurse-submodules https://gitlab.lrz.de/shotaro_itahara/as24ws.git
cd as24ws
git checkout master

3.2 Initialize and Update Submodules

git submodule init
git submodule update --recursive

3.3 Clone Additional Dependencies

git clone -b noetic https://github.com/ros-perception/image_pipeline.git src/image_pipeline

4. Install Dependencies

rosdep install --from-paths src --ignore-src -r -y

5. Build the Workspace

catkin build
source devel/setup.bash

6. Add the Simulator

Download the simulator and place the following files inside ~/as24ws/src/simulation:

  • Simulation.x86_64
  • UnityPlayer.so
  • Simulation_Data

Make the simulation file executable:

chmod +x Simulation.x86_64

7. Running the System

7.1 Start the Simulation

roslaunch simulation simulation.launch

7.2 Launch the Full Pipeline

In a new console,

cd ~/as24ws
source devel/setup.bash
roslaunch exploration_planner explore.launch

8. Saving and Visualizing the Map

The 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

9. Troubleshooting

  • If catkin build fails:
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.5

This will cause the drone to move slower, allowing the processing to catch up even on slower computers.

About

Code repository for the final project for TUM "Autonomous Systems" in WS24

Resources

Stars

Watchers

Forks

Contributors