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


Python Action.props["y"]方法代碼示例

本文整理匯總了Python中Action.Action.props["y"]方法的典型用法代碼示例。如果您正苦於以下問題:Python Action.props["y"]方法的具體用法?Python Action.props["y"]怎麽用?Python Action.props["y"]使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Action.Action的用法示例。


在下文中一共展示了Action.props["y"]方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: bootstrap

# 需要導入模塊: from Action import Action [as 別名]
# 或者: from Action.Action import props["y"] [as 別名]
	def bootstrap(self, caller=None):
		"""Perform all basic reaches and other actions
		(grasps, presses, observes, etc.) to provide the
		schema memory with the lowest level set of actions."""
		#status = self.memory.update_world_state(self.get_sensors())
		print "Bootstrap Update state"
		for y in range(0,7):#7
			for x in range(0, 9):#9
				if (x>1 and x<7 and y>0 and y<6):
					reach = Action()
					reach.name = "reach"
					reach.props["x"] = float(x)
					reach.props["y"] = float(y)
					reach.connect("abstract_signal", self.abstract_action)
					self.bootstrap_action(reach)
				saccade = Action()
				saccade.name = "saccade"
				saccade.props["x"] = float(x)
				saccade.props["y"] = float(y)
				#saccade.connect("abstract_signal", self.abstract_action)
				#self.bootstrap_action(saccade)
		grasp = Action()
		grasp.name = "grasp"
		grasp.connect("abstract_signal", self.abstract_action)
		#self.bootstrap_action(grasp)
		release = Action()
		release.name = "release"
		release.connect("abstract_signal", self.abstract_action)
		#self.bootstrap_action(release)
		press = Action()
		press.name = "press"
		press.connect("abstract_signal", self.abstract_action)
開發者ID:kumar54,項目名稱:Dev-PSchema,代碼行數:34,代碼來源:Controller.py


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