def gen_waypoint(self, bounds, maxiter=100): for i in range(self.params.multi_initialization): waypoint = None for j in range(maxiter): waypoint = bound.sample(bounds) with self.robot: self.robot.SetActiveDOFValues(waypoint) if not self.env.CheckCollision(self.robot): break yield waypoint
def random_goal(self): return bound.sample(self.bounds)