start-jsk / rtmros_common

OpenRTM - ROS interoperability packages
http://wiki.ros.org/rtmros_common
12 stars 52 forks source link

(hrpsys_ros_bridge/collision_detector.launch) "RTCTREE_NAMESERVERS is not set, use localhost:15005" while using real robot #453

Closed 130s closed 10 years ago

130s commented 10 years ago

Trying to give nameserver as an argument to roslaunch command (below I added enter to the 1st line to fold the long line).

rosnoodle@sculptor:/opt/ros/hydro/share/hrpsys_ros_bridge/launch$ roslaunch hrpsys_ros_bridge collision_detector.launch 
   nameserver:=hiro014
   MODEL_FILE:=`rospack find hironx_ros_bridge`/models/kawada-hironx.dae 
   CONF_FILE:=`rospack find hironx_ros_bridge`/conf/kawada-hironx.conf
:
started roslaunch server http://sculptor:37892/

SUMMARY
========

PARAMETERS
 * /collision_state/comp_name
 * /rosdistro
 * /rosversion

NODES
  /
    CollisionDetectorComp (hrpsys/CollisionDetectorComp)
    collision_state (hrpsys_ros_bridge/collision_state.py)
    rtmlaunch_collision_detector (openrtm_tools/rtmlaunch.py)

WARNING: unrecognized tag rtconnect
WARNING: unrecognized tag rtconnect
WARNING: unrecognized tag rtactivate
ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
:
[rtmlaunch] starting...  /opt/ros/hydro/share/hrpsys_ros_bridge/launch/collision_detector.launch
[rtmlaunch] RTCTREE_NAMESERVERS is not set, use localhost:15005
[rtmlaunch] RTCTREE_NAMESERVERS localhost:15005 localhost:15005
[rtmlaunch] SIMULATOR_NAME RobotHardware0
[rtmlaunch] check connection/activation
[rtmlaunch] [ERROR] Could not Connect ( /localhost:15005/RobotHardware0.rtc:q , /localhost:15005/CollisionDetector0.rtc:qCurrent ):  Invalid CORBA naming service: localhost:15005 
[rtmlaunch] Could not Activate ( localhost:15005/CollisionDetector0.rtc ) :  Invalid CORBA naming service: localhost:15005 

roslaunch hironx_ros_bridge hironx_ros_bridge.launch nameserver:=hiro014 is running on another terminal.

I modified hrpsys_ros_bridge/launch/collision_detector.launch as follows but no good.

<launch>
  <arg name="nameserver" default="hiro014" />
  <arg name="corbaport" default="15005" />
  <arg name="SIMULATOR_NAME" default="RobotHardware0"/> <!-- please set $(arg ROBOT_NAME)(Robot) for simulation -->
  <env name="SIMULATOR_NAME" value="$(arg SIMULATOR_NAME)" />

<!--  <arg name="omniorb_args" default="-ORBInitRef NameService=corbaloc:iiop:$(arg nameserver):$(arg corbaport)/NameService" /> -->
  <arg name="omniorb_args" default="--host $(arg nameserver) --port $(arg corbaport)" /> 
  <arg name="openrtm_args" default='-o "corba.nameservers:$(arg nameserver):$(arg corbaport)" -o "naming.formats:%n.rtc" -o "exec_cxt.periodic.type:PeriodicExecutionContext" -o "exec_cxt.periodic.rate:2000" -o "logger.file_name:/tmp/collision_detector%p.log"' />
  <arg name="MODLE_FILE" />
  <arg name="CONF_FILE" />

  <!-- launch collision detector -->
  <node pkg="hrpsys" name="CollisionDetectorComp"
        type="CollisionDetectorComp"
        args="$(arg openrtm_args) $(arg omniorb_args) -o example.CollisionDetector0.config_file:$(arg CONF_FILE)" />
  <rtconnect from="$(arg SIMULATOR_NAME).rtc:q" to="CollisionDetector0.rtc:qCurrent" />
  <rtconnect from="$(arg SIMULATOR_NAME).rtc:q" to="CollisionDetector0.rtc:qRef" />
  <rtactivate component="CollisionDetector0.rtc" />
  <node name="rtmlaunch_collision_detector" pkg="openrtm_tools" type="rtmlaunch.py"
        args="$(find hrpsys_ros_bridge)/launch/collision_detector.launch" />

  <!-- launch collision result publisher -->
  <node pkg="hrpsys_ros_bridge" name="collision_state" type="collision_state.py"
        output="screen"
        args="$(arg MODEL_FILE) $(arg omniorb_args)" >
    <param name="comp_name" type="string" value="CollisionDetector0" />
  </node>
</launch>
$ dpkg -p ros-hydro-hrpsys-ros-bridge |grep Vers
Version: 1.0.11-0precise-20140419-2311-+0000
130s commented 10 years ago

Temporary fix worked was (by @k-okada):

k-okada commented 10 years ago

sorry for late replay, https://github.com/start-jsk/rtmros_common/pull/461 will fix this problem

On Thu, May 1, 2014 at 10:43 PM, Isaac Isao Saito notifications@github.comwrote:

Temporary fix worked was:

  • Set robot's host name in environment variable: RTCTREE_NAMESERVERS=hiro014:15005
  • Specify nameserver as an argument like: roslaunch hrpsys_ros_bridge collision_detector.launch MODEL_FILE:=/opt/jsk/etc/HIRONX/model/main.wrl CONF_FILE:=rospack find hironx_ros_bridge/conf/kawada-hironx.conf nameserver:=hiro014

— Reply to this email directly or view it on GitHubhttps://github.com/start-jsk/rtmros_common/issues/453#issuecomment-41910708 .