Compare commits
4 Commits
3c43353162
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 81e765d1ac | |||
| f62c8db559 | |||
| 9ff918d8c5 | |||
| f3f2bd9865 |
@@ -31,7 +31,6 @@ De volgende VS Code extensies worden automatisch geïnstalleerd in de container
|
|||||||
- **Netwerk**: De container deelt de netwerk-namespace van de host (`--network=host`), wat essentieel is voor de communicatie tussen ROS 2 nodes.
|
- **Netwerk**: De container deelt de netwerk-namespace van de host (`--network=host`), wat essentieel is voor de communicatie tussen ROS 2 nodes.
|
||||||
- **GUI Applicaties**: De container is geconfigureerd om GUI-applicaties (zoals RViz of `cv::imshow`) te kunnen draaien door de X11-socket en DRI-apparaten van de host te mounten.
|
- **GUI Applicaties**: De container is geconfigureerd om GUI-applicaties (zoals RViz of `cv::imshow`) te kunnen draaien door de X11-socket en DRI-apparaten van de host te mounten.
|
||||||
- **Workspace**: Je lokale projectmap wordt gemount in `/home/ubuntu/<jouw-project-naam>` in de container.
|
- **Workspace**: Je lokale projectmap wordt gemount in `/home/ubuntu/<jouw-project-naam>` in de container.
|
||||||
- **Gebruikersrechten**: De `ubuntu` gebruiker is toegevoegd aan de `video` groep om toegang te hebben tot webcams en andere video-apparaten.
|
|
||||||
|
|
||||||
## Hoe te gebruiken met een bestaand project
|
## Hoe te gebruiken met een bestaand project
|
||||||
|
|
||||||
@@ -58,7 +57,7 @@ Om GUI-applicaties (zoals `cv::imshow` of `rviz2`) vanuit de container op je hos
|
|||||||
Na elke herstart van je **host-machine** moet je mogelijk het volgende commando in een terminal op je **host-machine** uitvoeren om de container toegang te geven tot de X-server:
|
Na elke herstart van je **host-machine** moet je mogelijk het volgende commando in een terminal op je **host-machine** uitvoeren om de container toegang te geven tot de X-server:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
xhost +
|
xhost +local:docker
|
||||||
```
|
```
|
||||||
|
|
||||||
Dit commando zorgt ervoor dat de container vensters kan openen op je desktop. Zonder dit commando krijg je mogelijk foutmeldingen zoals "cannot open display".
|
Dit commando zorgt ervoor dat de container vensters kan openen op je desktop. Zonder dit commando krijg je mogelijk foutmeldingen zoals "cannot open display".
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
// "--pid=host", // Shares the host's PID namespace with the container
|
// "--pid=host", // Shares the host's PID namespace with the container
|
||||||
"--privileged", // Gives the container full access to the host's devices and allows it to run with root privileges
|
"--privileged", // Gives the container full access to the host's devices and allows it to run with root privileges
|
||||||
],
|
],
|
||||||
|
"initializeCommand": "xhost +local:docker", // Allows the container to access the X server on the host e.g. to run Rviz and other GUI tools
|
||||||
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/${localWorkspaceFolderBasename},type=bind",
|
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/${localWorkspaceFolderBasename},type=bind",
|
||||||
"workspaceFolder": "/home/ubuntu/${localWorkspaceFolderBasename}",
|
"workspaceFolder": "/home/ubuntu/${localWorkspaceFolderBasename}",
|
||||||
"remoteEnv": {
|
"remoteEnv": {
|
||||||
@@ -27,8 +28,8 @@
|
|||||||
},
|
},
|
||||||
// Uncomment to persist bash history between sessions
|
// Uncomment to persist bash history between sessions
|
||||||
{
|
{
|
||||||
"source": "${localEnv:HOME}${localEnv:USERPROFILE}/.bash_history",
|
"source": "${localEnv:HOME}/.bash_history",
|
||||||
"target": "/root/.bash_history",
|
"target": "/home/ubuntu/.bash_history",
|
||||||
"type": "bind"
|
"type": "bind"
|
||||||
},
|
},
|
||||||
// add dri3
|
// add dri3
|
||||||
@@ -55,5 +56,5 @@
|
|||||||
},
|
},
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/common-utils:2": {}
|
"ghcr.io/devcontainers/features/common-utils:2": {}
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user