ROS_MASTER_URI和ROS_IP的设置

首先确保主机与从机连接于同一个wifi

主机ip:192.168.1.9
从机ip:192.168.1.7

主机的~/.bashrc文件加入:

export ROS_MASTER_URI=http://192.168.1.9:11311
export ROS_IP=192.168.1.9

二者均为主机的ip

从机的~/.bashrc文件加入:

export ROS_MASTER_URI=http://192.168.1.9:11311
export ROS_IP=192.168.1.7

后者为从机的ip

参考:https://blog.csdn.net/weixin_45664449/article/details/103578210?utm_medium=distribute.pc_relevant.none-task-blog-baidulandingword-2&spm=1001.2101.3001.4242

你可能感兴趣的:(ROS学习)