-
Notifications
You must be signed in to change notification settings - Fork 0
VSCode IDE Setup
After setting your Linux environment with Docker, your only way to write code is through basic text editors from your local machine or terminal editors through the Docker container. If you want a more modern setup with code auto-completion, syntax highlighting, and built in documentation, continue reading.
First step is to download VSCode here. VSCode is a modern, open source development environment created by Microsoft and has a ton of extra plugins, managed through the built in extension store.
Open VSCode. On the left bar, click the extensions icon (or press Ctr+Shift+X). This will bring up the extension manager. Now, search for and install these extensions:
- Remote - Containers
- Python
- C/C++
The key extension here is the first one, which allows VSCode to connect into the docker container from the host machine and understand code context from within the container (where ROS is installed).
After installing the extensions, restart VSCode and startup the DEV docker container. Now click on the button in the bottom left with the two chevrons and select "Attach to Running Container." You should be able to select the running dev container. Now, VSCode is loaded in the container and all files in the container will show up.
Open the /opt/ros/dev_ws
and code ROS packages with auto-completion!