Exemple #1
0
 def __init__(self, name=None):
     Robot.__init__(self, "victim")
     self.name = name
     self.properties(Class = "VictimClass", \
                     Path = "morse/robots/victim", \
                     Victim_Tag = True, Requirements = "1,2,3", \
                     Injured = True, Severity = 10)
Exemple #2
0
 def __init__(self, name=None):
     Robot.__init__(self, "hummer")
     self.name = name
     self.properties(Class = "HummerClass", \
                     Path = "morse/robots/hummer", \
                     brakes = 0.0, friction = 200.0, force = 0.0, \
                     steer = 0.0, init = 0, cid = 0)
Exemple #3
0
    def __init__(self, filename='human'):
        """ The 'style' parameter is only to switch to the mocap_human file.

        :param filename: 'human' (default) or 'mocap_human'
        """
        Robot.__init__(self, filename)
        self.name = 'Human' # XXX BUG #237

        self.armature = None

        try:
            self.armature = Armature("HumanArmature", "human_posture")
            # new way of loading class (drop 'Class' and 'Path' properties)
            self.armature.properties(classpath="morse.sensors.human_posture.HumanPostureClass")
            self.append(self.armature)
        except KeyError:
            logger.error("Could not find the human armature! (I was looking " +\
                         "for an object called 'HumanArmature' in the 'Human'" +\
                         " children). I won't be able to export the human pose" +\
                         " to any middleware.")

        # fix for Blender 2.6 Animations
        armature_object = self.get_child(self.armature.name)
        if armature_object:
            hips = self.get_child("Hips_Empty")
            # IK human has no object called Hips_Empty, so avoid this step
            if hips:
                for i, actuator in enumerate(hips.game.actuators):
                    actuator.layer = i
                for i, actuator in enumerate(armature_object.game.actuators):
                    actuator.layer = i
    def __init__(self, name=None):
        Robot.__init__(self, "rmax", name)
        self.properties(classpath="morse.robots.rmax.RMax", NoGravity=True)

        self.set_rigid_body()
        rotor = self.get_child('Rotor')
        rotor.game.physics_type = 'NO_COLLISION'
Exemple #5
0
    def __init__(self, name=None):
        Robot.__init__(self, "rmax", name)
        self.properties(classpath = "morse.robots.rmax.RMax",
                        NoGravity = True)

        self.set_rigid_body()
        rotor = self.get_child('Rotor')
        rotor.game.physics_type = 'NO_COLLISION'
Exemple #6
0
    def __init__(self, name=None):
        Robot.__init__(self, "b21", name)
        self.properties(classpath = "morse.robots.b21.B21")

        self.set_rigid_body()
        self.set_collision_bounds()

        collision = self.get_child('b21_collision')
        collision.game.physics_type = 'STATIC'
Exemple #7
0
    def __init__(self, name=None):
        Robot.__init__(self, "jido", name)
        self.properties(classpath = "morse.robots.jido.Jido")

        self.set_dynamic()
        self.set_collision_bounds()
        self._bpy_object.game.radius = 0.01

        mesh = self.get_child('JidoBase')
        mesh.game.physics_type = 'STATIC'
Exemple #8
0
    def __init__(self, name=None):
        Robot.__init__(self, "morsy", name)
        self.properties(classpath = "morse.robots.morsy.Morsy")

        self.set_dynamic()
        mesh = self.get_child('morsy_mesh')
        mesh.game.physics_type = 'NO_COLLISION'

        self._bpy_object.game.radius = 0.01

        self.set_collision_bounds()
Exemple #9
0
    def __init__(self, name = None, debug = True):

        # theman.blend is located in the data/robots directory
        Robot.__init__(self, 'test_1/robots/theman.blend', name)
        self.properties(classpath = "test_1.robots.theman.Theman")
        self.suffix = self.name[-4:] if self.name[-4] == "." else ""
        try:
            self.armature = Armature("Armature" + self.suffix, "human_posture")
            # self.armature = Armature("Armature")
            self.append(self.armature)
            self.armature_pose = ArmaturePose() # armature_pose = joint states
            self.armature_pose.name="pose"
            self.armature.append(self.armature_pose)
            self.joint_state = CompoundSensor([self.armature_pose])
            self.append(self.joint_state)

        except KeyError:
            logger.error("Could not find the human armature! (I was looking " +\
                         "for an object called 'Armature' in the human" +\
                         " children). I won't be able to export the human pose" +\
                         " to any middleware.")


        ###################################
        # Actuators
        ###################################


        # (v,w) motion controller
        # Check here the other available actuators:
        # http://www.openrobots.org/morse/doc/stable/components_library.html#actuators

        # self.motion = MotionVW()
        # self.append(self.motion)

        # Optionally allow to move the robot with the keyboard
        if debug:
            keyboard = Keyboard()
            self.append(keyboard)

        ###################################
        # Sensors
        ###################################

        self.pose = Pose()
        self.append(self.pose)
Exemple #10
0
    def __init__(self, filename='human'):
        """ The 'style' parameter is only to switch to the mocap_human file.

        :param filename: 'human' (default) or 'mocap_human'
        """
        Robot.__init__(self, filename)

        self.suffix = self.name[-4:] if self.name[-4] == "." else ""

        self.armature = None
        if filename == 'mocap_human':
            self.properties(
                classpath="morse.robots.mocap_human.MocapHumanClass")
        else:
            self.properties(classpath="morse.robots.human.HumanClass")

        try:
            self.armature = Armature("HumanArmature" + self.suffix,
                                     "human_posture")
            # new way of loading class (drop 'Class' and 'Path' properties)
            self.armature.properties(
                classpath="morse.sensors.human_posture.HumanPosture")
            self.append(self.armature)
        except KeyError:
            logger.error("Could not find the human armature! (I was looking " +\
                         "for an object called 'HumanArmature' in the human" +\
                         " children). I won't be able to export the human pose" +\
                         " to any middleware.")

        # fix for Blender 2.6 Animations
        armature_object = self.get_child(self.armature.name)
        if armature_object:
            hips = self.get_child("Hips_Empty")
            # IK human has no object called Hips_Empty, so avoid this step
            if hips:
                for i, actuator in enumerate(hips.game.actuators):
                    actuator.layer = i
                for i, actuator in enumerate(armature_object.game.actuators):
                    actuator.layer = i
Exemple #11
0
    def __init__(self, filename='human', name = None):
        """ The 'style' parameter is only to switch to the mocap_human file.

        :param filename: 'human' (default) or 'mocap_human'
        """
        Robot.__init__(self, filename, name)

        self.suffix = self.name[-4:] if self.name[-4] == "." else ""

        self.armature = None
        if filename == 'mocap_human':
            self.properties(classpath="morse.robots.mocap_human.MocapHuman")
        else:
            self.properties(classpath="morse.robots.human.Human")

        try:
            self.armature = Armature("HumanArmature" + self.suffix, "human_posture")
            self.append(self.armature)
        except KeyError:
            logger.error("Could not find the human armature! (I was looking " +\
                         "for an object called 'HumanArmature' in the human" +\
                         " children). I won't be able to export the human pose" +\
                         " to any middleware.")

        # Add an armature sensor. "joint_stateS" to match standard ROS spelling.
        self.joint_states = ArmaturePose()
        self.armature.append(self.joint_states)

        # fix for Blender 2.6 Animations
        armature_object = self.get_child(self.armature.name)
        if armature_object:
            hips = self.get_child("Hips_Empty")
            # IK human has no object called Hips_Empty, so avoid this step
            if hips:
                for i, actuator in enumerate(hips.game.actuators):
                    actuator.layer = i
                for i, actuator in enumerate(armature_object.game.actuators):
                    actuator.layer = i
Exemple #12
0
 def __init__(self, name=None):
     Robot.__init__(self, "b21", name)
     self.properties(classpath = "morse.robots.b21.B21")
Exemple #13
0
 def __init__(self, name=None):
     Robot.__init__(self, "quadrotor_dynamic")
     self.name = name
     self.properties(Class = "QuadrotorClass", \
                     Path = "morse/robots/quadrotor")
Exemple #14
0
 def __init__(self, name=None):
     Robot.__init__(self, "submarine")
     self.name = name
     self.properties(Class = "SubmarineClass", \
                     Path = "morse/robots/submarine")
Exemple #15
0
 def __init__(self, name=None):
     Robot.__init__(self, "b21")
     self.name = name
     self.properties(Class = "B21Class", \
                     Path = "morse/robots/b21")
Exemple #16
0
 def __init__(self, name=None):
     Robot.__init__(self, "jido")
     self.name = name
     self.properties(Class = "JidoClass", \
                     Path = "morse/robots/jido")
Exemple #17
0
 def __init__(self, name=None):
     Robot.__init__(self, "rmax", name)
     self.properties(classpath="morse.robots.rmax.RMax")
Exemple #18
0
 def __init__(self, name=None):
     Robot.__init__(self, "quadrotor", name)
     self.properties(classpath = "morse.robots.quadrotor.Quadrotor")
     # Collision - Motion Game Logic
     self.set_no_collision()
Exemple #19
0
 def __init__(self, name=None):
     Robot.__init__(self, "jido")
     self.name = name
     self.properties(classpath = "morse.robots.jido.JidoClass")
Exemple #20
0
 def __init__(self, name=None):
     Robot.__init__(self, "atrv")
     self.name = name
     self.properties(classpath="morse.robots.atrv.ATRVClass")
Exemple #21
0
 def __init__(self, name=None):
     Robot.__init__(self, "morsy")
     self.name = name
Exemple #22
0
 def __init__(self, name=None):
     Robot.__init__(self, "quadrotor")
     self.name = name
     self.properties(classpath = "morse.robots.quadrotor.Quadrotor")
 def __init__(self, name=None):
     Robot.__init__(self, "rmax")
     self.name = name
     self.properties(classpath = "morse.robots.rmax.RmaxClass")
Exemple #24
0
 def __init__(self, name=None):
     Robot.__init__(self, "submarine")
     self.name = name
     self.properties(classpath = "morse.robots.submarine.SubmarineClass")
Exemple #25
0
 def __init__(self, name=None):
     Robot.__init__(self, "rmax")
     self.name = name
     self.properties(classpath = "morse.robots.rmax.RmaxClass")
Exemple #26
0
 def __init__(self, name=None):
     Robot.__init__(self, "jido", name)
     self.properties(classpath = "morse.robots.jido.Jido")
 def __init__(self, name=None):
     Robot.__init__(self, "quadrotor", name)
     self.properties(classpath="morse.robots.quadrotor.Quadrotor")
     # Collision - Motion Game Logic
     self.set_no_collision()
Exemple #28
0
 def __init__(self, name=None):
     Robot.__init__(self, "quadrotor_dynamic")
     self.name = name
     self.properties(classpath = "morse.robots.quadrotor.QuadrotorClass")
 def __init__(self, name=None):
     Robot.__init__(self, "quadrotor_dynamic", name)
     self.properties(classpath="morse.robots.quadrotor_dynamic.Quadrotor")
Exemple #30
0
 def __init__(self, name=None):
     Robot.__init__(self, "morsy", name)
     self.properties(classpath="morse.robots.morsy.Morsy")
Exemple #31
0
 def __init__(self, name=None):
     Robot.__init__(self, "quadrotor_dynamic", name)
     self.properties(classpath = "morse.robots.quadrotor_dynamic.Quadrotor")
Exemple #32
0
 def __init__(self, name=None, debug = True):
     Robot.__init__(self, 'robots/rotating_table.blend', name)
     self.properties(classpath = "morse.robots.rotating_table_services.RotatingTable")
Exemple #33
0
 def __init__(self, name=None):
     Robot.__init__(self, "submarine", name)
     self.properties(classpath = "morse.robots.submarine.Submarine")
Exemple #34
0
 def __init__(self, name=None):
     Robot.__init__(self, "cubemodule",
                    name)  # determines Blender model.blend
     self.properties(classpath="morse.robots.cubemodule.CubeModule"
                     )  # determines robot script.py
Exemple #35
0
 def __init__(self, name=None):
     Robot.__init__(self, "hummer")
     self.name = name
     self.properties(classpath = "morse.robots.hummer.HummerClass", \
                     brakes = 0.0, friction = 200.0, force = 0.0, \
                     steer = 0.0, init = 0, cid = 0)
Exemple #36
0
 def __init__(self, name=None):
     Robot.__init__(self, "atrv")
     self.name = name
     self.properties(Class = "ATRVClass", \
                     Path = "morse/robots/atrv")
Exemple #37
0
 def __init__(self, name=None):
     Robot.__init__(self, "b21")
     self.name = name
     self.properties(classpath = "morse.robots.b21.B21Class")
Exemple #38
0
 def __init__(self, name=None):
     Robot.__init__(self, "rmax")
     self.name = name
     self.properties(Class = "RmaxClass", \
                     Path = "morse/robots/rmax")
Exemple #39
0
 def __init__(self, name=None):
     Robot.__init__(self, "submarine", name)
     self.properties(classpath = "morse.robots.submarine.Submarine",
                     NoGravity = True)
     self.set_rigid_body()
     self.set_collision_bounds()
Exemple #40
0
 def __init__(self, name=None):
     Robot.__init__(self, "atrv", name)
     self.properties(classpath = "morse.robots.atrv.ATRV")
Exemple #41
0
 def __init__(self, name=None):
     Robot.__init__(self, "victim")
     self.name = name
     self.properties(classpath = "morse.robots.victim.VictimClass", \
                     Victim_Tag = True, Requirements = "1,2,3", \
                     Injured = True, Severity = 10)
Exemple #42
0
 def __init__(self, name=None):
     Robot.__init__(self, "hummer", name)
     self.properties(classpath = "morse.robots.hummer.Hummer", \
                     brakes = 0.0, friction = 200.0, force = 0.0, \
                     steer = 0.0, init = 0, cid = 0)
Exemple #43
0
 def __init__(self, name=None):
     Robot.__init__(self, name = name) # no Blender model -> a simple Empty will be created
     self.properties(classpath = "morse.robots.fakerobot.FakeRobot")
     self.set_no_collision()
Exemple #44
0
 def __init__(self, name=None):
     Robot.__init__(self, "morsy", name)
     self.properties(classpath = "morse.robots.morsy.Morsy")
Exemple #45
0
 def __init__(self, name=None):
     Robot.__init__(self, "morsy")
     self.name = name
Exemple #46
0
 def __init__(self, name=None):
     Robot.__init__(self, "rmax", name)
     self.properties(classpath = "morse.robots.rmax.RMax")
 def __init__(self, name=None):
     Robot.__init__(self, "submarine", name)
     self.properties(classpath="morse.robots.submarine.Submarine",
                     NoGravity=True)
     self.set_rigid_body()
     self.set_collision_bounds()
Exemple #48
0
 def __init__(self, name=None):
     Robot.__init__(self, "victim", name)
     self.properties(classpath = "morse.robots.victim.Victim", \
                     Victim_Tag = True, Requirements = "1,2,3", \
                     Injured = True, Severity = 10)
 def __init__(self, name=None):
     Robot.__init__(
         self,
         name=name)  # no Blender model -> a simple Empty will be created
     self.properties(classpath="morse.robots.fakerobot.FakeRobot")
     self.set_no_collision()