def __init__(self, world, robot): GLWidgetPlugin.__init__(self) self.world = world self.robot = robot assert robot.index == 0, "Can only work with the 0'th robot in the world" self.resolution = RedundancyResolutionGraph(world) self.mode = 'interpolate' self.configs = None self.folder = None self.settings = None self.drawWorkspaceRoadmap = False self.solveConstraint = True self.clippingplanes = (0.1, 50) self.rotationAsDepth = False self.pointWidget = PointPoser() self.xformWidget = TransformPoser() self.roadmapDisplayList = CachedGLObject() self.disconnectionDisplayList = CachedGLObject() self.movie_frame = None self.movie_rotate = False self.walk_path = None self.walk_workspace_path = None self.walk_progress = None self.temp_config = None self.useboundary = None
def __init__(self, world): GLWidgetPlugin.__init__(self) self.world = world self.poseWidget = PointPoser() self.robotWidget = RobotPoser(world.robot(0)) self.addWidget(self.poseWidget) self.addWidget(self.robotWidget)
def __init__(self,world): GLWidgetPlugin.__init__(self) self.world = world self.poseWidget = PointPoser() self.robotWidget = RobotPoser(world.robot(0)) self.addWidget(self.poseWidget) self.addWidget(self.robotWidget) self.add_action(self.print_config,'Print config',' ') self.add_action(self.save_world,'Save world','s')
def __init__(self,taskGen): GLWidgetPlugin.__init__(self) self.world = taskGen.world self.sendMilestone = False self.initialPose = False self.tuckArmPose = False self.selectedLimb = "both" self.gripperControl = False self.gripperState = "open" self.trackPosition = False self.trackPosition_lastState = False
def __init__(self, world): GLWidgetPlugin.__init__(self) self.world = world self.robot = world.robot(0) self.subrobots = [] for i in range(6): self.subrobots.append( SubRobotModel(self.robot, list(range(6 + i * 6, 12 + i * 6)))) (res, val) = editors.run( editors.SelectionEditor("subrobot", self.subrobots[0]._links, description="sub robot links", world=world, robot=self.robot)) if res: print("Return value", val) self.subrobots[0]._links = val self.startConfig = self.robot.getConfig() self.robotWidget = RobotPoser(world.robot(0)) self.robotWidget.setActiveDofs(self.subrobots[0]._links) self.addWidget(self.robotWidget)
def __init__(self, world, object): GLWidgetPlugin.__init__(self) from klampt.model.collide import WorldCollider from klampt.plan.rigidobjectcspace import RigidObjectCSpace from klampt import ObjectPoser self.world = world self.object = object self.space = RigidObjectCSpace(object, collider=WorldCollider(world)) self.costFunction = None self.start = None self.goal = None self.startWidget = ObjectPoser(self.object) self.goalWidget = ObjectPoser(self.object) self.addWidget(self.startWidget) self.addWidget(self.goalWidget) self.optimizingPlanner = True self.path = [] self.G = None
def __init__(self, taskGen): GLWidgetPlugin.__init__(self) self.world = taskGen.world self.sendMilestone = False self.initialPose = False