ROS报错解决记录


1、ResourceNotFound

问题:

raise ResourceNotFound(name, ros_paths=self._ros_paths)
ResourceNotFound: franka_description

解决方法:

sudo apt-get install ros-kinetic-franka-description

2、Roboware新建python节点后在rosrun找不到该节点

问题:
用 Roboware 新建 python 节点后在终端敲入rosrun后找不到功能包下新建的python节点,即 tab 不出来(已source)。

解决方法:
找不到节点的原因是因为 .py 文件没有执行权限(虽然我不知道为什么cpp文件不需要权限,感觉是因为python是解释性语言需要执行权限去执行,而 cpp 本身是不需要执行的,而是去编译链接)。

  1. cd 到新建 python 节点中的目录下。
  2. 给此新建的 python 文件添加执行权限。
    chmod a+x [python文件名].py
    

3、joint_state_publisher_gui

问题:

<?xml version="1.0"?>
<launch>
  <arg name="gui" default="True" />
  <param name="robot_description" command="$(find xacro)/xacro --inorder $(find motion_planning)/urdf/ur5_ag95.urdf.xacro" />
  <param name="use_gui" value="$(arg gui)"/>
  <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
  <node name="rviz" pkg="rviz" type="rviz" args="-d $(find dh_description)/urdf/AG-95_hand.rviz" required="true"/>
</launch>
[WARN] [1591580355.136441]: The 'use_gui' parameter was specified, which is deprecated.  We'll attempt to find and run the GUI, but if this fails you should
install the 'joint_state_publisher_gui' package instead and run that.  This backwards compatibility option will be removed in Noetic.
[ERROR] [1591580355.136915]: Could not find the GUI, install the 'joint_state_publisher_gui' package

解决方法:

首先安装相应的包

sudo apt-get install ros-kinetic-joint-state-publisher-gui

然后将所有joint_state_publisher改为joint_state_publisher_gui,如下所示:

<?xml version="1.0"?>
<launch>
  <arg name="gui" default="True" />
  <param name="robot_description" command="$(find xacro)/xacro --inorder $(find motion_planning)/urdf/ur5_ag95.urdf.xacro" />
  <param name="use_gui" value="$(arg gui)"/>
  <node name="joint_state_publisher_gui" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" />
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
  <node name="rviz" pkg="rviz" type="rviz" args="-d $(find dh_description)/urdf/AG-95_hand.rviz" required="true"/>
</launch>

注意:注释要全英文,否则会报错。


安装 gazebo 运行报错

问题

虚拟机安装 gazebo 解决 VMware: vmw_ioctl_command error Invalid argument

解决方法:

报错的原因大概是不合法的变量导致的,应该是启动gazebo的时候加载系统的某个环境变量的时候虚拟机无法完美识别导致的,所以知道了原因后,追根溯源,我们找到了以下修复方案,加入环境变量:

export SVGA_VGPU10=0

shell 中运行以上语句,但是这种方法有个坏处就是每次打开新的 shell 这个环境变量就失效了,所以我们需要将其加入到用户的环境变量,这样每次启动就可以自动运行此码.

echo "export SVGA_VGPU10=0" >> ~/.bashrc

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值