- This repository is for building docker image containing OpenSatKit(OSK) and minicom inside.
- Image is based on Ubuntu 18.04 due to dependency issues related to build of QT4 apps.
- Use of container will help resolving dependency matters caused by Ubuntu distro versions.
- You need following prequisites for building this project:
- Build process is not necessary for using a docker container.
- You can download prebuilt image from the docker hub.
- In Order to build a OSK docker image, do following:
- First, clone this repository.
- Then, move to directory to cloned repo. and run following command:
- Tag of an image can be changed based on your need.
DOCKER_BUILDKIT=1 docker build --no-cache \
--build-arg BASEIMAGE=ubuntu \
--build-arg BASETAG=18.04 \
--build-arg OSK_VERSION=v2.5 \
-t kestr3l/opensatkit:18.04-v2.5-original \
-f Dockerfile .
- List of arguments used in the build are as following:
- Currently, only
OSK_VERSION
is changeable. - Change it based on your need. Check list of tags of OSK.
- Currently, only
ARGUMENT | DESCRIPTION | DEFAULT | CHANGEABLE |
---|---|---|---|
BASEIMAGE |
Name of docker base image to be used | ubuntu | X |
BASETAG |
Tag of docker base image to be used | 18.04 | X |
OSK_VERSION |
Version of OSK to be installed inside a container | v2.5 | O |
- Since the docker image uses GUI, you need to run
xhost +
before creating a container. - There are two ways of running a container:
docker run
anddocker-compose
.
- Use following command for running a container.
- Add
bash
at the end if you don't want to autostart COSMOS. - Since it has
--rm
, container will be deleted on exit.
- Add
docker run -it --rm \
-e DISPLAY=$DISPLAY \
-e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
-e QT_NO_MITSHM=1 \
-e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
-v /tmp/.X11-unix:/tmp/.X11-unix \
--device /dev/ttyUSB0 \
--net host \
--ipc host \
--gpus all \
--privileged \
--name OpenSatKit \
kestr3l/opensatkit:18.04-v2.5-original
- You must have
docker-compose
installed on your system. - To run a container with
docker-compose
, following values of the host must be known:- Three environment variables.
- One serial device name connected to the host.
VARNAME | DESCRIPTION | EXAMPLE VALUE | SEARCH COMMAND |
---|---|---|---|
DISPLAY |
Display connected to the host's X server(X11) | :0 |
echo $DISPLAY |
WAYLAND_DISPLAY |
Display connected to the host's Wayland server (Only for Desktop Environments using Wayland) |
wayland-0 |
echo $WAYLAND_DISPLAY |
XDG_RUNTIME_DIR |
Directory for user-specific, non-essential runtime files | /run/user/1000/ |
echo $XDG_RUNTIME_DIR |
ttyUSB* |
Name of a serial device connected by USB | ttyUSB0 |
dmesg | grep tty |
- You must check values of your system and should modify is based on your environment.
- You can also refer to comments written in
docker-compose.yml
.
- After running a container, use following commmand to use minicom:
- Name of conatiner may vary baed on modifications you made on the container name
docker exec -it OpenSatKit minicom -s
- minicom configuration will appear on a terminal.
- Modify
Serial port setup
. There are two values you should check:Serial Device
: Name of serial device mapped to the containerHardware Flow Control
: Must be off, otherwise, keyboard input won't work
- After the setup, choose
Exit
and serial data will start to be shown.
- COSMOS is a product of Ball Corportation and it is distributed under AGPLv3 license.
- Assets of COSMOS included in OSK and following parts of
Dockerfile
is derived fromBallAerospace/COSMOS
.- APT dependencies on
requirements.txt
- Removed
libgstreamer0.10-dev
andlibgstreamer-plugins-base0.10-dev
due to deprecation on Ubuntu 18.04
- Removed
- Installation of Ruby 2.5.8 using rbenv/rbenv
- Modification of
rbenv
andruby-build
repository's name to clone
- Modification of
- APT dependencies on
- For developing your own CFS app or modified 42 simulator, use docker volume mapping.
- Mapped volume will be persistent even after killing a container.
- Available tags of images distributed by docker hub are as following:
- Naming rule: <UBUNTU VERSION> - <OpenSatKit VERSION> - <VARIANT>
TAG | DESCRIPTION |
---|---|
18.04-v2.5-mod |
Version including modified 42 simulator and COSMOS. (For internal testing purpose) |
18.04-v2.5-original |
Version including OpenSatKit as it is. (For external users for development) |