本文整理汇总了Python中morse.builder.Robot.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Robot.__init__方法的具体用法?Python Robot.__init__怎么用?Python Robot.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类morse.builder.Robot
的用法示例。
在下文中一共展示了Robot.__init__方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from morse.builder import Robot [as 别名]
# 或者: from morse.builder.Robot import __init__ [as 别名]
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)
示例2: __init__
# 需要导入模块: from morse.builder import Robot [as 别名]
# 或者: from morse.builder.Robot import __init__ [as 别名]
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'
示例3: __init__
# 需要导入模块: from morse.builder import Robot [as 别名]
# 或者: from morse.builder.Robot import __init__ [as 别名]
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
示例4: __init__
# 需要导入模块: from morse.builder import Robot [as 别名]
# 或者: from morse.builder.Robot import __init__ [as 别名]
def __init__(self, name=None):
Robot.__init__(self, "b21", name)
self.properties(classpath = "morse.robots.b21.B21")
示例5: __init__
# 需要导入模块: from morse.builder import Robot [as 别名]
# 或者: from morse.builder.Robot import __init__ [as 别名]
def __init__(self, name=None):
Robot.__init__(self, "rmax")
self.name = name
self.properties(classpath = "morse.robots.rmax.RmaxClass")
示例6: __init__
# 需要导入模块: from morse.builder import Robot [as 别名]
# 或者: from morse.builder.Robot import __init__ [as 别名]
def __init__(self, name=None):
Robot.__init__(self, "morsy")
self.name = name