rostest kills roscore
I created a gtest test class for obvious reasons. I made the necessary adjustments to CMakefile.txt, and the package builds both the node and test executables fine. When I run 'make test', the tests complete with no failures. Then, I made a test launch file (armMotion.test) that contains the following:
<launch>
<test test-name="arm_motion_test" name="arm_motion" pkg="arm_motion" type="utest" time-limit="180"/>
</launch>
In the terminals that I will run this test file and my roscore, I change the ROS_URI_MASTER port to 22422. Then, I perform the command 'rostest --text armMotion.test'. As soon as I execute this, my roscore dies. From the master.log file:
"
...
[INFO] 2011-07-07 19:15:35,639: +SUB [/LowerPanTilt/start_velocity_control] /LowerPanTilt/LowerPanTilt http://darpa-arm-gfe:41147/
[INFO] 2011-07-07 19:15:45,530: stopping master...
"
In another log file:
"
[INFO] 2011-07-07 19:15:45,390: rostest starting with options {'text_mode': True, 'bare_name': None, 'bare': False, 'bare_limit': 60}, args ['armMotion.test']
[INFO] 2011-07-07 19:15:45,390: loading roscore config file /home/arm_user/darpa_arm_cturtle/stacks/ros/tools/roslaunch/roscore.xml
[INFO] 2011-07-07 19:15:45,390: Added core node of type [rosout/rosout] in namespace [/]
[INFO] 2011-07-07 19:15:45,391: loading config file armMotion.test
[INFO] 2011-07-07 19:15:45,391: overriding master port to 22422
[INFO] 2011-07-07 19:15:45,391: ... selected machine [] for node of type [arm_motion/utest]
[INFO] 2011-07-07 19:15:45,460: setup[armMotion.test] run_id[0ae5d9fc-a8ef-11e0-b30b-b8ac6f4327b2] starting
[INFO] 2011-07-07 19:15:45,460: start_process_monitor: creating ProcessMonitor
[INFO] 2011-07-07 19:15:45,460: created process monitor <processmonitor(processmonitor-1, initial="" daemon)><br="">
[INFO] 2011-07-07 19:15:45,461: start_process_monitor: ProcessMonitor started
[INFO] 2011-07-07 19:15:45,461: starting parent XML-RPC server
[INFO] 2011-07-07 19:15:45,461: starting roslaunch XML-RPC server
[INFO] 2011-07-07 19:15:45,461: waiting for roslaunch XML-RPC server to initialize
[INFO] 2011-07-07 19:15:45,474: started roslaunch server http://darpa-arm-gfe:53403/
[INFO] 2011-07-07 19:15:45,474: ... parent XML-RPC server started
[INFO] 2011-07-07 19:15:45,475: _addRostestParent [<rostest.rostest_parent.rostestlaunchparent object="" at="" 0x11d8790="">]
[INFO] 2011-07-07 19:15:45,475: setup[armMotion.test] run_id[0ae5d9fc-a8ef-11e0-b30b-b8ac6f4327b2] done
[INFO] 2011-07-07 19:15:45,475: Running test [arm_motion_test]
[INFO] 2011-07-07 19:15:45,475: initial ROS_MASTER_URI is http://darpa-arm-gfe:22422/
[INFO] 2011-07-07 19:15:45,475: master.is_running[http://darpa-arm-gfe:22422/]
[INFO] 2011-07-07 19:15:45,477: master.is_running[http://darpa-arm-gfe:22422/]
[INFO] 2011-07-07 19:15:45,579: master.is_running[http://darpa-arm-gfe:22422/]
[INFO] 2011-07-07 19:15:45,580: master.is_running[http://darpa-arm-gfe:22422/]
[INFO] 2011-07-07 19:15:45,580: master.is_running[http://darpa-arm-gfe:22422/]
[INFO] 2011-07-07 19:15:45,580: starting new master (master configured for auto restart)
[INFO] 2011-07-07 19:15:45,580: create_master_process: rosmaster, /home/arm_user/darpa_arm_cturtle/stacks/ros, 22422
[INFO] 2011-07-07 19:15:45,580: ProcessMonitor.register[master]
[INFO] 2011-07-07 19:15:45,581: ProcessMonitor.register[master] complete
[INFO] 2011-07-07 19:15:45,583: master.is_running[http://darpa-arm-gfe:22422/]
[INFO] 2011-07-07 19:15:45,683: master.is_running[http://darpa-arm-gfe:22422/]
[INFO] 2011-07-07 19:15:45 ...