ubuntu16.04 设置环境变量
1、打开.bashrc 文件
sudo gedit ~/.bashrc
2、需要输入用户密码
3、找到设置环境变量的位置
source /opt/ros/kinetic/setup.bash
source ~/hky_xt/devel/setup.bash
source ~/hky_xt1/devel/setup.bash
source ~/linshi3/devel/setup.bash
source ~/lodging_robot/devel/setup.bash
4、添加需要设置环境变量的路径
source /opt/ros/kinetic/setup.bash
source ~/hky_xt/devel/setup.bash
source ~/hky_xt1/devel/setup.bash
source ~/linshi3/devel/setup.bash
source ~/lodging_robot/devel/setup.bash
source ~/rubb_robot/devel/setup.bash
5、保存退出,并在终端运行命令,使其立即生效
source ~/.bashrc
6、即可以正常使用