Skip to content
Snippets Groups Projects
Commit 3afe905e authored by Malte Matthey's avatar Malte Matthey
Browse files

Update Docker container setup for Learn Environment integration

parent 0ceec6c9
No related branches found
No related tags found
No related merge requests found
......@@ -33,9 +33,8 @@
"ms-iot.vscode-ros",
"ms-vscode.cmake-tools",
"ms-python.python",
// remove VS Code plugin to not show cell tags in editor
"-ms-toolsai.vscode-jupyter-cell-tags"
"-ms-toolsai.vscode-jupyter-cell-tags",
"ms-azuretools.vscode-docker"
]
}
}
......
# ROS Noetic Standard Container with Preinstalled Learn Environment Plugin
> **⚠️ WARNING:** This README is for setting up the container with all functionalities. For the Learn Environment Plugin, follow the instructions in this README first. Then, refer to [GETTING_STARTED.md](./catkin_ws/src/learn_environment/tasks/GETTING_STARTED.md) for starting the tutorial or [CONTRIBUTE.md](./catkin_ws/src/learn_environment/developer_docs/CONTRIBUTE.md) for contribution guidelines (creating new tasks & extending the plugin) in the [plugin's repository](TODO:ADD_LINK).
> **⚠️ WARNING:** This README is for setting up the container with all functionalities. For the Learn Environment Plugin, follow the instructions in this README first. Then, refer to [GETTING_STARTED.md](./catkin_ws/src/learn_environment/tasks/GETTING_STARTED.md) for starting the tutorial or [CONTRIBUTE.md](./catkin_ws/src/learn_environment/developer_docs/CONTRIBUTE.md) for contribution guidelines (creating new tasks & extending the plugin) in the [plugin's repository](https://gitlab.kit.edu/kit/aifb/BIS/lehre/seminare/programmieren_3/202425/gruppe-3/learn-environment-franka-emika-panda).
This repository provides a Visual Studio Code development container with ROS Noetic installed to control a Franka Panda Robot in both simulation and real environments. It also has the Learn Environment plugin for RViz preinstalled and is optimised so you can start learning how to work with the robot immediatly.
......@@ -27,6 +26,7 @@ When to Use Devcontainers:
- Faster build
- Display forwarding already implemented
- Easier to enable GPU support on non-NVIDIA graphic cards
- Native application windows without the need for NoVNC or other web-based desktop virtualization.
### Local Windows Installation
......@@ -34,16 +34,15 @@ When to Use Devcontainers:
<summary>Using Devcontainer</summary>
1. Install [Visual Studio Code](https://code.visualstudio.com/)
- Install the DevContainer extension (ID: ms-vscode-remote.remote-containers)
- Install the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension (ID: ms-vscode-remote.remote-containers)
2. Install [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install)
3. Install [Docker](https://docs.docker.com/desktop/install/windows-install/)
- You may need to install [docker-compose](https://docs.docker.com/compose/) with `pip install docker-compose`
4. Fork this repository.
4. Create an SSH key in your WSL environment and add it to your git.ssc.kit.edu SSH keys. [Explanation](https://docs.gitlab.kit.edu/en/getting_started/#1-ssh-connection-using-ssh-keys)
5. Clone the repository in your WSL environment:
```bash
git clone <repository-url>
git clone --recurse-submodules git@gitlab.kit.edu:kit/aifb/BIS/lehre/seminare/programmieren_3/202425/gruppe-3/containerized-setup-learn-environment-franka-emika-panda.git
```
- Create an SSH key in your WSL environment and add it to your git.ssc.kit.edu SSH keys. [Explanation](https://docs.gitlab.kit.edu/en/getting_started/#1-ssh-connection-using-ssh-keys)
6. Open the repository folder in VS Code.
7. Open the container in a Docker environment:
```bash
......@@ -57,16 +56,16 @@ When to Use Devcontainers:
<summary>Without Devcontainer</summary>
1. Install [Visual Studio Code](https://code.visualstudio.com/)
- Install the Docker extension (ID: ms-azuretools.vscode-docker)
- Install the [Docker extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) (ID: ms-azuretools.vscode-docker)
- Install the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension (ID: ms-vscode-remote.remote-containers)
2. Install [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install)
3. Install [Docker](https://docs.docker.com/desktop/install/windows-install/)
- You may need to install [docker-compose](https://docs.docker.com/compose/) with `pip install docker-compose`
4. Fork this repository.
4. Create an SSH key in your WSL environment and add it to your git.ssc.kit.edu SSH keys. [Explanation](https://docs.gitlab.kit.edu/en/getting_started/#1-ssh-connection-using-ssh-keys)
5. Clone the repository in your WSL environment:
```bash
git clone <repository-url>
git clone --recurse-submodules git@gitlab.kit.edu:kit/aifb/BIS/lehre/seminare/programmieren_3/202425/gruppe-3/containerized-setup-learn-environment-franka-emika-panda.git
```
- Create an SSH key in your WSL environment and add it to your git.ssc.kit.edu SSH keys. [Explanation](https://docs.gitlab.kit.edu/en/getting_started/#1-ssh-connection-using-ssh-keys)
6. Open the repository folder in VS Code.
7. Build the container:
```bash
......@@ -78,7 +77,7 @@ When to Use Devcontainers:
```
9. Attach VS Code to the container:
- Click on the Docker extension (left sidebar in VS Code).
- Find the running container and click on `Attach VS Code`. This opens a new VS Code window inside the container.
- Find the running container, right-click on it, and select `Attach VS Code`. This will open a new VS Code window inside the container.
10. Make the display available for the container:
- Install [VcXsrv](https://sourceforge.net/projects/vcxsrv/).
- Start the `XLaunch` Application (e.g. from Windows Start Menu)
......@@ -94,13 +93,13 @@ When to Use Devcontainers:
<summary>Using Devcontainer</summary>
1. Install [Visual Studio Code](https://code.visualstudio.com/)
- Install the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension (ID: ms-vscode-remote.remote-containers)
2. Install [Docker](https://docs.docker.com/engine/install/ubuntu/)
3. Fork this repository.
3. Create an SSH key in your WSL environment and add it to your git.ssc.kit.edu SSH keys. [Explanation](https://docs.gitlab.kit.edu/en/getting_started/#1-ssh-connection-using-ssh-keys)
4. Clone the repository in your environment:
```bash
git clone <repository-url>
git clone --recurse-submodules git@gitlab.kit.edu:kit/aifb/BIS/lehre/seminare/programmieren_3/202425/gruppe-3/containerized-setup-learn-environment-franka-emika-panda.git
```
- Create an SSH key in your environment and add it to your git.ssc.kit.edu SSH keys. [Explanation](https://docs.gitlab.kit.edu/en/getting_started/#1-ssh-connection-using-ssh-keys)
5. Open the repository folder in VS Code.
6. Open the container in a Docker environment:
```bash
......@@ -114,15 +113,15 @@ When to Use Devcontainers:
<summary>Without Devcontainer</summary>
1. Install [Visual Studio Code](https://code.visualstudio.com/)
- Install the Docker extension (ID: ms-azuretools.vscode-docker)
- Install the [Docker extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) (ID: ms-azuretools.vscode-docker)
- Install the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension (ID: ms-vscode-remote.remote-containers)
2. Install [Docker](https://docs.docker.com/engine/install/ubuntu/)
- You may need to install [docker-compose](https://docs.docker.com/compose/) with `pip install docker-compose`
3. Fork this repository.
3. Create an SSH key in your WSL environment and add it to your git.ssc.kit.edu SSH keys. [Explanation](https://docs.gitlab.kit.edu/en/getting_started/#1-ssh-connection-using-ssh-keys)
4. Clone the repository in your environment:
```bash
git clone <repository-url>
git clone --recurse-submodules git@gitlab.kit.edu:kit/aifb/BIS/lehre/seminare/programmieren_3/202425/gruppe-3/containerized-setup-learn-environment-franka-emika-panda.git
```
- Create an SSH key in your environment and add it to your git.ssc.kit.edu SSH keys. [Explanation](https://docs.gitlab.kit.edu/en/getting_started/#1-ssh-connection-using-ssh-keys)
5. Open the repository folder in VS Code.
6. Build the container:
```bash
......@@ -134,7 +133,7 @@ When to Use Devcontainers:
```
8. Attach VS Code to the container:
- Click on the Docker extension (left sidebar in VS Code).
- Find the running container and click on `Attach VS Code`. This opens a new VS Code window inside the container.
- Find the running container, right-click on it, and select `Attach VS Code`. This will open a new VS Code window inside the container.
</details>
......
# Build the Docker container using the specified Dockerfile
docker build -f "$(Join-Path $PSScriptRoot '.devcontainer/Dockerfile')" -t container-ros-noetic-moveit-panda .
\ No newline at end of file
docker build -f "$(Join-Path $PSScriptRoot '.devcontainer/Dockerfile')" -t container-ros-noetic-moveit-panda-learn-environment .
\ No newline at end of file
#!/bin/sh
cd "$(dirname "$0")"
sudo docker build -f .devcontainer/Dockerfile -t container-ros-noetic-moveit-panda .
\ No newline at end of file
sudo docker build -f .devcontainer/Dockerfile -t container-ros-noetic-moveit-panda-learn-environment .
\ No newline at end of file
Subproject commit 7bb4176bf87b147264ece401854ef371ef2a887e
Subproject commit c0810c6e217842dfa332d6c343562c5059b01310
......@@ -7,12 +7,12 @@ if (Get-WmiObject Win32_VideoController | Where-Object { $_.Name -like "*NVIDIA*
--gpus all `
--env="DISPLAY=$env:DISPLAY" `
--volume="/tmp/.X11-unix:/tmp/.X11-unix" `
container-ros-noetic-moveit-panda /bin/bash
container-ros-noetic-moveit-panda-learn-environment /bin/bash
} else {
docker run -it `
--device=/dev/dri `
--group-add video `
--env="DISPLAY=$env:DISPLAY" `
--volume="/tmp/.X11-unix:/tmp/.X11-unix" `
container-ros-noetic-moveit-panda /bin/bash
container-ros-noetic-moveit-panda-learn-environment /bin/bash
}
\ No newline at end of file
......@@ -12,12 +12,12 @@ if lspci | grep -i nvidia > /dev/null; then
--gpus all \
--env="DISPLAY=$DISPLAY" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix" \
container-ros-noetic-moveit-panda /bin/bash
container-ros-noetic-moveit-panda-learn-environment /bin/bash
else
docker run -it \
--device=/dev/dri \
--group-add video \
--env="DISPLAY=$DISPLAY" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix" \
container-ros-noetic-moveit-panda /bin/bash
container-ros-noetic-moveit-panda-learn-environment /bin/bash
fi
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment