4、Multi-machine communication

Note: You must know the IP of the robot before remote login. You can view the current IP address of the robot through an external display or OLED

image-20210831153847961

4.1、Login remotely

4.1.1、SSH

Note: The system graphical interface cannot be displayed in this way.

image-20210831153233068

Input IP address, then click【open】;

image-20210831153404970

For Yahoom image, user name is pi password is yahboom

image-20210831153659713

1)Input following command in terminal

2)Then, input yes

3)Next, input yahboom

4.1.2、jupyter lab

Note: The system graphical interface cannot be displayed in this way.

image-20210831155338023

Input following URL on browser, pree 【Enter】

Then, input password yahboom

Click【Log in】

After login, you can see following interface.

image-20210831155726327

You can enter these folder, and modify content in file, click 【Terminal】 to enter command terminal.

4.1.3、VNC

Note: The system graphical interface can be displayed in this way.

Login steps, as shown below.

image-20210831160237630

 

image-20210831160306757

4.2、ROS multi-machine communication

4.2.1、Universal version

All ros masters are under the same network; if multiple devices have similar processes, choose one as the master, and the others are all slaves; the following two devices are taken as an example.

Install the ssh server on two devices; install the chrony package for synchronization:

Input following command to view the IP information and host name of the two devices:

image-20211117152757574

修改/etc文件夹下的hosts文件:

将两台设备的IP和主机名分别添加到两台设备的hosts文件下,绑定用户;前面的IP,后面的是名字,尽量对齐 ;

image-20211117150406215

 

image-20211117145100644

 

After the modification, enter the following commands on both devices to restart the following network to realize the communication between the two devices::

After installation, input following command confirm whether the server has been started:

image-20211117152041629

image-20211117152628972

Input following command to check if the communication is normal:

image-20211117150644167

image-20211117145946398

Add following content to ~/.bashrc file of master

Add following content to ~/.bashrc file of slave

For example, jetson nano as a master

image-20211117151459093

image-20211117151303471

After setting the IP, we need to refresh it, and then we can communicate.

Note: we need to start up ROS Master on ROS Master

ubuntu(virtual machine VM_Transbot)

Raspberry Pi (Transbot)

4.2.2、Smiple version

If jetson nano is the host and the IP address is known, you only need to modify the .bashrc file of the slave.

Add following content file at the bottom.

The effect is the same as [4.2.1]

4.3、Webpage real-time monitoring

Environment setup

Ensure that the USB camera be insert correctly, input following command to check if the USB device exists ( it is video0)

image-20210831182032895

If the system prompts that the execution authority is not enough, you need to input the following command to add the execution authority.

Modify usb_cam-test.launch file

 

change

Open terminal, input following command to start it.

View pictures