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


Python msg.Target类代码示例

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


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

示例1: look_at_point

	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,代码行数:8,代码来源:ros_commo.py

示例2: face_target

	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,代码行数:8,代码来源:face_track.py

示例3: gaze_at_point

	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,代码行数:8,代码来源:ros_commo.py

示例4: look_at_point

	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,代码行数:9,代码来源:ros_commo.py

示例5: gaze_at_point

	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,代码行数:9,代码来源:ros_commo.py

示例6: look_at_face

	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,代码行数:17,代码来源:face_track.py

示例7: gaze_at_face

    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,代码行数:17,代码来源:face_track.py

示例8: look_at_face

	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,代码行数:18,代码来源:face_track.py

示例9: unpack_config_look_around

	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,代码行数:19,代码来源:general_behavior.py


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