Ejemplo n.º 1
0
rrt.set_goal_test(goal_test)
rrt.set_sample(sample)
rrt.set_collision_free(lqr_rrt.collision_free)

rrt.set_distance_from_goal(distance_from_goal)

rrt.gamma_rrt = 1.0
rrt.eta = .2
rrt.c = 1
rrt.max_nodes_in_ball = 30

lqr_rrt.max_steer_cost = .015

rrt.set_start(start)
rrt.init_search()


def draw(rrt, ani_ax=None):
    if ani_ax is None:
        ani_ax = plt.figure().gca()

    ani_ax.cla()
    ani_ax.set_xlim(-10, 110)
    ani_ax.set_ylim(-10, 110)
    #ani_ax.set_aspect('equal')
    #ani_ax.set_aspect('auto')

    #should be able to move this out, but patch transforms get stuck and the obstacles don't pan/zoom
    obstacles_patches = [PolygonPatch(poly) for poly in obstacles_polys]
    obstacle_patch_collection = PatchCollection(obstacles_patches)
Ejemplo n.º 2
0
rrt.set_goal_test(goal_test)
rrt.set_sample(sample)
rrt.set_collision_free(lqr_rrt.collision_free)

rrt.set_distance_from_goal(distance_from_goal)


rrt.gamma_rrt = 1.0
rrt.eta = .2
rrt.c = 1
rrt.max_nodes_in_ball = 30

lqr_rrt.max_steer_cost = .015

rrt.set_start(start)
rrt.init_search()

def draw(rrt,ani_ax=None):
    if ani_ax is None:
        ani_ax = plt.figure().gca()
   
    ani_ax.cla()
    ani_ax.set_xlim(-10,110)
    ani_ax.set_ylim(-10,110)
    #ani_ax.set_aspect('equal')
    #ani_ax.set_aspect('auto')

    #should be able to move this out, but patch transforms get stuck and the obstacles don't pan/zoom
    obstacles_patches = [PolygonPatch(poly) for poly in obstacles_polys]
    obstacle_patch_collection = PatchCollection(obstacles_patches)