first,查看路径
chen@chen-HP:~$ echo $ROS_PACKAGE_PATH
/opt/ros/indigo/share:/opt/ros/indigo/stacks
添加
chen@chen-HP:~$ echo "export ROS_PACKAGE_PATH=~/dev/rosbook:${ROS_PACKAGE_PATH}">>~/.bashrc
chen@chen-HP:~$ . ~/.bashrc
最后查看环境变量:env
可以看到多了ROS_PATHAGE_PATH的路径多了一个分号。