Example #1
0
def setup_module():
    if not rostest_nose.is_rostest_enabled():
        rostest_nose.rostest_nose_setup_module()

        # we still need a node to interact with topics
        rospy.init_node('TestStringTopic',
                        anonymous=True,
                        disable_signals=True)
Example #2
0
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, slow_process

        rospy.set_param('/echo_node/echo_service_name', 'test_service')
        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
        rospy.set_param('/slow_node/slow_service_name', 'test_timeout_service')
        slow_node = roslaunch.core.Node('pyros_test',
                                        'string_slow_node.py',
                                        name='slow_node')
        try:
            slow_process = launch.launch(slow_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
        # set required parameters - needs to match the content of *.test files for rostest to match
        rospy.set_param('/stringServiceTest/echo_service_name', 'test_service')
        rospy.set_param('/stringServiceTest/slow_service_name',
                        'test_timeout_service')

        # we still need a node to interact with topics
        rospy.init_node('TestStringService',
                        anonymous=True,
                        disable_signals=True)
Example #3
0
def setup_module():
    if not rostest_nose.is_rostest_enabled():
        rostest_nose.rostest_nose_setup_module()

    # Using pubs and subs require us to be a node
    rospy.init_node('test_publisher_if_pool', argv=None, disable_signals=True)
def setup_module():
    if not rostest_nose.is_rostest_enabled():
        rostest_nose.rostest_nose_setup_module()

    # Providing services require us to be a node
    rospy.init_node('test_service_if_pool', argv=None, disable_signals=True)
Example #5
0
def setup_module():
    if not rostest_nose.is_rostest_enabled():
        rostest_nose.rostest_nose_setup_module()