Compare commits

..

2 Commits

Author SHA1 Message Date
81e765d1ac Update README.md 2025-10-01 19:55:17 +02:00
f62c8db559 add initializecommand 2025-09-16 11:46:23 +02:00
2 changed files with 2 additions and 2 deletions

View File

@@ -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.
- **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.
- **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
@@ -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:
```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".

View File

@@ -12,6 +12,7 @@
// "--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
],
"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",
"workspaceFolder": "/home/ubuntu/${localWorkspaceFolderBasename}",
"remoteEnv": {