當前位置: 首頁>>代碼示例>>Python>>正文


Python Target.z方法代碼示例

本文整理匯總了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)
開發者ID:wenwei-dev,項目名稱:ros-behavior-scripting,代碼行數:10,代碼來源:ros_commo.py

示例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
開發者ID:hansonrobotics,項目名稱:eva_behavior,代碼行數:10,代碼來源:face_track.py

示例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)
開發者ID:wenwei-dev,項目名稱:ros-behavior-scripting,代碼行數:10,代碼來源:ros_commo.py

示例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)
開發者ID:AmeBel,項目名稱:ros-behavior-scripting,代碼行數:11,代碼來源:ros_commo.py

示例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)
開發者ID:opencog,項目名稱:ros-behavior-scripting,代碼行數:11,代碼來源:ros_commo.py

示例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
開發者ID:hansonrobotics,項目名稱:eva_behavior,代碼行數:19,代碼來源:face_track.py

示例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
開發者ID:hansonrobotics,項目名稱:HEAD,代碼行數:19,代碼來源:face_track.py

示例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
開發者ID:digideskio,項目名稱:ros-behavior-scripting,代碼行數:20,代碼來源:face_track.py

示例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)
開發者ID:ben-bot,項目名稱:ros-behavior-scripting,代碼行數:21,代碼來源:general_behavior.py


注:本文中的blender_api_msgs.msg.Target.z方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。