Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using ubuntu-latest can change the underlying OS version over time and make builds non-reproducible. Consider pinning to a specific runner image (e.g., ubuntu-22.04 or ubuntu-24.04) and updating intentionally when needed.

Suggested change
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

Copilot uses AI. Check for mistakes.

steps:
- name: Checkout repository
uses: actions/checkout@v4
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For stronger supply-chain security, consider pinning GitHub Actions to a commit SHA instead of a movable tag like actions/checkout@v4 (tags can be retargeted).

Suggested change
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

Copilot uses AI. Check for mistakes.
with:
submodules: recursive

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
libeigen3-dev \
libmodbus-dev \
libopencv-dev \
libserialport-dev \
pkg-config \
python3-dev \
python3-numpy

- name: Configure
run: cmake .

- name: Build
run: make -j"$(nproc)"
8 changes: 0 additions & 8 deletions .gitlab-ci.yml

This file was deleted.

7 changes: 0 additions & 7 deletions Dockerfile

This file was deleted.

34 changes: 11 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,12 @@

Code to connect to the experimental equipment on the Mobile Rack workbench, such as Festo valves & Qualisys motion tracking system. Code common across different projects using THE RACK can be kept here.

## set up WSL (for Windows)
1. Get [Ubuntu 20.04 from the Microsoft Store](https://www.microsoft.com/store/productId/9n6svws3rx71). If you don't need GUI, no further steps needed.

### suggested tutorials
* https://docs.microsoft.com/en-us/learn/modules/get-started-with-windows-subsystem-for-linux/
* https://ubuntu.com/tutorials/command-line-for-beginners

### to enable GUI in WSL
1. Make sure you're running WSL **2** (check by running `wsl -l -v` in Windows command line), if on WSL **1**, [refer to this](https://docs.microsoft.com/en-us/windows/wsl/install-win10) and update to WSL 2.
1. Install [VcXsrv](https://sourceforge.net/projects/vcxsrv/). This will be used for X11 forwarding in order to use GUI.
1. Launch VcXsrv with settings: *Multiple windows* -> *Start no client* -> check all except *Native opengl*
1. add to end of ~/.bashrc
```bash
export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0
export LIBGL_ALWAYS_INDIRECT=0
```
and open new terminal or run `source ~/.bashrc`.
1. GUI should work now! Try it out with `xeyes`, `xcalc`, `xclock` etc (need to install with `sudo apt install x11-apps`) (reboot may be needed).
1. For some PCs, by checking *Native opengl* in VcXsrv and adding `export LIBGL_ALWAYS_INDIRECT=1` to ~/.bashrc, OpenGL can be used.
## Supported platforms:

- Ubuntu
- macOS
- Windows
- tested with WSL

## get this repository

Expand All @@ -31,17 +18,18 @@ git clone --recursive git@github.com:srl-ethz/mobilerack-interface.git
(`--recursive` option will automatically clone the submodules as well)

## install necessary packages
(also check Dockerfile for hints on how to setup Ubuntu)
(also check GitHub Actions file in `.github/workflows/ci.yml` for hints on how to set up Ubuntu)

for Ubuntu
### for Ubuntu

```bash
sudo apt update
sudo apt install cmake build-essential libmodbus-dev libeigen3-dev libserialport-dev libopencv-dev
sudo apt install python3-dev python3-numpy # install developer package and numpy for system's default python3 version.
```

Cmake version should be above 3.12 (check with `cmake --version`). Ubuntu 18.04 default cmake is older than that, so upgrade may be necessary, in which case run
#### for Ubuntu 18.04 and older
CMake version should be above 3.12 (check with `cmake --version`). Ubuntu 18.04 default cmake is older than that, so upgrade may be necessary, in which case run
```bash
# refer to: https://graspingtech.com/upgrade-cmake/
# remove installed cmake and install required packages
Expand All @@ -57,7 +45,7 @@ make
sudo make install
```

for macOS (todo: unverified)
### for macOS (todo: unverified)

```bash
brew install libmodbus eigen libserialport numpy opencv
Expand Down
Loading