Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1.48 KB

README.md

File metadata and controls

45 lines (32 loc) · 1.48 KB

ros-singularity

Setup for ROS in a Singularity Container As Singularity is mainly developed and tested for Linux Distributions or Mac OS, I highly recommend using these images on such an OS. The usage of these images in a container would add an unnecessary layer and could impact the performance of the whole setup.

Installation

Follow the official Singulariy Documentation for the Singularity Setup.

Go into the images folder and run:

sudo singularity build <name>.simg Singularity.<distro>

Personal Recommendation

My images all follow the pattern: ros-<distro> and are moved to a folder in my home directory.
This makes it possible to use the following bash functions a quick start of the container from anywhere and autocompletion of this command.

Quickstart a Container from anywhere:

ros() {
  singularity shell ~/<singularity-image-folder>/ros-$1.simg -c "source /opt/ros/$1/setup.bash"
}

Enable Autocompletion for the image names:

_ros() {
  local cur=${COMP_WORDS[COMP_CWORD]}
  COMPREPLY=( $(compgen -W "$(ls ~/<singularity-image-folder> | sed 's/.\{5\}$//' | sed 's/.\{4\}//')"))
}
complete -F _ros ros

More Information about the Autocompletion

Contributing

Pull Requests with new Singularity Images for older or newer versions of ROS are welcome.

License

MIT