コード例 #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
ファイル: ros.py プロジェクト: tiberiusferreira/VilmaProject
 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
ファイル: depth_camera.py プロジェクト: Greg8978/morse_MaRDi
    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.py プロジェクト: tiberiusferreira/VilmaProject
""" 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
ファイル: data_stream.py プロジェクト: Arkapravo/morse-0.6
 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.py プロジェクト: DAInamite/morse
""" 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
ファイル: moos.py プロジェクト: amiller27/morse
 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.py プロジェクト: amiller27/morse
""" 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()