【ROS总结】ROS故障排除

前言

  在ROS学习与开发中,难免遇到各种各样的问题,除了一些可以解决问题(语法问题)外,其他一些问题有时很难发现并解决,在这里,总结下在开发中遇到的各种问题,不定期更新中。。。

  为了方便和管理,每一个标题都是一些问题模块,现在有catkin_make编译模块。

 

catkin_make问题

问题1:在使用catkin_make过程中,明明有需要编译的包,但是系统提示找不到该路径,具体输出如下:

 

Traceback (most recent call last):
  File "/opt/ros/indigo/share/genjava/cmake/../../../lib/genjava/genjava_gradle_project.py", line 14, in <module>
    genjava.main(sys.argv)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/genjava/genjava_main.py", line 82, in main
    gradle_project.create(args.package, args.output_dir)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/genjava/gradle_project.py", line 152, in create
    raise IOError("could not find %s on the ros package path" % msg_pkg_name)
IOError: could not find turtlebot2i_marker_manipulation on the ros package path
make[2]: *** [turtlebot2i_marker_manipulation/java/turtlebot2i_marker_manipulation/build.gradle] Error 1
make[1]: *** [turtlebot2i_marker_manipulation/CMakeFiles/turtlebot2i_marker_manipulation_generate_messages_java_gradle.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "/opt/ros/indigo/share/genjava/cmake/../../../lib/genjava/genjava_gradle_project.py", line 14, in <module>
    genjava.main(sys.argv)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/genjava/genjava_main.py", line 82, in main
    gradle_project.create(args.package, args.output_dir)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/genjava/gradle_project.py", line 152, in create
    raise IOError("could not find %s on the ros package path" % msg_pkg_name)
IOError: could not find turtlebot2i_marker_manipulation on the ros package path

IOError: could not find turtlebot2i_marker_manipulationon the ros package path

 

解决方案

 

  下载genjava就可以正常编译。原因不明。命令如下:

 

$ sudo apt-get remove ros-indigo-genjava

 

 

 

 

 

 

 

 
Moveit! 问题

问题1:当运行

roslaunch moveit_setup_assistant setup_assistant.launch

选择模型加载时,会突然系统崩溃。提示如下信息:

 

 

[rospack] Error: no package given
[librospack]: error while executing command
[ INFO] [1496720764.674712823]: Running 'rosrun xacro xacro.py /home/carl/Desktop/Project/turtlebot2i/src/turtlebot2i/turtlebot2i_description/robots/kobuki_interbotix_zr300.urdf.xacro'...
[ INFO] [1496720765.546447152]: Loaded turtlebot robot model.
[ INFO] [1496720765.546519891]: Setting Param Server with Robot Description
[ INFO] [1496720765.555161202]: Robot semantic model successfully loaded.
[ INFO] [1496720765.555195476]: Setting Param Server with Robot Semantic Description
[ INFO] [1496720765.570819680]: Loading robot model 'turtlebot'...
[ INFO] [1496720765.570888991]: No root/virtual joint specified in SRDF. Assuming fixed joint
================================================================================REQUIRED process [moveit_setup_assistant-1] has died!
process has died [pid 8123, exit code -11, cmd /opt/ros/indigo/lib/moveit_setup_assistant/moveit_setup_assistant __name:=moveit_setup_assistant __log:=/home/carl/.ros/log/689c9c26-4a64-11e7-8883-d85de2b5c407/moveit_setup_assistant-1.log].
log file: /home/carl/.ros/log/689c9c26-4a64-11e7-8883-d85de2b5c407/moveit_setup_assistant-1*.log
Initiating shutdown!
================================================================================
[moveit_setup_assistant-1] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

说明:

 

1.单独加载模型没问题.

2.使用moveit_setup加载其他模型有的没问题(例如,Turtlebot)。

3.只是使用有些模型会出现突然崩溃的情况。

 

解决方案

  方式1:检查模型中模型的<collision>属性,里面的<geometry>是否加载的是.dae或.stl文件,如果有,将.dae或.stl替换成urdf本身自有的属性,例如<cylinder>,<box>等。

举例:将

 

      <collision>
        <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
        <geometry>
          <mesh filename="package://turtlebot2i_description/meshes/sensors/sr300.stl" scale="2.0 2.0 2.0" />
        </geometry>
      </collision>


替换成

 

 

      <collision>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
          <cylinder length="0.006" radius="0.170"/>
        </geometry>
      </collision>

 

  方式2:测试了下moveit_setup_assistant,发现模型加载mesh时,会出错,方式1是将现有属性替换,另外一种方式是改变自己制作的dae或stl文件名,不清楚什么原因,moveit_setup_assistant加载dae或stl时,模型名必须为小写,如果有大写出现就会报错,例如将Test_Finger.dae修改为test_finger.dae就不会造成崩溃。

 

  方式3:如果是在加载别人做的dae或stl文件时,需要将dae或stl文件重写,我使用的是blender,将stl重新导出stl就不会造成崩溃。其他3D建模也可以尝试下,3D Max,solidworks,inventor等等。

其他解决方案如果有请告知。

 

 

 

ROS_Control + Gazebo问题

问题1:使用ros_control为模型添加Gazebo接口时,模型单独显示没有问题,在Gazebo中添加会错误,从而导致加载不了ros_control接口,报错如下:

 

[ERROR] [1497406213.064550049, 0.172000000]: No valid hardware interface element found in joint 'wheel_joint_fl'.
[ERROR] [1497406213.064681421, 0.172000000]: Failed to load joints for transmission 'wheel_trans_fl'.
[ERROR] [1497406213.064711210, 0.172000000]: No valid hardware interface element found in joint 'caster_joint_fl'.
[ERROR] [1497406213.064765673, 0.172000000]: Failed to load joints for transmission 'caster_trans_fl'.
[ERROR] [1497406213.064781965, 0.172000000]: No valid hardware interface element found in joint 'wheel_joint_fr'.
[ERROR] [1497406213.064794358, 0.172000000]: Failed to load joints for transmission 'wheel_trans_fr'.
[ERROR] [1497406213.064806668, 0.172000000]: No valid hardware interface element found in joint 'caster_joint_fr'.
[ERROR] [1497406213.064815775, 0.172000000]: Failed to load joints for transmission 'caster_trans_fr'.
[ERROR] [1497406213.064826099, 0.172000000]: No valid hardware interface element found in joint 'wheel_joint_bl'.
[ERROR] [1497406213.064837826, 0.172000000]: Failed to load joints for transmission 'wheel_trans_bl'.
[ERROR] [1497406213.064850074, 0.172000000]: No valid hardware interface element found in joint 'caster_joint_bl'.
[ERROR] [1497406213.064861368, 0.172000000]: Failed to load joints for transmission 'caster_trans_bl'.
[ERROR] [1497406213.064874445, 0.172000000]: No valid hardware interface element found in joint 'wheel_joint_br'.
[ERROR] [1497406213.064884656, 0.172000000]: Failed to load joints for transmission 'wheel_trans_br'.
[ERROR] [1497406213.064893785, 0.172000000]: No valid hardware interface element found in joint 'caster_joint_br'.
[ERROR] [1497406213.064902338, 0.172000000]: Failed to load joints for transmission 'caster_trans_br'.
[ERROR] [1497406213.064913362, 0.172000000]: No valid hardware interface element found in joint 'arm_joint_1'.
[ERROR] [1497406213.064923217, 0.172000000]: Failed to load joints for transmission 'arm_trans_1'.
[ERROR] [1497406213.064932655, 0.172000000]: No valid hardware interface element found in joint 'arm_joint_2'.
[ERROR] [1497406213.064942810, 0.172000000]: Failed to load joints for transmission 'arm_trans_2'.
[ERROR] [1497406213.064956180, 0.172000000]: No valid hardware interface element found in joint 'arm_joint_3'.
[ERROR] [1497406213.064965970, 0.172000000]: Failed to load joints for transmission 'arm_trans_3'.
[ERROR] [1497406213.064976051, 0.172000000]: No valid hardware interface element found in joint 'arm_joint_4'.
[ERROR] [1497406213.064985608, 0.172000000]: Failed to load joints for transmission 'arm_trans_4'.
[ERROR] [1497406213.064995977, 0.172000000]: No valid hardware interface element found in joint 'arm_joint_5'.
[ERROR] [1497406213.065005730, 0.172000000]: Failed to load joints for transmission 'arm_trans_5'.
[ERROR] [1497406213.065017694, 0.172000000]: No valid hardware interface element found in joint 'gripper_finger_joint_l'.
[ERROR] [1497406213.065026496, 0.172000000]: Failed to load joints for transmission 'gripper_finger_l_trans'.
[ERROR] [1497406213.065036557, 0.172000000]: No valid hardware interface element found in joint 'gripper_finger_joint_r'.
[ERROR] [1497406213.065046327, 0.172000000]: Failed to load joints for transmission 'gripper_finger_r_trans'.

 


解决:该问题原因是ros_control接口更新,有的旧的会不兼容,通过给<joint>选项添加<hardwareinterface>标签,这个错误会消失,比如,在rrbot.xacro文件中,改变:

 

 

<joint name="joint1"/>

 

 

 

为:

 

  <transmission name="tran1">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="joint1">
      <hardwareInterface>EffortJointInterface</hardwareInterface>
    </joint>
  </transmission>

 

 

Debian问题

问题1:在自己电脑上使用generate_bloom后,发送给另一台电脑使用,运行launch文件时,出现:

terminate called after throwing an instance of 'std::runtime_error'
  what():  Duration is out of dual 32-bit range

解决:

检查两台电脑的ROS包版本,例如自己电脑版本:

rosversion roslib

显示:1.14.3,

另一台电脑显示版本: 1.14.4

自己电脑的ROS版本低,因此出现这个问题,更新软件包即可,运行命令:

sudo apt-get upgrade

 

  • 1
    点赞
  • 46
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
启智 ROS 用户手册是一本为启智机器人的用户提供的操作指南。该手册的目的是帮助用户了解和掌握如何使用ROS(机器人操作系统)来控制和使用启智机器人。 用户手册以简洁明了的方式介绍了ROS的基本概念和工作原理,以及启智机器人与ROS的衔接方式。手册首先解释了ROS的基本概念,包括节点、话题和服务等,以帮助用户在理解整个ROS系统的基本结构后进行操作。 手册还介绍了如何安装和配置ROS环境,包括安装ROS核心软件和运行必需的依赖。它提供了一步一步的说明,指导用户正确地配置ROS环境,以确保启智机器人与ROS之间的通信正常运行。 用户手册还说明了启智机器人在ROS中的使用方法。它详细介绍了启智机器人的ROS软件包,包括如何启动机器人节点、控制机器人运动和获取传感器数据等。手册通过示例代码和命令解释了每个功能的使用方式,以帮助用户快速上手使用启智机器人。 此外,用户手册还提供了一些常见问题和故障排除的解决办法。用户可以在手册中找到对于常见问题的解答,以便更好地解决遇到的问题。 总而言之,启智 ROS 用户手册是一本全面而详细的操作指南,旨在帮助用户正确地使用ROS控制和操作启智机器人。通过阅读该手册,用户可以了解ROS基本概念、配置ROS环境以及如何使用ROS控制启智机器人,同时也可以学习到如何解决常见问题和故障排除。这本手册对于启智机器人的用户来说是一份宝贵的参考资料,有助于他们更好地利用ROS技术来控制和应用启智机器人。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值