documentation:containers

This is an old revision of the document!


Containers

It can be configured in a number of ways, below is a suggestion:

Edit or create ~/.ssh/config:

Host git.cs.lth.se
    Hostname git.cs.lth.se
    User git
    IdentityFile ~/.ssh/id_gitcs
    IdentitiesOnly yes

Generate your key:

ssh-keygen -t ed25519 -f ~/.ssh/id_gitcs

You need to add your key (~/.ssh/id_gitcs.pub) to: https://git.cs.lth.se/-/profile/keys

If you use a passphrase (simplifies access and the passphrase is stored in you keychain):

ssh-add ~/.ssh/id_gitcs

Valuable information about how to use ROS Containers exists in the repository readme: https://git.cs.lth.se/robotlab/ros-containers

Clone the ROS-containers repository

git clone git@git.cs.lth.se:robotlab/ros-containers.git
cd ros-containers

Set options

There are many options, all start with use-. All use commands modifies config.env which you can modify in your favorite text editor aswell. Initially no config.env exists, it will be copied from config.env.template.

Quickstart for ROS Noetic and Docker:

make use-docker use-noetic

Quickstart for ROS Noetic and Nvidia docker (for GPU compute and acceleration):

make use-nvidia-docker use-noetic

Both above requires your user to have sudo access. If your user belongs to the group docker, you can instead use use-docker-rootless and use-nvidia-docker-rootless.

More options are available in the documentation: https://git.cs.lth.se/robotlab/ros-containers and more specifically you can take a peep inside Makefile to see available commands.

Build and run

make run

This will build the base image, a special user image where your user is known and mapped and finally a container to run it all in.

By default your home directory is mapped to environment/home relative to ros-container repo root.

Resume and reset

Delete your container to change mappings or otherwise clean out your environment:

make delete

If you exit your container/restart your computer:

make resume

This command will resume your container. Note: if the container is resumed in one terminal and you resume again, you will effectly use the same terminal interface in multiple terminals (they will be mirrored).

You should have succeeded in building the container and is inside it for below to work.

Build the Heron Workspace

workspace init heron.rosinstall
workspace install

Run Heron simulation

Two terminals or tmux/start roscore in background:

Terminal 1:

workspace shell
mon launch heron_launch simulation.launch

A note of behaviour, if you exit the first terminal you created with make run or make resume all others will be terminated with the exit of the first.

Terminal 2: New terminal running inside the container can be created with make terminal

roscore
  • documentation/containers.1674138057.txt.gz
  • Last modified: 2023/01/19 14:20
  • by marcusk