First you need to know:
- Raspberry Pi IP address
- PC IP address
Raspberry Pi as the host
- Open the bashrc file in the root directory (there must be content inside, if it is not opened correctly)
sudo vim ~/.bashrc
- Add content inside:
export ROS_MASTER_URI=http://主机IP:11311
export ROS_IP=树莓派IP
The two addresses of the host are the IP addresses of the Raspberry Pi, just replace them
PC is the slave
- Open the bashrc file in the root directory (there must be content inside, if it is not opened correctly)
sudo vim ~/.bashrc
- Add content inside:
export ROS_MASTER_URI=http://主机IP:11311
export ROS_IP=PC端IP
Here the host address is the IP address of the Raspberry Pi