Пример #1
0
 def setUpMw(self):
     try:
         self.moosdb_process = subprocess.Popen(['MOOSDB'])
     except OSError as ose:
         testlogger.error(
             "Error while launching MOOSDB ! Is core-moos installed?\n")
         raise ose
Пример #2
0
 def setUpMw(self):
     try:
         self.roscore_process = subprocess.Popen(['roscore'])
     except OSError as ose:
         testlogger.error(
             "Error while launching roscore ! Check you can run it from command-line\n"
         )
         raise ose
Пример #3
0
    def init_sensor_test(self, topic, topic_type):
        rospy.init_node('morse_testing', log_level=rospy.DEBUG)

        testlogger.debug("subscribe and wait %s (%s)"%(topic, topic_type.__name__))

        tmp = self.subscribe_and_wait_for_message(topic, topic_type)
        if not tmp: # remove once https://github.com/ros/genpy/pull/9 is merged
            testlogger.error("please patch ROS, see patches/ros_python3.diff")
        self.assertTrue(tmp != None)

        self.cmd_stream = rospy.Publisher('/ATRV/MotionVW', Twist)

        testlogger.debug("init sensor OK %s"%topic)

        return self.sensor_message
    def init_sensor_test(self, topic, topic_type):
        rospy.init_node('morse_testing', log_level=rospy.DEBUG)

        testlogger.debug("subscribe and wait %s (%s)"%(topic, topic_type.__name__))

        tmp = self.subscribe_and_wait_for_message(topic, topic_type)
        if not tmp: # remove once https://github.com/ros/genpy/pull/9 is merged
            testlogger.error("please patch ROS, see patches/ros_python3.diff")
        self.assertTrue(tmp != None)

        self.cmd_stream = rospy.Publisher('/ATRV/MotionVW', Twist)

        testlogger.debug("init sensor OK %s"%topic)

        return self.sensor_message
Пример #5
0
""" ROS-based MorseTestCase (unit-tests)

The main feature is to launch ROS core at start.
"""

from morse.testing.testing import MorseTestCase, testlogger

import os
import sys
import subprocess

try:
    import roslib
except ImportError as error:
    testlogger.error("Could not find ROS. source setup.[ba]sh ?")
    raise error


class RosTestCase(MorseTestCase):
    def setUpMw(self):
        try:
            self.roscore_process = subprocess.Popen(['roscore'])
        except OSError as ose:
            testlogger.error(
                "Error while launching roscore ! Check you can run it from command-line\n"
            )
            raise ose

    def tearDownMw(self):
        self.roscore_process.terminate()
Пример #6
0
""" MOOS-based MorseTestCase (unit-tests)

The main feature is to launch MOOSDB at start.
"""

from morse.testing.testing import MorseTestCase, testlogger

import os
import sys
import subprocess

try:
    import pymoos
except ImportError as error:
    testlogger.error("Could not find pymoos. Is it installed?")
    raise error


class MOOSTestCase(MorseTestCase):
    def setUpMw(self):
        try:
            self.moosdb_process = subprocess.Popen(['MOOSDB'])
        except OSError as ose:
            testlogger.error(
                "Error while launching MOOSDB ! Is core-moos installed?\n")
            raise ose

    def tearDownMw(self):
        self.moosdb_process.kill()
Пример #7
0
 def setUpMw(self):
     try:
         self.roscore_process = subprocess.Popen(['roscore'])
     except OSError as ose:
         testlogger.error("Error while launching roscore ! Check you can run it from command-line\n")
         raise ose
Пример #8
0
""" ROS-based MorseTestCase (unit-tests)

The main feature is to launch ROS core at start.
"""

from morse.testing.testing import MorseTestCase, testlogger

import os
import sys
import subprocess

try:
    import roslib
except ImportError as error:
    testlogger.error("Could not find ROS. source setup.[ba]sh ?")
    raise error

class RosTestCase(MorseTestCase):
    def setUpMw(self):
        try:
            self.roscore_process = subprocess.Popen(['roscore'])
        except OSError as ose:
            testlogger.error("Error while launching roscore ! Check you can run it from command-line\n")
            raise ose

    def tearDownMw(self):
        self.roscore_process.terminate()
Пример #9
0
 def setUpMw(self):
     try:
         self.moosdb_process = subprocess.Popen(['MOOSDB'])
     except OSError as ose:
         testlogger.error("Error while launching MOOSDB ! Is core-moos installed?\n")
         raise ose
Пример #10
0
""" MOOS-based MorseTestCase (unit-tests)

The main feature is to launch MOOSDB at start.
"""

from morse.testing.testing import MorseTestCase, testlogger

import os
import sys
import subprocess

try:
    import pymoos
except ImportError as error:
    testlogger.error("Could not find pymoos. Is it installed?")
    raise error

class MOOSTestCase(MorseTestCase):
    def setUpMw(self):
        try:
            self.moosdb_process = subprocess.Popen(['MOOSDB'])
        except OSError as ose:
            testlogger.error("Error while launching MOOSDB ! Is core-moos installed?\n")
            raise ose

    def tearDownMw(self):
        self.moosdb_process.kill()