generated from athackst/vscode_ros2_workspace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f0dc7c1
Showing
21 changed files
with
951 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM althack/ros2:humble-dev | ||
|
||
# ** [Optional] Uncomment this section to install additional packages. ** | ||
# | ||
# ENV DEBIAN_FRONTEND=noninteractive | ||
# RUN apt-get update \ | ||
# && apt-get -y install --no-install-recommends <your-package-list-here> \ | ||
# # | ||
# # Clean up | ||
# && apt-get autoremove -y \ | ||
# && apt-get clean -y \ | ||
# && rm -rf /var/lib/apt/lists/* | ||
# ENV DEBIAN_FRONTEND=dialog | ||
|
||
# Set up auto-source of workspace for ros user | ||
ARG WORKSPACE | ||
RUN echo "if [ -f ${WORKSPACE}/install/setup.bash ]; then source ${WORKSPACE}/install/setup.bash; fi" >> /home/ros/.bashrc |
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,46 @@ | ||
// See https://aka.ms/vscode-remote/devcontainer.json for format details. | ||
{ | ||
"dockerFile": "Dockerfile", | ||
"build": { | ||
"args": { | ||
"WORKSPACE": "${containerWorkspaceFolder}" | ||
} | ||
}, | ||
"remoteUser": "ros", | ||
"runArgs": [ | ||
"--network=host", | ||
"--cap-add=SYS_PTRACE", | ||
"--security-opt=seccomp:unconfined", | ||
"--security-opt=apparmor:unconfined", | ||
"--volume=/tmp/.X11-unix:/tmp/.X11-unix", | ||
"--volume=/mnt/wslg:/mnt/wslg", | ||
"--ipc=host" | ||
], | ||
"containerEnv": { | ||
"DISPLAY": "${localEnv:DISPLAY}", // Needed for GUI try ":0" for windows | ||
"WAYLAND_DISPLAY": "${localEnv:WAYLAND_DISPLAY}", | ||
"XDG_RUNTIME_DIR": "${localEnv:XDG_RUNTIME_DIR}", | ||
"PULSE_SERVER": "${localEnv:PULSE_SERVER}", | ||
"LIBGL_ALWAYS_SOFTWARE": "1" // Needed for software rendering of opengl | ||
}, | ||
// Set *default* container specific settings.json values on container create. | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"althack.ament-task-provider", | ||
"betwo.b2-catkin-tools", | ||
"DotJoshJohnson.xml", | ||
"ms-azuretools.vscode-docker", | ||
"ms-iot.vscode-ros", | ||
"ms-python.python", | ||
"ms-vscode.cpptools", | ||
"redhat.vscode-yaml", | ||
"smilerobotics.urdf", | ||
"streetsidesoftware.code-spell-checker", | ||
"twxs.cmake", | ||
"yzhang.markdown-all-in-one", | ||
"zachflower.uncrustify" | ||
] | ||
} | ||
} | ||
} |
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 @@ | ||
PYTHONPATH=src:install/lib/python3.10/site-packages |
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,6 @@ | ||
name: 'Lint' | ||
description: 'Lint using devcontainer' | ||
runs: | ||
using: 'docker' | ||
image: '../../../.devcontainer/Dockerfile' | ||
entrypoint: ".github/actions/lint/run.sh" |
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,5 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
./setup.sh | ||
ament_${LINTER} src/ |
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,6 @@ | ||
name: 'Test' | ||
description: 'Test using devcontainer' | ||
runs: | ||
using: 'docker' | ||
image: '../../../.devcontainer/Dockerfile' | ||
entrypoint: ".github/actions/test/run.sh" |
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,6 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
./setup.sh | ||
./build.sh | ||
./test.sh |
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,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 |
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,17 @@ | ||
name: docs | ||
|
||
on: | ||
release: | ||
push: | ||
tags: | ||
- 'v*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Build and push docs | ||
uses: athackst/[email protected] |
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,35 @@ | ||
name: ROS | ||
|
||
on: | ||
pull_request: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout code | ||
uses: actions/checkout@v3 | ||
- | ||
name: Test | ||
uses: ./.github/actions/test/ | ||
|
||
lint: | ||
name: ament_${{ matrix.linter }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
linter: [cppcheck, cpplint, uncrustify, lint_cmake, xmllint, flake8, pep257] | ||
steps: | ||
- | ||
name: Checkout code | ||
uses: actions/checkout@v3 | ||
- | ||
name: Run linter | ||
uses: ./.github/actions/lint/ | ||
env: | ||
LINTER: ${{ matrix.linter }} |
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,4 @@ | ||
build/* | ||
install/* | ||
log/* | ||
site/* |
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,18 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Linux", | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"/opt/ros/humble/include/**" | ||
], | ||
"defines": [], | ||
"compilerPath": "/usr/bin/gcc", | ||
"compileCommands": "${workspaceFolder}/build/compile_commands.json", | ||
"cStandard": "c99", | ||
"cppStandard": "c++14", | ||
"intelliSenseMode": "linux-gcc-x64" | ||
} | ||
], | ||
"version": 4 | ||
} |
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,90 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
// Example launch of a python file | ||
{ | ||
"name": "Python: Current File", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${file}", | ||
"console": "integratedTerminal", | ||
}, | ||
// Example gdb launch of a ros executable | ||
{ | ||
"name": "(gdb) Launch (merge-install)", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/install/lib/${input:package}/${input:program}", | ||
"args": [], | ||
"preLaunchTask": "build", | ||
"stopAtEntry": true, | ||
"cwd": "${workspaceFolder}", | ||
"externalConsole": false, | ||
"MIMode": "gdb", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "(gdb) Launch (isolated-install)", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/install/${input:package}/lib/${input:package}/${input:program}", | ||
"args": [], | ||
"preLaunchTask": "build", | ||
"stopAtEntry": true, | ||
"cwd": "${workspaceFolder}", | ||
"externalConsole": false, | ||
"MIMode": "gdb", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
] | ||
}, | ||
//Example of a ROS Launch file | ||
{ | ||
"name": "ROS: Launch File (merge-install)", | ||
"type": "ros", | ||
"request": "launch", | ||
"preLaunchTask": "build", | ||
"target": "${workspaceFolder}/install/share/${input:package}/launch/${input:ros_launch}", | ||
}, | ||
{ | ||
"name": "ROS: Launch File (isolated-install)", | ||
"type": "ros", | ||
"request": "launch", | ||
"preLaunchTask": "build", | ||
"target": "${workspaceFolder}/install/${input:package}/share/${input:package}/launch/${input:ros_launch}", | ||
}, | ||
], | ||
"inputs": [ | ||
{ | ||
"id": "package", | ||
"type": "promptString", | ||
"description": "Package name", | ||
"default": "examples_rclcpp_minimal_publisher" | ||
}, | ||
{ | ||
"id": "program", | ||
"type": "promptString", | ||
"description": "Program name", | ||
"default": "publisher_member_function" | ||
}, | ||
{ | ||
"id": "ros_launch", | ||
"type": "promptString", | ||
"description": "ROS launch name", | ||
"default": "file_name_launch.py" | ||
} | ||
] | ||
} |
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,74 @@ | ||
{ | ||
"editor.tabSize": 8, | ||
"editor.rulers": [ | ||
100 | ||
], | ||
"files.associations": { | ||
"*.repos": "yaml", | ||
"*.world": "xml", | ||
"*.xacro": "xml" | ||
}, | ||
"python.analysis.extraPaths": [ | ||
"/opt/ros/humble/lib/python3.10/site-packages/" | ||
], | ||
// Autocomplete from ros python packages | ||
"python.autoComplete.extraPaths": [ | ||
"/opt/ros/humble/lib/python3.10/site-packages/" | ||
], | ||
// Environment file lets vscode find python files within workspace | ||
"python.envFile": "${workspaceFolder}/.env", | ||
// Use the system installed version of autopep8 | ||
"python.formatting.autopep8Path": "/usr/bin/autopep8", | ||
"python.formatting.autopep8Args": [ | ||
"--max-line-length=100" | ||
], | ||
"C_Cpp.default.intelliSenseMode": "linux-gcc-x86", | ||
"C_Cpp.formatting": "disabled", | ||
"uncrustify.configPath.linux": "/opt/ros/humble/lib/python3.10/site-packages/ament_uncrustify/configuration/ament_code_style.cfg", | ||
"[cpp]": { | ||
"editor.defaultFormatter": "zachflower.uncrustify" | ||
}, | ||
"search.exclude": { | ||
"**/node_modules": true, | ||
"**/bower_components": true, | ||
"**/*.code-search": true, | ||
"**/build": true, | ||
"**/install": true, | ||
"**/log": true | ||
}, | ||
"cSpell.words": [ | ||
"RTPS", | ||
"athackst", | ||
"autopep", | ||
"cmake", | ||
"cppcheck", | ||
"cpplint", | ||
"DCMAKE", | ||
"deque", | ||
"devcontainer", | ||
"ints", | ||
"noqa", | ||
"pytest", | ||
"rclcpp", | ||
"rclpy", | ||
"repos", | ||
"rosdep", | ||
"rosdistro", | ||
"rosidl", | ||
"RTPS", | ||
"uncrustify", | ||
"Wextra", | ||
"Wpedantic", | ||
"xmllint" | ||
], | ||
"cSpell.allowCompoundWords": true, | ||
"cSpell.ignorePaths": [ | ||
"**/package-lock.json", | ||
"**/node_modules/**", | ||
"**/vscode-extension/**", | ||
"**/.git/objects/**", | ||
".vscode", | ||
".vscode-insiders", | ||
".devcontainer/devcontainer.json" | ||
] | ||
} |
Oops, something went wrong.