-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create setup script for single command full dev setup (#358)
- Loading branch information
Showing
8 changed files
with
382 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
{ | ||
"name": "Bit-Bots Iron Dev", | ||
"name": "Bit-Bots Iron Dev", | ||
|
||
"build": { "dockerfile": "Dockerfile" }, | ||
"build": { "dockerfile": "Dockerfile" }, | ||
|
||
"containerEnv": { | ||
"DISPLAY": "${localEnv:DISPLAY}", | ||
"LIBGL_ALWAYS_SOFTWARE": "1", | ||
"QT_X11_NO_MITSHM": "1", | ||
"DOCKER": "1" | ||
}, | ||
"containerEnv": { | ||
"DISPLAY": "${localEnv:DISPLAY}", | ||
"LIBGL_ALWAYS_SOFTWARE": "1", | ||
"QT_X11_NO_MITSHM": "1", | ||
"DOCKER": "1" | ||
}, | ||
|
||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "zsh", | ||
"terminal.integrated.profiles.linux": { "zsh": { "path": "/bin/zsh" } } | ||
}, | ||
"extensions": [ | ||
"ms-iot.vscode-ros" | ||
] | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "zsh", | ||
"terminal.integrated.profiles.linux": { "zsh": { "path": "/bin/zsh" } } | ||
}, | ||
"extensions": ["ms-iot.vscode-ros"] | ||
} | ||
}, | ||
|
||
"workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/root/colcon_ws/src/bitbots_main", | ||
"workspaceFolder": "/root/colcon_ws/src/bitbots_main", | ||
"workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/root/colcon_ws/src/bitbots_main", | ||
"workspaceFolder": "/root/colcon_ws/src/bitbots_main", | ||
|
||
"mounts": [ | ||
"type=bind,source=${localEnv:HOME},target=/srv/host_home,consistency=cached", | ||
], | ||
"mounts": [ | ||
"type=bind,source=${localEnv:HOME},target=/srv/host_home,consistency=cached" | ||
], | ||
|
||
"runArgs": [ | ||
"--tmpfs", "/tmp:exec,mode=01777", | ||
"--privileged", | ||
"--net=host", | ||
"--device=/dev/dri:/dev/dri", | ||
"--volume=/tmp/.X11-unix:/tmp/.X11-unix", | ||
"--cap-add=SYS_PTRACE", | ||
"--security-opt", "seccomp=unconfined" | ||
], | ||
"runArgs": [ | ||
"--tmpfs", | ||
"/tmp:exec,mode=01777", | ||
"--privileged", | ||
"--net=host", | ||
"--device=/dev/dri:/dev/dri", | ||
"--volume=/tmp/.X11-unix:/tmp/.X11-unix", | ||
"--cap-add=SYS_PTRACE", | ||
"--security-opt", | ||
"seccomp=unconfined" | ||
], | ||
|
||
"postCreateCommand": "git config --global --add safe.directory '*'" | ||
} | ||
"postCreateCommand": "git config --global --add safe.directory '*'" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
set -eEo pipefail | ||
|
||
WEBOTS_VERSION="2022b" | ||
WEBOTS_DOWNLOAD_URL="https://github.com/cyberbotics/webots/releases/download/R${WEBOTS_VERSION}/webots_${WEBOTS_VERSION}_amd64.deb" | ||
|
||
check_internet_connection () { | ||
if ! ping -q -c 1 -W 1 google.com > /dev/null; then | ||
echo "No internet connection. Please check your internet connection to install the webots simulator." | ||
exit 1 | ||
fi | ||
} | ||
|
||
# Check if the correct webots simulator WEBOTS_VERSION is installed (apt) | ||
if apt list webots --installed | grep -q "$WEBOTS_VERSION"; then | ||
echo "Webots simulator release $WEBOTS_VERSION is already installed." | ||
else | ||
echo "Webots simulator release $WEBOTS_VERSION is not installed. Installing..." | ||
# Check if we have an internet connection | ||
check_internet_connection | ||
# Check if the url exist | ||
if ! curl --output /dev/null --silent --head --fail "$WEBOTS_DOWNLOAD_URL"; then | ||
echo "Webots download url does not exist. Please check the url and update the 'WEBOTS_DOWNLOAD_URL' variable in the 'make_webots.sh' script." | ||
exit 1 | ||
fi | ||
# Download the webots simulator dep package to temp folder | ||
wget --no-verbose --show-progress "$WEBOTS_DOWNLOAD_URL" -O "/tmp/webots_${WEBOTS_VERSION}.deb" | ||
# Install the webots simulator | ||
sudo apt-get install "/tmp/webots_${WEBOTS_VERSION}.deb" -y | ||
fi |
Oops, something went wrong.