Turbot3小车学习之路——网络设置

1 时间同步设置

  • 设置时区为东八区
    在这里插入图片描述
  • 时间同步
sudo apt-get install chrony ntpdate
  • turbot3和PC分别安装ntpdate
sudo apt-get install ntpdate
  • turbot3和PC分别同步时间
sudo ntpdate ntp.ubuntu.com
  • 检测时间是否同步
date

在这里插入图片描述

2 网络设置

  • 获得本机ip
ifconfig
  • 修改.bashrc
gedit ~/.bashrc
  • turbot3配置如下:
export ROS_MASTER_URI=http://IP_OF_PC:11311
export ROS_HOSTNAME=IP_OF_TURTLEBOT
export TURTLEBOT3_MODEL=waffle
export TURTLEBOT3_3D_SENSOR=kinect
export TURTLEBOT3_LASER_SENSOR=rplidar
  • PC配置如下(ROS_MASTER 运行在远程PC上):
export ROS_MASTER_URI=http://IP_OF_PC:11311
export ROS_HOSTNAME=IP_OF_PC
export TURTLEBOT3_MODEL=waffle
  • 让环境生效:
source ~/.bashrc

猜你喜欢

转载自blog.csdn.net/u014779536/article/details/103244984