ROS分布式节点配置

一、从机设置

1、hosts设置

运行下列命令

sudo gedit /etc/hosts

 添加下列命令

192.168.1.70	nvidia-desktop #主机ip和机器名


2、.bashrc中添加

export ROS_MASTER_URI=http://192.168.1.70:11311   #192.168.1.70是主机ip
export ROS_HOSTNAME=192.168.1.33	#192.168.1.33 是从机ip

二、主机设置

1、hosts设置

类似从机的设置,在hosts文件里添加从机的ip 和机器名

2、.bashrc中添加

export ROS_MASTER_URI=http://192.168.1.70:11311   #192.168.1.70是主机ip
export ROS_HOSTNAME=192.168.1.70	#192.168.1.70 是主机ip

 

注意:

上述环境变量要设置在

source  /opt/ros/xxx/setup.bash之前

posted @ 2021-04-30 09:53  chenjian688  阅读(257)  评论(0编辑  收藏  举报