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


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, 問題果然解決!

版權聲明:本文爲博主原創文章,未經博主允許不得轉載。


發佈了36 篇原創文章 · 獲贊 88 · 訪問量 30萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章