def setup_module(): if not rostest_nose.is_rostest_enabled(): rostest_nose.rostest_nose_setup_module() # Start roslaunch launch = roslaunch.scriptapi.ROSLaunch() launch.start() # start required nodes - needs to match the content of *.test files for rostest to match global pub_process, echo_process rospy.set_param('/echo_node/topic_name', 'test_topic') rospy.set_param('/echo_node/echo_topic_name', 'echo_test_topic') echo_node = roslaunch.core.Node('pyros_test', 'echo.py', name='echo_node') try: echo_process = launch.launch(echo_node) except roslaunch.RLException as rlexc: logging.error( "pyros_test is needed to run this test. Please verify that it is installed in your ROS environment" ) raise # TODO : also use pub and sub nodes in more granular tests # set required parameters - needs to match the content of *.test files for rostest to match rospy.set_param('/stringTopicTest/pub_topic_name', 'test_topic') rospy.set_param('/stringTopicTest/echo_topic_name', 'echo_test_topic') # we still need a node to interact with topics rospy.init_node('TestStringTopic', anonymous=True, disable_signals=True)
def teardown_module(): if not rostest_nose.is_rostest_enabled(): # finishing all process are finished if worker_process is not None: worker_process.stop() rostest_nose.rostest_nose_teardown_module()
def setup_module(): if not rostest_nose.is_rostest_enabled(): rostest_nose.rostest_nose_setup_module() # Start roslaunch global launch launch = roslaunch.scriptapi.ROSLaunch() launch.start()
def teardown_module(): if not rostest_nose.is_rostest_enabled(): # finishing all process are finished if pub_process is not None and pub_process.is_alive(): pub_process.stop() if echo_process is not None and echo_process.is_alive(): echo_process.stop() rospy.signal_shutdown('test complete') rostest_nose.rostest_nose_teardown_module()
def setup_module(): if not rostest_nose.is_rostest_enabled(): rostest_nose.rostest_nose_setup_module() # Start roslaunch global launch launch = roslaunch.scriptapi.ROSLaunch() launch.start() # start required worker - needs to match the content of *.test files for rostest to match global worker_process rospy.set_param('/celeros/topics', "['/celeros_test.*/injected','/celeros_test.*/extracted']") rospy.set_param('/celeros/services', "['/celeros_test.*/called']") worker_node = roslaunch.core.Node( 'celeros', 'celeros', name='celeros', args=" -A " + app + " --config " + config ) worker_process = launch.launch(worker_node)
def setup_module(): if not rostest_nose.is_rostest_enabled(): rostest_nose.rostest_nose_setup_module() # Start roslaunch global launch launch = roslaunch.scriptapi.ROSLaunch() launch.start() # start required worker - needs to match the content of *.test files for rostest to match global worker_process rospy.set_param( '/celeros/topics', "['/celeros_test.*/injected','/celeros_test.*/extracted']") rospy.set_param('/celeros/services', "['/celeros_test.*/called']") worker_node = roslaunch.core.Node('celeros', 'celeros', name='celeros', args=" -A " + app + " --config " + config) worker_process = launch.launch(worker_node)
def teardown_module(): if not rostest_nose.is_rostest_enabled(): rospy.signal_shutdown('test complete') rostest_nose.rostest_nose_teardown_module()
def setup_module(): if not rostest_nose.is_rostest_enabled(): rostest_nose.rostest_nose_setup_module()