ROS ——初级教程常见问题汇总

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.

 

 

 

 

 

 

 

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值