1.3.2. Visual Studio Code as standardized IDE¶
As already described we use Visual Studio Code as Standardized IDE. It is assumed that you already have a running docker container (see Our Docker Environment Explained)
1.3.2.1. Installation¶
Enther the VSCode download website and download the correct installer for your system and install VSCode.
1.3.2.2. Configuration¶
Install useful Visual Studio Code Extensions by executing on the host system:
./utils/vscode/vscode-extension-install.sh
.\utils\vscode\vscode-extension-install.bat
Edit your workspace settings. Press
Strg + Shift + P
and chooseOpen Workspace Settings (JSON)
entryThis is a recommended settings set:
{ "editor.rulers": [120], "workbench.colorCustomizations": { "editorRuler.foreground": "#ff01b3", "tree.indentGuidesStroke": "#01fff2" }, "workbench.tree.indent": 20, }
1.3.2.3. Connect to an AS ROS container with VSCode¶
You atleast have to install VSCode with the
Dev Containers
Extension. It is recommended and assumed that you setup the VSCode as desribed above.Click on the
Remote
Extension (Display with><
in a small circle) in the sidebar and chooseContainers
in theREMOTE EXPLORER
dropdown at the top.Attach to the respective, wanted container in the current or in a new windows.
This may take a while, since an VSCode server has to be installed inside the container. Wait for this to complete before you continue
Install useful, recommended and required VSCode Extensions by executing in the docker container:
/workspace/as_ros/docs/source/getting_started/dev_environment/vscode/vscode-extension-install.sh
If this is not working, open the Extensions sidebar (Icon with four squares). Install all locally installed extension inside the container: Click on the cloud icon with the arrow directed downwards.
Also search for
lextudio.restructuredtext
andtrond-snekvik.simple-rst
install them.Open
/workspace/as_ros/
as folder.Edit your workspace settings. Press
Strg + Shift + P
and chooseOpen Workspace Settings (JSON)
entryThis is a recommended settings set:
{ "esbonio.sphinx.buildDir": "/workspace/as_ros/docs/build/", "esbonio.sphinx.confDir": "/workspace/as_ros/docs/source/", "esbonio.sphinx.srcDir": "/workspace/as_ros/docs/source/", "esbonio.server.showOutputOnError": true, "restructuredtext.linter.doc8.extraArgs": [ "--config", "${workspaceFolder}/docs/source/doc8.ini" ], "ros.rosSetupScript": "/workspace/as_ros/devel/setup.bash", "editor.rulers": [120], "workbench.colorCustomizations": { "editorRuler.foreground": "#ff01b3", "tree.indentGuidesStroke": "#01fff2" }, "workbench.tree.indent": 20, "pythonIndent.trimLinesWithOnlyWhitespace": true, "pythonIndent.keepHangingBracketOnLine": true, "autoDocstring.docstringFormat": "numpy", "autoDocstring.startOnNewLine": true, "autoDocstring.includeExtendedSummary": true, "python.autoComplete.extraPaths": [ "/workspace/as_ros/devel/lib/python3/dist-packages", "/opt/ros/noetic/lib/python3/dist-packages", "/workspace/as_ros/src/control/forces_pro_client" ], "python.analysis.extraPaths": [ "/workspace/as_ros/devel/lib/python3/dist-packages", "/opt/ros/noetic/lib/python3/dist-packages", "/workspace/as_ros/src/control/forces_pro_client" ], "python.linting.flake8Enabled": true, "python.linting.enabled": true, "python.linting.flake8Args": [ "--max-line-length=120", "--ignore=ANN101,W503", "--suppress-none-returning", ], }
You are ready to go.