kimushun1101 / turtlebot3_ws_foxy

Docker container for turtlebot3 simulator on VS code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VSCode ROS2 Workspace Template

This template will get you set up using ROS2 with VSCode as your IDE.

See how I develop with vscode and ros2 for a more in-depth look on how to use this workspace.

Features

Style

ROS2-approved formatters are included in the IDE.

  • c++ uncrustify; config from ament_uncrustify
  • python autopep8; vscode settings consistent with the style guide

Tasks

There are many pre-defined tasks, see .vscode/tasks.json for a complete listing. Feel free to adjust them to suit your needs.

Take a look at how I develop using tasks for an idea on how I use tasks in my development.

Debugging

This template sets up debugging for python files and gdb for cpp programs. See .vscode/launch.json for configuration details.

Continuous Integration

The template also comes with basic continuous integration set up. See .github/workflows/ros.yaml.

To remove a linter just delete it's name from this line:

      matrix:
          linter: [cppcheck, cpplint, uncrustify, lint_cmake, xmllint, flake8, pep257]

How to use this

Prerequisites

You should already have Docker and VSCode with the remote containers plugin installed on your system.

Open it in vscode

Now that you've cloned your repo onto your computer, you can open it in VSCode (File->Open Folder).

When you open it for the first time, you should see a little popup that asks you if you would like to open it in a container. Say yes!

template_vscode

If you don't see the pop-up, click on the little green square in the bottom left corner, which should bring up the container dialog

template_vscode_bottom

In the dialog, select "Remote Containers: Reopen in container"

VSCode will build the dockerfile inside of .devcontainer for you. If you open a terminal inside VSCode (Terminal->New Terminal), you should see that your username has been changed to ros, and the bottom left green corner should say "Dev Container"

template_container

Update the template with your code

  1. Specify the repositories you want to include in your workspace in src/ros2.repos or delete src/ros2.repos and develop directly within the workspace.
    1. If you are using a ros2.repos file, import the contents Terminal->Run Task..->import from workspace file
  2. Install dependencies Terminal->Run Task..->install dependencies
  3. Develop!

Sample source codes and environment

Turtlebot3

See TurtleBot3 - ROBOTIS e-Manual. TurtleBot is a ROS standard platform robot. turtlebot3_ws can import turtlebot3 simulation source codes by using vcs.

In addition, Turtlebot3 scripts are prepared in scripts. Those shell scripts are copied on Desktop in VNC environment.

VNC environment

See docker_ros-desktop-vnc. The Docker image provides HTML5 VNC interface to access Ubuntu LXDE + ROS.

About

Docker container for turtlebot3 simulator on VS code

License:Apache License 2.0


Languages

Language:Shell 66.3%Language:Dockerfile 33.7%