1.linux中用root用户source profile 提示权限不够
涉及到文件权限问题,文件目录 ~/etc/profile 为此文件添加读写权限。(chmod加到最大就完事了)
查看权限 ls -ld /etc/profile
修改权限 sudo chmod 755 /etc/profile
#刷新环境 方法一
source~/tutorial_ws/devel/setup.bash
source命令,编译完成后必须刷新一下工作空间的环境,系统才知道去哪里找我们编译好的package。否则可能找不到工作空间。许多时候我们为了打开终端就能够运行工作空间中编译好的ROS程序,我们习惯把 source~/tutorial_ws/devel/setup.bash 命令追加到 ~/.bashrc 文件中(rosacademy_ws替换为你的工作空间名称),这样每次打开终端,系统就会刷新工作空间环境。
echo "source~/tutorial_ws/devel/setup.bash" >> ~/.bashrc
将刷新环境 放到bashrc文件中,这样每次启动终端的时候就自动刷新了
查看bash内容 vi .bashrc
2. [robot_launch.launch] is neither a launch file in package [kinova_gazebo] nor is [kinova_gazebo] a launch file name The traceback for the exception was written to the log file
如果没有将刷新环境放到bashrc文件中,直接运行程序,会报错。
[robot_launch.launch] is neither a launch file in package [kinova_gazebo] nor is [kinova_gazebo] a launch file name
The traceback for the exception was written to the log file。说明ros系统中,并没有安装相对应的package。
(1)确保文件已经编译过了。 catkin_make命令进行编译。
(2)如果此时再执行,还是会报错的,那么就要加上刷新语句。(见problem 1)?
3. 在Ubuntu 16.04LTS运行ROS gazebo 报错解决
第一次运行时,Gazebo 并没有出现该模拟场景,要么黑屏要么闪退,我还以为是虚拟机的显卡带不动呢……
终端报错:
VMware: vmw_ioctl_command error 无效的参数.
Aborted (core dumped)
[gazebo_gui-2] process has died [pid 9099, exit code 134, cmd /opt/ros/kinetic/lib/gazebo_ros/gzclient __name:=gazebo_gui __log:=/home/dhy/.ros/log/aedcdbd8-6408-11e8-abc6-000c292730e7/gazebo_gui-2.log].
log file: /home/dhy/.ros/log/aedcdbd8-6408-11e8-abc6-000c292730e7/gazebo_gui-2*.log
解决方法:
添加环境变量 export SVGA_VGPU10=0
然后重启Gazebo就可以了。
4.