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


Python CSpace.__init__方法代碼示例

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


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

示例1: __init__

# 需要導入模塊: from klampt.cspace import CSpace [as 別名]
# 或者: from klampt.cspace.CSpace import __init__ [as 別名]
 def __init__(self,planner,limb):
     CSpace.__init__(self)
     self.planner = planner
     self.limb = limb
     #TODO: what Cartesian bounding box should the planner sample from?
     self.bound = [(0,1),(0,1)]
     #TODO: what collision tolerance to use?
     self.eps = 1e-2
開發者ID:ChenyuLInx,項目名稱:ece490-s2016,代碼行數:10,代碼來源:hw4_planner.py

示例2: __init__

# 需要導入模塊: from klampt.cspace import CSpace [as 別名]
# 或者: from klampt.cspace.CSpace import __init__ [as 別名]
 def __init__(self,planner,limb):
     CSpace.__init__(self)
     self.planner = planner
     self.limb = limb
     # set up a search space based on the robot 1 m x 2 m x 2 m
     (R, t) = self.planner.robot.getLink(0).getParentTransform()
     self.bound = self.bounds = [(t[0]-1, t[0]+2), (t[1]-2, t[2]+2), (0, 3)]
     self.eps = 1e-2
     self.ignore = None
開發者ID:ChenyuLInx,項目名稱:ece490-s2016,代碼行數:11,代碼來源:hw4_planner_mtd13.py

示例3: __init__

# 需要導入模塊: from klampt.cspace import CSpace [as 別名]
# 或者: from klampt.cspace.CSpace import __init__ [as 別名]
 def __init__(self):
     CSpace.__init__(self)
     #set bounds
     self.bound = [(0.0,1.0),(0.0,1.0),(0.0,math.pi*2)]
     #set collision checking resolution
     self.eps = 1e-3
     #setup a bar with length 0.1
     self.L = 0.1
     #set obstacles here
     self.obstacles = []
開發者ID:haewon-mit,項目名稱:Klampt,代碼行數:12,代碼來源:ex.py

示例4: __init__

# 需要導入模塊: from klampt.cspace import CSpace [as 別名]
# 或者: from klampt.cspace.CSpace import __init__ [as 別名]
 def __init__(self,planner,limb):
     CSpace.__init__(self)
     self.planner = planner
     '''
     :type self.planner: LimbPlanner
     '''
     self.limb = limb
     #TODO: what Cartesian bounding box should the planner sample from?
     self.bound = [(-pi,pi),(-pi,pi),(-pi,pi),(-pi,pi),(-pi,pi),(-pi,pi),(-pi,pi)]
     #TODO: what collision tolerance to use?
     self.eps = 1e-2
開發者ID:ChenyuLInx,項目名稱:ece490-s2016,代碼行數:13,代碼來源:hw4_planner.py

示例5: __init__

# 需要導入模塊: from klampt.cspace import CSpace [as 別名]
# 或者: from klampt.cspace.CSpace import __init__ [as 別名]
    def __init__(self,planner):
        CSpace.__init__(self)
        self.planner = planner

        #TODO: what Cartesian bounding box should the planner sample from?
        self.robot = self.planner.robot
        id_to_index = dict([(self.robot.link(i).getID(),i) for i in range(self.robot.numLinks())])

        qmin,qmax = self.robot.getJointLimits()
        self.bound = [(qmin[i],qmax[i]) for i in range(self.robot.numLinks())]
        self.eps = 1e-3
開發者ID:hshyunsookim,項目名稱:grasp_clustering,代碼行數:13,代碼來源:planner.py

示例6: __init__

# 需要導入模塊: from klampt.cspace import CSpace [as 別名]
# 或者: from klampt.cspace.CSpace import __init__ [as 別名]
 def __init__(self,globals,hand):
     CSpace.__init__(self)
     self.globals = globals
     self.robot = globals.robot
     self.hand = hand
     #initial whole-body configuratoin
     self.q0 = self.robot.getConfig()
     #setup CSpace sampling range
     qlimits = zip(*self.robot.getJointLimits())
     self.bound = [qlimits[i] for i in self.hand.armIndices]
     #setup CSpace edge checking epsilon
     self.eps = 1e-2
開發者ID:arocchi,項目名稱:Klampt,代碼行數:14,代碼來源:ex.py

示例7: __init__

# 需要導入模塊: from klampt.cspace import CSpace [as 別名]
# 或者: from klampt.cspace.CSpace import __init__ [as 別名]
 def __init__(self,planner,limb):
     CSpace.__init__(self)
     self.planner = planner
     self.limb = limb
     #TODO: what Cartesian bounding box should the planner sample from?
     self.robot = self.planner.robot
     id_to_index = dict([(self.robot.link(i).getID(),i) for i in range(self.robot.numLinks())])
     if limb=='left':
         self.limb_indices = [id_to_index[i.getID()] for i in planner.left_arm_links]
     else:
         self.limb_indices = [id_to_index[i.getID()] for i in planner.right_arm_links]
     qmin,qmax = self.robot.getJointLimits()
     self.bound = [(qmin[i]-1e-6,qmax[i]+1e-6) for i in self.limb_indices]
     self.eps = 1e-1
開發者ID:duke-iml,項目名稱:ece490-s2016,代碼行數:16,代碼來源:hw4_planner_impl.py

示例8: __init__

# 需要導入模塊: from klampt.cspace import CSpace [as 別名]
# 或者: from klampt.cspace.CSpace import __init__ [as 別名]
 def __init__(self, planner, limb):
     CSpace.__init__(self)
     self.planner = planner
     self.limb = limb
     # TODO: what Cartesian bounding box should the planner sample from?
     self.robot = self.planner.robot
     id_to_index = dict([(self.robot.link(i).getID(), i) for i in range(self.robot.numLinks())])
     if limb == "left":
         # self.limb_indices = left_arm_geometry_indices + left_hand_geometry_indices
         self.limb_indices = self.planner.left_arm_indices
     else:
         # self.limb_indices = right_arm_geometry_indices + right_hand_geometry_indices
         self.limb_indices = self.planner.right_arm_indices
     qmin, qmax = self.robot.getJointLimits()
     self.bound = [(qmin[i] - 1e-6, qmax[i] + 1e-6) for i in self.limb_indices]
     self.eps = 1e-1
開發者ID:duke-iml,項目名稱:ece490-s2016,代碼行數:18,代碼來源:motionPlanner.py

示例9: __init__

# 需要導入模塊: from klampt.cspace import CSpace [as 別名]
# 或者: from klampt.cspace.CSpace import __init__ [as 別名]
 def __init__(self):
     CSpace.__init__(self)
     self.extra_feasibility_tests = []
開發者ID:duke-iml,項目名稱:ece490-s2016,代碼行數:5,代碼來源:planner.py


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