yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
AI Vision USB Camera📖
01.Basic course
  • 1.Camera parameters
  • 2.Camera detect
  • 3.Camera preview screen
02.Docker
  • 1.Docker overview and docker installation
  • 2.Common commands for docker image containers
  • 3.Docker images deeply understand and publish images
  • 4.Docker hardware interaction and data processing
  • 5.Enter the bot's docker container
  • 6.Robot development environment construction in Docker
  • 7.How customers can update docker images in the future
03.ROS vision course
  • 0.Camera preview screen
  • 1.QR code
  • 2.Human pose estimation
  • 3.Target Detection
  • 4.AR vision
  • 5.ROS+Opencv basics
  • 6.Face recognition
  • 7.harris corner detection
  • 8.Target tracking algorithm
  • 9.Contour moment
  • 10.Polygon outline
  • 11.Discrete fourier transform algorithm
  • 12.Edge detection algorithm
  • 13.Face detection algorithm
  • 14.Optical flow detection algorithm
  • 15.Contour detection
  • 16.General contour detection
  • 17.Feature point tracking
  • 18.HLS color filtering
  • 19.Hough circle detection
  • 20.Hough linear detection
  • 21.HSV color filtering
  • 22.LK optical flow algorithm
  • 23.Detection algorithm
  • 24.Phase dependent displacement detection
  • 25.Image pyramid sampling algorithm
  • 26.RGB color filtering
  • 27.Clear background detection algorithm
  • 28.Simplified optical flow algorithm
  • 29.Simple filter
  • 30.Threshold image processing
  • 31.Watershed segmentation algorithm
04.Mediapipe course
  • 1.Hand detection
  • 2.Attitude detection
  • 3.Overall inspection
  • 4.Face detection
  • 5.Face recognition
  • 6.Face effects
  • 7.3D object recognition
  • 8.Brush
  • 9.Finger control
  • 10.Gesture recognition
05.Robot Vision course
  • Tracking color line
06.Camera preview and frame rate test
  • Camera preview and frame rate test
Download
  • Docker Image
  • PC_Software
Download ZIP

Welcome to AI Vision USB Camera repository

6.Robot development environment construction in Docker

6、Robot development environment construction in Docker

 

6、Robot development environment construction in Docker6.1、Using Jupyter Lab to access Docker6.2、Use vscode to access docker6.2.1、Remote configuration6.2.2、vscode configuration6.2.2.1、download and install VSCODE6.2.2.2、vscode configuration ssh remote login to the host6.2.2.3、enter the robot container6.2.2.4、Vscode remote host configuration docker environment6.2.2.5、Configure passwordless login

The operating environment and software and hardware reference configurations are as follows:

  • Reference model: ROSMASTER X3

  • Robot hardware configuration: Arm series main control, Silan A1 lidar, AstraPro Plus depth camera

  • Robot system: Ubuntu (version not required) + docker (version 20.10.21 and above)

  • PC Virtual Machine: Ubuntu (20.04) + ROS2 (Foxy)

  • Usage scenario: Use on a relatively clean 2D plane

6.1、Using Jupyter Lab to access Docker

  1. Enter the container, see [5. Enter the docker container of the robot], and execute the following command:

Note: When using Jupyter Lab in a docker container, you must run the docker container as host: add the "--net=host" parameter when running the container

root@ubuntu:/# jupyter lab --allow-root
[I 2023-04-24 09:27:45.265 ServerApp] Package jupyterlab took 0.0001s to import
[I 2023-04-24 09:27:45.277 ServerApp] Package jupyter_server_fileid took 0.0096s to import
[I 2023-04-24 09:27:45.297 ServerApp] Package jupyter_server_terminals took 0.0190s to import
[I 2023-04-24 09:27:45.429 ServerApp] Package jupyter_server_ydoc took 0.1301s to import
[I 2023-04-24 09:27:45.431 ServerApp] Package nbclassic took 0.0001s to import
..................
  1. Other devices view, open in Windows or Ubuntu browser (must be under the same LAN, 192.168.2.102 is the IP address in the docker container)

xxxxxxxxxx
http://192.168.2.102:8888/lab
Enter the password: Yahboom            enter Jupyter Lab

image-20230424173324001

The following directory is the project path of the bot:

image-20230425101243048

6.2、Use vscode to access docker

Let's take the example of configuring VSCODE to access the Docker container in Windows, and the steps to access Docker in Ubuntu are basically the same.

6.2.1、Remote configuration

See [VI. Linux Operating System---- 3. Remote Control] chapter

Make sure Windows can telnet to the Docker host [car]:

​x
Open cmd in windows enter ssh command test: ssh jetson@192.168.2.102 (username and ip modified to own)

Or use remote tools: putty, xshell, securecrt, winscp, mobaxterm, finalshell, etc

6.2.2、vscode configuration

6.2.2.1、download and install VSCODE

VSCODE official website: https://code.visualstudio.com/, download the installation of the Windows version

6.2.2.2、vscode configuration ssh remote login to the host

  1. Open vscode, click the icon of the arrow at the bottom left, then enter remote in the search box, select the Remote Development plugin, and click Install to install the plugin

image-20230424183009372

vscode is installed by default and then in English, and you can install Chinese plugins to localize:

image-20230424182205246

  1. Press the shortcut key [Ctrl + Shift + P] in VSCODE to open the command input window, type: remote, and then log in to the remote host [car] according to the instructions shown below.

image-20230425091020733

image-20230425091230849

image-20230425091248247

image-20230425091304318

image-20230425091323608

image-20230425091358042

image-20230425091415820

How to see the screen shown above, indicating that you have successfully logged in to the host computer.

6.2.2.3、enter the robot container

See the tutorial in the [5. Enter the docker container of the robot] chapter.

6.2.2.4、Vscode remote host configuration docker environment

  1. Install the docker plug-in on the remote host [car].image-20230425091515978

  2. After the installation is completed, a docker icon will appear in the left navigation bar

image-20230425091532747

  1. Click the docker icon

image-20230425093400792

  1. Right-click the running container and operate as shown below:

image-20230425093448428

image-20230425093609630

  1. A new window will open and see the following indicates that it has entered the container

image-20230425093643476

  1. Open the folder

xxxxxxxxxx
/root/yahboomcar_ros2_ws  # This is the project path for the bot

image-20230425093748086

image-20230425093730162

image-20230425093808074

image-20230425093900096

  1. Similarly, we can also install the plug-ins we need in the container to facilitate our development

image-20230425102200355

In addition to ROS, the recommended plugins to install here are:

img

After completing the above steps, you can manipulate the code files in the container to develop and learn.

6.2.2.5、Configure passwordless login

In the above steps, some steps may require entering the password of the host, here is another optimization, configure passwordless login.

  1. First test using SSH to log in to the host [car] in Windows, the instructions are as follows:

xxxxxxxxxx
ssh jetson@192.168.2.102 (username and IP modified to own)

At this time, you will find that you need to enter the host password

  1. Next, configure password-free login

(1) Add environment variables

Open the environment variable properties page, click New in the user variables section, the variable is HOME, the value is C:Usersname, where name is the user name, you can view the user name of your own computer, and then the generated key pair is saved in this directory by default. 在这里插入图片描述

(2) Generate a key pair

Open the cmd command line, run it in the directory where the ssh program is located, or run [ssh-keygen -t rsa] anywhere after adding the system environment to generate the key, and then enter all the way, when you see a histogram generated, then the key is generated successfully. At this time, there will be two more files under the .ssh folder of the user directory, namely id_rsa (private key) and id_rsa.pub (public key)

img

(3) Add the public key to the host

Similarly, open the cmd command line, enter

xxxxxxxxxx
ssh username@host "cat >> ~/.ssh/authorized_keys" < C:Usersname.sshid_rsa.pub 
#For example: Modify ssh jetson@192.168.2.102 "cat >> ~/.ssh/authorized_keys" < C:UsersAdmin.sshid_rsa.pub  

This command first logs in to the host, and then adds the public key under the local computer, i.e. win, to the personal directory of the host account to achieve password-free login. Note that this step requires the password of the host account.

(4) Verification

Test again using ssh in Windows to log in to the host [trolley], the command is as follows:

xxxxxxxxxx
ssh jetson@192.168.2.102 (username and IP modified to own)

At this time, you will find that you no longer need to enter the password.

Restart VSCODE, and where you need to enter a password, you don't need to enter a password.

Enter the bot's docker container
How customers can update docker images in the future

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文