ROS 学习系列 -- rocon_app_manager 中 'unegister service [/Cybernetic Pirate/XXX]' 错误处理方法

1. 错误描述


今天在PC和开发板上下载了 rocon_app_manager_tutorials,并尝试在安卓系统上遥控远程ROS进程,执行下面命令启动 rocon app 和 interaction集合:

roslaunch rocon_app_manager_tutorials pairing.launch --screen

结果出现了下面的红惨惨的错误:

/opt/ros/indigo/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py:709: UserWarning: '/Cybernetic Pirate/platform_info' is not a legal ROS graph resource name. This may cause problems with other ROS tools
  error_handler)
[FATAL] [WallTime: 1435499530.814710] unable to register service [/Cybernetic Pirate/platform_info] with master: ERROR: parameter [service] contains illegal chars

ROS 学习系列 -- rocon_app_manager 中 'unegister service [/Cybernetic Pirate/XXX]' 错误处理方法_第1张图片


2. 原因分析

这个问题十分诡异,看似许多错误,但仔细一看都是重复的,就一个错误:/Cybernetic Pirate/XXXX 这个service 名字是不合法的。中间的那个空格十分可疑,打开ROS官网命名规范:

A valid name has the following characteristics:

    1. First character is an alpha character ([a-z|A-Z]), tilde (~) or forward slash (/)

    2. Subsequent characters can be alphanumeric ([0-9|a-z|A-Z]), underscores (_), or forward slashes (/) 

空格没有被标记为允许使用的符号!问题是怎么把它解决掉, 这几个service的名字在哪里??我们看看执行的 pairing.launch :

<!-- 
   An example that loads up some pairing interactions with a standalone app manager.
   
   The turtle teleop pairing is a bit mucked up, we bypass the relay that gets wierdly
   dropped in because we can't configure the args going in to the rapp yet (will be
   able to be cleanly do this once we have rapps parsing parameters).
-->
<launch>
  <include file="$(find rocon_app_manager)/launch/standalone.launch">
    <arg name="interactions"           value="true"/>
    <arg name="interactions_list"      value="[rocon_app_manager_tutorials/pairing]"/>
    <arg name="rapp_package_whitelist" value="[rocon_apps, turtle_concert]"/>
    <arg name="robot_name"             value="Cybernetic Pirate"/>
    <arg name="robot_type"             value="pc"/>
    <arg name="robot_icon"             value="rocon_icons/cybernetic_pirate.png"/>
    <arg name="robot_description"      value="A tutorial environment for demonstrating pairing interactions." />
    <arg name="zeroconf"               value="true"/>
  </include>
  <node pkg="turtlesim" type="turtlesim_node" name="turtlesim" required="true"/>
</launch>

这里的 “robot_name" 作为参数被传递到 rocon_app_manager 包的程序使用了,再没有其它程序的调用了。rocon_app_manager 肯定不会硬编码这个关键字,这里99%就是错误根源了。


3. 解决方案

把 ”Cybernetic Pirate" 改成 "Cybernetic_Pirate", 重新启动pairing.launch, 问题果然解决!

版权声明:本文为博主原创文章,未经博主允许不得转载。


你可能感兴趣的:(robot,ROS,Concert)