1.sudo gedit ~/.bashrc 2.在最后一行添加下列一句话 保存 export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}: /你的路径 3.source ~/.bashrc 4.查看ros路径 echo $ROS_PACKAGE_PATH