7.4 Multi-machine communication

7.4.1 ROS multi-machine communication

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-20211027105549219

Modify the hosts file in the /etc folder:

Add the IP and host names of the two devices to the hosts file of the two devices to bind users; the IP in the front and the name in the back.

image-20211027105943298

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:

Input following command to check if the communication is normal:

image-20211027110323384

Modify~/.bashrc file

Add following content to ~/.bashrc file of master

Add following content to ~/.bashrc file of slave

For example, jetson nano as a master

image-20211027110542002

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

Phenomenon show

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

jetbotmini side

ubuntu (virtual machine)

image-20211027112007456

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.

7.4.2 Webpage real-time monitoring

Environment setup

Note: if the jetbotmini factory image is burned, this part of the configuration can be skipped because the required software has been configured in the jetbotmini factory image.

Transfer the jetbotmini course source code to the jetbotmini file system /home/Jetson directory through "WinSCP" or other file transfer tools.

Path of package : [JetBot-Mini-Robot-Car] --> [13.Code] --> [workspace]

Check if it is successful

image-20211027114151158

Build jetson-inference

Install the necessary environment

Run

Open terminal, input following command to start it.

View pictures

file path:/home/jetson/workspace/catkin_ws/src/jetbot_ros/launch/sci-cam-test.launch