当前位置: 首页>>代码示例>>Python>>正文


Python builder.Robot类代码示例

本文整理汇总了Python中morse.builder.Robot的典型用法代码示例。如果您正苦于以下问题:Python Robot类的具体用法?Python Robot怎么用?Python Robot使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Robot类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 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)
开发者ID:matrixchan,项目名称:morse,代码行数:7,代码来源:morserobots.py

示例2: __init__

    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'
开发者ID:Greg8978,项目名称:morse,代码行数:8,代码来源:morserobots.py

示例3: __init__

    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
开发者ID:Greg8978,项目名称:morse,代码行数:38,代码来源:human.py

示例4: __init__

 def __init__(self, name=None):
     Robot.__init__(self, "b21", name)
     self.properties(classpath = "morse.robots.b21.B21")
开发者ID:Greg8978,项目名称:morse_MaRDi,代码行数:3,代码来源:morserobots.py

示例5: __init__

 def __init__(self, name=None):
     Robot.__init__(self, "rmax")
     self.name = name
     self.properties(classpath = "morse.robots.rmax.RmaxClass")
开发者ID:danyalrehman,项目名称:Aerospace-Simulations,代码行数:4,代码来源:morserobots.py

示例6: __init__

 def __init__(self, name=None):
     Robot.__init__(self, "morsy")
     self.name = name
开发者ID:mudrole1,项目名称:morse,代码行数:3,代码来源:morserobots.py


注:本文中的morse.builder.Robot类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。