Welcome to ROSMASTER X3 Plus repository
4. Multi-machine communication configuration
4.Multi-machine communication configuration
Note: You must know the robot's IP before logging in remotely, which can be displayed through an external monitor or OLED.
For example, the following figure: Username [jetson], hostname [yahboom].

4.1. Configuration
Require:
- All masters are on the same network
- Choose one as the master, and all others are slaves
- Install ssh and chrony packages on each device for synchronization
sudo apt-get install chrony openssh-server
For example: jetson nano is the host, the virtual machine is the slave, and the IP of jetson nano is known.
Next just modify the .bashrc file of the slave machine (virtual machine).
xxxxxxxxxxsudo vim ~/.bashrc
Add at the bottom, the [IP] here refers to the IP of [jetson nano].
xxxxxxxxxxexport ROS_MASTER_URI=http://IP:11311
After setting the IP, it is best to refresh the environment variables.
xxxxxxxxxxsource ~/.bashrc
Modify the /etc/hosts file,
xxxxxxxxxxsudo vim /etc/hosts
Add another machine’s IP and name

After modification, save and exit. Both ends of the virtual machine and the car need to be set as above.
4.2. Effect demonstration
Note: ROS Master must be started on the host.
Use ssh to remotely log in to the jetson nano and start rosmaster
xxxxxxxxxxroscore
ubuntu(virtual machine)
xxxxxxxxxxrosrun turtlesim turtlesim_noderosrun turtlesim turtle_teleop_key
