diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 000000000..8945893df --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,15 @@ +# How to use Dev container + +- Install Docker and the 'Devcontainer' extension in VSCode + +- Clone the repository and open the folder in VSCode + +- Use `Ctrl/Cmd + Shift + P` to open the command palette + +- Select 'Dev containers: Rebuild and Reopen in Container' Option + +- Wait for the container to finish setting up + +- Type this command into the terminal `roslaunch pycram ik_and_description.launch` to start roscore + + - Note: Bullet world needs a display to be connected; the render mode needs to be set to direct when running on GitHub codespaces or on WindowOS; Otherwise, the kernel will crash diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..b5c5b59a6 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,23 @@ +{ + "name": "PyCRAM vscode devcontainer", + "image": "pycram/pycram:dev", + "features": { + "ghcr.io/devcontainers/features/git:1": {}, + "ghcr.io/devcontainers/features/sshd:1": {} + }, + "postStartCommand": { + "pip": "pip3 install ipykernel pyjpt", + "git": "git config --global --add safe.directory '*'", + "source setup": "./.devcontainer/script.sh" + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance", + "ms-toolsai.jupyter", + "esbenp.prettier-vscode" + ] + } + } +} diff --git a/.devcontainer/script.sh b/.devcontainer/script.sh new file mode 100644 index 000000000..d45f309ac --- /dev/null +++ b/.devcontainer/script.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +source /opt/ros/overlay_ws/devel/setup.bash + +exec "$@" \ No newline at end of file