Skip to main content

Singularity PoC 2

Description: Encapsulation of all ROS packages and dependencies for deployment of the multi-drone PoC system (PoC2).

  • Primary Functionality: Singularity recipe.
  • Target: ROS-enabled robots
  • Task: T5.1
  • Responsible: Micael Couceiro

Installing and Running a Singularity Image

This guide provides step-by-step instructions for installing Singularity and running a Singularity image on your system.


Prerequisites​

Before starting, ensure the following:

  • A Linux-based operating system.
  • sudo access to install packages.
  • Internet access to download Singularity and the image.

Quick Start Guide (Linux)​

  1. Install Apptainer - install/install_apptainer.sh.
  2. Create a Apptainer image of the MRS UAV System for OpenSwarm. This should take up to 15 minutes, depending on your internet connection and computer resources.
build scriptdescription
recipes/stable_from_apt_openswarm/build.shinstalls directly from the stable PPA and the ROS-based packages
  1. Copy the example_wrapper.sh (versioned example) into wrapper.sh (.gitignored). It will allow you to configure the wrapper for yourself. When copying the example_wrapper.sh outside of the mrs_apptainer folder, the MRS_APPTAINER_PATH variable within the script needs to be pointed to the correct location of the repository.

  2. Run the Apptainer container by issuing:

[MRS Apptainer] user@hostname:~$ roscd mrs_uav_gazebo_simulation/tmux/one_drone
[MRS Apptainer] user@hostname:~$ ./start.sh

In this case, you will see:

  • Gazebo

gazebo

  • Rviz, and

rviz

  • Tmux

tmux

  • If you want to finish tmux, press Ctrl + Shift + K, then press 9.

  • If you want to logout of singularity image, press Ctrl + d.

  1. To compile openswarm software with the MRS UAV System dependencies, start by placing your packages into the <mrs_apptainer>/user_ros_workspace/src folder of this repository. Please, follow these steps:
  • Initialize and configure a new catkin workspace:
./wrapper.sh
[MRS Apptainer] user@hostname:~/singularity_poc2$ make build
  • Use make install-sys to install the OpenSwarm workspace. This command-line uses wstool and will install all the ROS-packages listed in the <mrs_apptainer>/user_ros_workspace/src/.rosinstall file.
[MRS Apptainer] user@hostname:~/singularity_poc2$ make install-sys
  • Once the ROS-packages have been downloaded, build the system
[MRS Apptainer] user@hostname:~/singularity_poc2$ cd ~/user_ros_workspace/
[MRS Apptainer] user@hostname:~/singularity_poc2$ catkin build
  • Run source devel/setup.bash in your terminal.
[MRS Apptainer] user@hostname:~/singularity_poc2$ source devel/setup.bash

OpenSwarm Simulator​

Pre-prepared simulator​

You can run a previously prepared simulator.

  • One drone with 3D Lidar sensors
[MRS Apptainer] user@hostname:~$ roscd mrs_openswarm_simulation/tmux/one_drone_3dlidar
[MRS Apptainer] user@hostname:~$ ./start.sh

one_drone

  • Three drones with 3D Lidar sensors in swarm formation
[MRS Apptainer] user@hostname:~$ roscd mrs_openswarm_simulation/tmux/three_drones_swarm
[MRS Apptainer] user@hostname:~$ ./start.sh

three_drones

New simulators​

Please, check here