Skip to content

Commit 9fe47c7

Browse files
committed
Release v4.0.0
1 parent 8cae9f3 commit 9fe47c7

18 files changed

+681
-147
lines changed

.env

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
IMAGE_NAME=alexandrlucas/miro-docker
33
CONTAINER_NAME=miro-docker
44

5+
# CI
6+
DEV_BUILD=true
7+
58
# User and runtime paths
69
USER_UID=1000
710
USER_GID=1000
@@ -13,4 +16,4 @@ X11UNIX=/tmp/.X11-unix
1316
# PulseAudio setup
1417
PULSE_SERVER=unix:/run/user/${USER_UID}/pulse/native
1518
PULSE_SOCKET=/run/user/${USER_UID}/pulse
16-
PULSE_COOKIE=/.config/pulse/cookie
19+
PULSE_COOKIE=.config/pulse/cookie

.github/workflows/docker-publish.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ jobs:
3434
username: ${{ vars.DOCKERHUB_USERNAME }}
3535
password: ${{ secrets.DOCKERHUB_TOKEN }}
3636

37+
- name: Load .env
38+
id: envfile
39+
run: |
40+
set -a
41+
source .env
42+
set +a
43+
echo "DEV_BUILD=$DEV_BUILD" >> $GITHUB_ENV
44+
3745
- name: Extract metadata (tags, labels)
3846
id: meta
3947
uses: docker/metadata-action@v5
@@ -48,6 +56,7 @@ jobs:
4856
uses: docker/setup-buildx-action@v3
4957

5058
- name: Build and push Docker image
59+
if: ${{ github.ref_name != 'dev' || env.DEV_BUILD == 'true' }}
5160
uses: docker/build-push-action@v6
5261
with:
5362
context: .

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ RUN apt-get update && apt-get install -y \
3232
xorg-dev \
3333
eog \
3434
libegl1-mesa-dev \
35+
libgl1-mesa-glx \
3536
libgles2-mesa-dev \
37+
mesa-utils \
3638
net-tools \
3739
iproute2 \
3840
tree \
@@ -124,6 +126,7 @@ eval "$(starship init bash)"
124126
EOF
125127
fi
126128
EOT
129+
# Create .bashrc_miro addendum
127130
RUN cat <<'EOF' > ~/.bashrc_miro
128131
# MDK
129132
if [ ! -f ~/.miro2/config/miro-mode ]; then
@@ -138,6 +141,7 @@ source ~/mdk/setup.bash
138141
source ~/mdk/catkin_ws/devel/setup.bash
139142
source /etc/bash_completion.d/miro-completion
140143
EOF
144+
# Append to .bashrc
141145
RUN cat <<'EOF' >> ~/.bashrc
142146

143147
# MDK
@@ -159,7 +163,7 @@ RUN if [ "${GIT_BRANCH}" = "master" ]; then \
159163
yes | unminimize; \
160164
fi
161165

162-
# ---- Final cleanup ----
166+
# ---- Final clean-up ----
163167
RUN source ~/mdk/setup.bash && cd ~/mdk/catkin_ws && \
164168
catkin build && catkin clean -y && catkin build && \
165169
cd ~/mdk/catkin_ws/build/miro2_msg && make install

README.md

Lines changed: 67 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,82 @@
22

33
MiRo & MiRo Developer Kit simulation and development environment in Docker.
44

5+
### ⚙️ [Installation](docs/INSTALL.md)
56

6-
## ⚙️ Installation
7-
Installation process depends on the OS of the host machine.
7+
### 📝 [Changelog](docs/CHANGELOG.md)
88

9-
See [INSTALL](docs/INSTALL.md) for full setup instructions.
10-
11-
## 📝 Changelog
12-
See [CHANGELOG](docs/CHANGELOG.md) for version history and release notes.
13-
14-
## 🧠 TODO
15-
See [TODO](docs/TODO.md) for planned improvements.
9+
### 🧠 [To-Do](docs/TODO.md)
1610

1711
## 🚀 Quick Start
1812

13+
### Host OS
1914
```bash
20-
# Clone the repository
15+
# Clone this repository, either into your host OS or into the WSL distro
2116
git clone https://github.com/AlexandrLucas/miro-docker.git
2217

23-
# Pull/build image and start the container
18+
# Pull/build image and start a MiRo Docker container (select default values)
2419
./miro-docker.sh start
2520

26-
# Open a terminal within the running container
21+
# Attach a terminal to the running container
2722
./miro-docker.sh term
2823
```
24+
Run `miro-docker.sh` without arguments for help on usage.
25+
26+
>Note: You can add a `miro-hub` alias for the `miro-docker.sh` script onto your
27+
PATH by running `tools/miro-hub-installer.sh`.
28+
This allows to run the script from any folder.
29+
30+
### MiRo Docker
31+
Check for the Starship Docker prompt to ensure you're in the right place:
32+
33+
![starship docker prompt](docs\figs\starship-docker.png)
34+
35+
The MiRo docker image ships with an all-in-one `miro` script.
36+
Below are some examples of the functionality it provides.
37+
38+
#### Example 1. Gazebo simulator + MiRo GUI app
39+
You'll need to open three terminal windows and run the following:
40+
41+
```bash
42+
[Terminal 1] roscore
43+
[Terminal 2] miro sim
44+
[Terminal 3] miro gui
45+
```
46+
47+
#### Example 2. Gazebo simulator + MiRo autonomous mode + MiRo dashboard
48+
You'll need quite a few terminal windows for this one!
49+
50+
>Note: The command in *Terminal 6* is used to make the blue ball move in a
51+
periodic motion, providing a stimuli for the MiRo.
52+
53+
The final bit, MiRo dashboard, can be viewed by following the link in the output
54+
of *Terminal 7*.
55+
56+
```bash
57+
[Terminal 1] roscore
58+
[Terminal 2] miro sim
59+
[Terminal 3] miro demo
60+
[Terminal 4] miro demo caml
61+
[Terminal 5] miro demo camr
62+
[Terminal 6] rosrun com3528_examples ball_mover.py
63+
[Terminal 7] miro dashboard
64+
```
65+
66+
#### Example 3. Three MiRos chasing the ball in the simulator
67+
This example shows the power of `roslaunch` files.
68+
69+
>Note: `roscore` starts automatically when running a `roslaunch` file.
70+
71+
```bash
72+
[Terminal] roslaunch com3528_examples sim_football.launch
73+
```
74+
75+
#### Example 4. Running MiRo GUI for a real MiRo
76+
By default, the MiRo Docker image works in simulation, but by changing a few
77+
settings you can just as easily work a physical MiRo.
78+
You'll need to do the following:
79+
1. Ensure that the MiRo and your computer are on the same subnet and are visible to each other.
80+
2. Switch the mode by running `miro mode robot` (as opposed to `miro mode sim`).
81+
3. Input the IPv4 address of your MiRo by running `miro ip update`.
82+
4. Open a new terminal and run `miro status` to ensure that everything is set up correctly.
83+
5. Run `miro gui`.

compose.linux.amd.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
services:
2+
miro:
3+
env_file:
4+
- .env
5+
image: ${IMAGE_NAME}:${IMAGE_TAG:-latest}
6+
container_name: ${CONTAINER_NAME}
7+
privileged: true
8+
network_mode: host
9+
tty: true
10+
stdin_open: true
11+
restart: unless-stopped
12+
command: bash
13+
environment:
14+
# GUI
15+
DISPLAY: ${DISPLAY}
16+
GDK_BACKEND: "x11"
17+
GDK_DISABLE_XSHM: "1"
18+
QT_X11_NO_MITSHM: "1"
19+
OPENCV_VIDEOIO_MSMF_DISABLE: "1"
20+
OPENCV_VIDEOIO_X11_NO_SHM: "1"
21+
# Sound
22+
PULSE_SERVER: ${PULSE_SERVER}
23+
PULSE_COOKIE: /root/${PULSE_COOKIE}
24+
# GPU: ROCm runtime path hints
25+
ROCM_VISIBLE_DEVICES: "all"
26+
HSA_OVERRIDE_GFX_VERSION: "11.0.0" # adjust if needed for your GPU
27+
HIP_VISIBLE_DEVICES: "all"
28+
29+
volumes:
30+
# X11 forwarding
31+
- ${X11UNIX}:${X11UNIX}:rw
32+
- ${XAUTH}:${XAUTH}:rw
33+
# Audio (PulseAudio)
34+
- ${PULSE_SOCKET}:${PULSE_SOCKET}:rw
35+
- ${HOME}/${PULSE_COOKIE}:/root/${PULSE_COOKIE}:ro
36+
# MiRo catkin workspace
37+
- mdpv:/root/mdk/catkin_ws/src
38+
39+
devices:
40+
- /dev/snd:/dev/snd
41+
# AMD GPU access (ROCm and Mesa)
42+
- /dev/dri:/dev/dri
43+
- /dev/kfd:/dev/kfd
44+
group_add:
45+
- video
46+
- audio
47+
48+
deploy:
49+
resources:
50+
reservations:
51+
devices:
52+
- driver: amd
53+
count: all
54+
capabilities: [gpu]
55+
56+
volumes:
57+
mdpv:

compose.linux.nvidia.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
services:
2+
miro:
3+
env_file:
4+
- .env
5+
image: ${IMAGE_NAME}:${IMAGE_TAG:-latest}
6+
container_name: ${CONTAINER_NAME}
7+
privileged: true
8+
network_mode: host
9+
tty: true
10+
stdin_open: true
11+
restart: unless-stopped
12+
command: bash
13+
environment:
14+
# GUI
15+
DISPLAY: ${DISPLAY}
16+
GDK_BACKEND: "x11"
17+
GDK_DISABLE_XSHM: "1"
18+
QT_X11_NO_MITSHM: "1"
19+
OPENCV_VIDEOIO_MSMF_DISABLE: "1"
20+
OPENCV_VIDEOIO_X11_NO_SHM: "1"
21+
# Sound
22+
PULSE_SERVER: ${PULSE_SERVER}
23+
PULSE_COOKIE: /root/${PULSE_COOKIE}
24+
# GPU
25+
NVIDIA_VISIBLE_DEVICES: "all"
26+
NVIDIA_DRIVER_CAPABILITIES: "all"
27+
28+
volumes:
29+
# X11 forwarding
30+
- ${X11UNIX}:${X11UNIX}:rw
31+
- ${XAUTH}:${XAUTH}:rw
32+
# Audio (PulseAudio)
33+
- ${PULSE_SOCKET}:${PULSE_SOCKET}:rw
34+
- ${HOME}/${PULSE_COOKIE}:/root/${PULSE_COOKIE}:ro
35+
# MiRo catkin workspace
36+
- mdpv:/root/mdk/catkin_ws/src
37+
38+
devices:
39+
- /dev/snd:/dev/snd
40+
group_add:
41+
- audio
42+
43+
deploy:
44+
resources:
45+
reservations:
46+
devices:
47+
- driver: nvidia
48+
count: all
49+
capabilities: [gpu]
50+
volumes:
51+
mdpv:

compose.linux.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
services:
2+
miro:
3+
env_file:
4+
- .env
5+
image: ${IMAGE_NAME}:${IMAGE_TAG:-latest}
6+
container_name: ${CONTAINER_NAME}
7+
privileged: true
8+
network_mode: host
9+
tty: true
10+
stdin_open: true
11+
restart: unless-stopped
12+
command: bash
13+
environment:
14+
# GUI
15+
DISPLAY: ${DISPLAY}
16+
GDK_BACKEND: "x11"
17+
GDK_DISABLE_XSHM: "1"
18+
QT_X11_NO_MITSHM: "1"
19+
OPENCV_VIDEOIO_MSMF_DISABLE: "1"
20+
OPENCV_VIDEOIO_X11_NO_SHM: "1"
21+
# Sound
22+
PULSE_SERVER: ${PULSE_SERVER}
23+
PULSE_COOKIE: /root/${PULSE_COOKIE}
24+
25+
volumes:
26+
# X11 forwarding
27+
- ${X11UNIX}:${X11UNIX}:rw
28+
- ${XAUTH}:${XAUTH}:rw
29+
# Audio (PulseAudio)
30+
- ${PULSE_SOCKET}:${PULSE_SOCKET}:rw
31+
- ${HOME}/${PULSE_COOKIE}:/root/${PULSE_COOKIE}:ro
32+
# MiRo catkin workspace
33+
- mdpv:/root/mdk/catkin_ws/src
34+
35+
devices:
36+
- /dev/snd:/dev/snd
37+
group_add:
38+
- audio
39+
40+
volumes:
41+
mdpv:

compose.mac.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
services:
2+
miro:
3+
env_file:
4+
- .env
5+
image: ${IMAGE_NAME}:${IMAGE_TAG:-latest}
6+
container_name: ${CONTAINER_NAME}
7+
privileged: true
8+
network_mode: host
9+
tty: true
10+
stdin_open: true
11+
restart: unless-stopped
12+
command: bash
13+
environment:
14+
# GUI
15+
DISPLAY: ${DISPLAY}
16+
GDK_BACKEND: "x11"
17+
GDK_DISABLE_XSHM: "1"
18+
QT_X11_NO_MITSHM: "1"
19+
OPENCV_VIDEOIO_MSMF_DISABLE: "1"
20+
OPENCV_VIDEOIO_X11_NO_SHM: "1"
21+
# Sound
22+
PULSE_SERVER: ${PULSE_SERVER}
23+
PULSE_COOKIE: /root/${PULSE_COOKIE}
24+
25+
volumes:
26+
# X11 forwarding
27+
- ${X11UNIX}:${X11UNIX}:rw
28+
- ${XAUTH}:${XAUTH}:rw
29+
# Audio (PulseAudio)
30+
- ${PULSE_SOCKET}:${PULSE_SOCKET}:rw
31+
- ${HOME}/${PULSE_COOKIE}:/root/${PULSE_COOKIE}:ro
32+
# MiRo catkin workspace
33+
- mdpv:/root/mdk/catkin_ws/src
34+
35+
devices:
36+
- /dev/snd:/dev/snd
37+
group_add:
38+
- audio
39+
40+
volumes:
41+
mdpv:

0 commit comments

Comments
 (0)