下载安装配置ssh
检验是否成功可以连其他人电脑试试
ssh连接机器人
ssh eaibot@192.168.31.200
查看机器人ip
在机器人账号下
ifconfig
自己账户开终端,查看计算机名和ip地址
hostname //查看电脑 ubuntu 系统的主机名
ifconfig //查看电脑无线网卡的 ip 地址
cd /etc/hosts/ //打开电脑的/etc/hosts 文件
在打开的电脑/etc/hosts 文件末尾添加导航模块的 IP 地址和主机名,固定为:
192.168.31.200 PS3B-N1
更新bashrc文件
gedit ~/.bashrc
在打开的文件末尾添加
export ROS_MASTER_URI=http://192.168.31.200:11311
source
source ~/.bashrc
机器人账号开终端
同样的命令,把自己的ip地址加计算机名添加到机器人hosts目录
cd /etc/hosts/
sudo vim /etc/hosts //打开hosts文件
保存退出命令为:esc :wq
按理说现在应该差不多可以了
如果机器人是好的话,launch后底盘应该可以启动了
roslaunch dashgo_nav gmapping_imu.launch
如果还不行的话,每次加完ip地址后重启网络服务试试
service network_manager restart
如果以上步骤还没成功,在自己账户
sudo usermod -a -G dialout your_user_name //your_user_name 替换为实际用户名。
sudo apt-get install git python-serial ros-melodic-serial g++
sudo apt-get install ros-melodic-turtlebot-rviz-launchers
sudo apt-get install ros-melodic-teleop-twist-keyboard
sudo apt-get install ros-melodic-move-base-msgs libghc-sdl-image-dev
sudo apt-get install ros-melodic-navigation ros-melodic-slam-gmapping ros-melodic-teb-local-planner
在机器人账户
cd dashgo_ws
sudochmod 777 ./* -R
rm -rf build
rm -rf devel
catkin_make
添加环境变量
echo "source ~/dashgo_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
最后重复以上步骤