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


Python Target.x方法代码示例

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


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

示例1: look_at_point

# 需要导入模块: from blender_api_msgs.msg import Target [as 别名]
# 或者: from blender_api_msgs.msg.Target import x [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 x [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 x [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 x [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 x [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 x [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 x [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 x [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 x [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.x方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。