Git Product home page Git Product logo

youbot_devcontainer's Introduction

youBot devcontainer

A simple Docker container for building projects for KUKA youBot.

The Docker image tonykolomeytsev/youbot:devcontainer already has all the necessary dependencies for building projects for KUKA youBot, including the YouBotDriver library.

The image based on Ubuntu-20.04 and uses my own a bit modified fork of the youbot/youbot_driver sources. This image has no ROS support, but it is easy to implement.

What the heck is that?

You can now write scripts for the robot on any computer, with any OS. At the same time, you can enjoy hints, docs and IntelliSense.

The simplest way to use

1. Install Docker

2. Pull the youBot-ready Docker image

For each OS just run in terminal:

docker pull tonykolomeytsev/youbot:devcontainer

Btw on Windows 10/11 it is better to use PowerShell to run docker commands

3. Run Docker container and mount volumes

Most likely, you would like your projects to be stored locally on your computer and not disappear when docker is shut down. Therefore, you need to create a folder for youBot projects in a convenient place, for example:

  • For Windows: %USERPROFILE%\YouBotProjects
  • For Mac OS and Linux: ~/YouBotProjects

And then:

  • For Windows and Mac OS users:

    Run Docker Desktop and find the tonykolomeytsev/youbot image, press Run button.

    Screenshot

    Docker Desktop Images Tab

    In the dialog that appears, specify the Container name. In the Volumes section, in the Host path field, specify the path to the folder where projects for youbot will be stored. In the Container path field write /root/workspace.

    Screenshot

    Docker Desktop Images Tab

    To make sure your container is running, go to the Containers tab.

    Screenshot

    Docker Desktop Images Tab

  • For Linux users:

    Start the docker container:

    docker run --name youbot -itd -v <youbot_projects_path>:/root/workspace tonykolomeytsev/youbot:devcontainer
    

    WIth option --name specify the container name. With option -v specify the path to the folder where projects for youbot will be stored and /root/workspace for container path.

    Options -i, -t, is for... you wil read in docker run --help. Option -d to not go inside the container.

    To make sure your container is running, run in terminal:

    docker ps

4. Create your first project

Great, after all these manipulations, we have a working container with Ubuntu and installed dependencies for youBot inside.

To create a new project for youBot, which consists of template CMakeLists.txt and src/main.cpp, you need to go inside the container:

docker exec -it bash youbot

Inside the container, run the command youbot_new_project <project_name> to create a new project.

youbot_new_project laba_omr_3

Congratulations, your project is located inside the /root/workspace/omr_laba_3/ folder. All project files will also be in your ~/YouBotProjects folder.

For details run

cat /usr/local/bin/youbot_new_project

5. Open project in Visual Studio Code

Install Remote - Containers plugin in VSCode.

Then click on the green button at the bottom left in the VSCode.

Select Attach to Running Container... option.

And select the container you started earlier.

Wait for VSCode to load, then click File -> Open Folder... Select the folder with your project.

Specify the SDK for the project.

Install C++ Extension Pack and CMake Tools VSCode extensions inside the container and wait for installation.

Done.

6. Build the project and run

CMake is used to build the project. In the project tree, you should see CMakeLists.txt and main.cpp with basic initialization code.

Press F7 to build the project. Press Shift + F5 to run project without debugging. After a successful build, the ./bin folder will contain an executable file.

How to reuse

Once you're done with the project, just close VSCode and stop the container in docker (either via the terminal or via Docker Desktop).

Don't delete the container. When you want to return to it, just start it again and connect to it from VSCode. You only need to configure extensions in VSCode for each container once.

Limitations

Docker containers require a lot of RAM :(

Project status

The project is in progress and is being developed just for fun. Additional features will be added in the future.

youbot_devcontainer's People

Contributors

tonykolomeytsev avatar

Watchers

 avatar

Forkers

asaniart

youbot_devcontainer's Issues

How to integrate with ROS

I saw in your readme that it is possible to integrate the docker environment with ROS. How would I go about this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.