本文整理汇总了Python中blender_api_msgs.msg.Target.z方法的典型用法代码示例。如果您正苦于以下问题:Python Target.z方法的具体用法?Python Target.z怎么用?Python Target.z使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类blender_api_msgs.msg.Target
的用法示例。
在下文中一共展示了Target.z方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: look_at_point
# 需要导入模块: from blender_api_msgs.msg import Target [as 别名]
# 或者: from blender_api_msgs.msg.Target import z [as 别名]
def look_at_point(self, x, y, z):
print "look at point: ", x, y, z
trg = Target()
trg.x = x
trg.y = y
trg.z = z
self.turn_pub.publish(trg)
示例2: face_target
# 需要导入模块: from blender_api_msgs.msg import Target [as 别名]
# 或者: from blender_api_msgs.msg.Target import z [as 别名]
def face_target(self, faceid):
(trans, rot) = self.tf_listener.lookupTransform( \
self.LOCATION_FRAME, 'Face' + str(faceid), rospy.Time(0))
t = Target()
t.x = trans[0]
t.y = trans[1]
t.z = trans[2] + self.blackboard["z_pitch_eyes"]
return t
示例3: gaze_at_point
# 需要导入模块: from blender_api_msgs.msg import Target [as 别名]
# 或者: from blender_api_msgs.msg.Target import z [as 别名]
def gaze_at_point(self, x, y, z):
print "gaze at point: ", x, y, z
trg = Target()
trg.x = x
trg.y = y
trg.z = z
self.gaze_pub.publish(trg)
示例4: look_at_point
# 需要导入模块: from blender_api_msgs.msg import Target [as 别名]
# 或者: from blender_api_msgs.msg.Target import z [as 别名]
def look_at_point(self, x, y, z):
xyz1=numpy.array([x,y,z,1.0])
xyz=numpy.dot(self.conv_mat,xyz1)
trg = Target()
trg.x = xyz[0]
trg.y = xyz[1]
trg.z = xyz[2]
print "look at point: ", trg.x, trg.y, trg.z
self.turn_pub.publish(trg)
示例5: gaze_at_point
# 需要导入模块: from blender_api_msgs.msg import Target [as 别名]
# 或者: from blender_api_msgs.msg.Target import z [as 别名]
def gaze_at_point(self, x, y, z):
xyz1 = numpy.array([x,y,z,1.0])
xyz = numpy.dot(self.conv_mat, xyz1)
trg = Target()
trg.x = xyz[0]
trg.y = xyz[1]
trg.z = xyz[2]
# print "gaze at point: ", trg.x, trg.y, trg.z
self.gaze_pub.publish(trg)
示例6: look_at_face
# 需要导入模块: from blender_api_msgs.msg import Target [as 别名]
# 或者: from blender_api_msgs.msg.Target import z [as 别名]
def look_at_face(self, faceid):
print ("look at: " + str(faceid))
# Look at neutral position, 1 meter in front
if 0 == faceid :
trg = Target()
trg.x = 1.0
trg.y = 0.0
trg.z = 0.0
self.look_pub.publish(trg)
self.last_lookat = 0
if faceid not in self.visible_faces :
self.look_at = 0
return
self.look_at = faceid
示例7: gaze_at_face
# 需要导入模块: from blender_api_msgs.msg import Target [as 别名]
# 或者: from blender_api_msgs.msg.Target import z [as 别名]
def gaze_at_face(self, faceid):
logger.info("gaze at: " + str(faceid))
# Look at neutral position, 1 meter in front
if 0 == faceid :
trg = Target()
trg.x = 1.0
trg.y = 0.0
trg.z = 0.0
self.gaze_pub.publish(trg)
self.last_lookat = 0
if faceid not in self.visible_faces_blobs :
self.gaze_at = 0
return
self.gaze_at = faceid
示例8: look_at_face
# 需要导入模块: from blender_api_msgs.msg import Target [as 别名]
# 或者: from blender_api_msgs.msg.Target import z [as 别名]
def look_at_face(self, faceid):
logger.info("look at: " + str(faceid))
# Look at neutral position, 1 meter in front
if 0 == faceid :
trg = Target()
trg.x = 1.0
trg.y = 0.0
trg.z = 0.0
if self.control_mode & self.C_FACE:
self.look_pub.publish(trg)
self.last_lookat = 0
if faceid not in self.visible_faces :
self.look_at = 0
return
self.look_at = faceid
示例9: unpack_config_look_around
# 需要导入模块: from blender_api_msgs.msg import Target [as 别名]
# 或者: from blender_api_msgs.msg.Target import z [as 别名]
def unpack_config_look_around(self, config):
def get_values(from_config, num_values):
rtn_values = [float(z.strip()) for z in from_config.split(",")]
if len(rtn_values) != num_values:
raise Exception("List lengths don't match!")
return rtn_values
x_coordinates = [float(x.strip()) for x in config.get("boredom", "search_for_attention_x").split(",")]
numb = len(x_coordinates)
y_coordinates = get_values(config.get("boredom", "search_for_attention_y"), numb)
z_coordinates = get_values(config.get("boredom", "search_for_attention_z"), numb)
for (x, y, z) in zip (x_coordinates, y_coordinates, z_coordinates):
trg = Target()
trg.x = x
trg.y = y
trg.z = z
self.blackboard["search_for_attention_targets"].append(trg)