Skip to content

Commit

Permalink
Use the same random seed when comparing RRT and RRT* in tests (sea-ba…
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass committed May 17, 2024
1 parent 48c87cf commit ac40298
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/planning/test_rrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def test_plan_rrt_star():
path_original = planner.plan(q_start, q_goal)

# Then, plan with RRT* enabled (use maximum rewire distance for effect).
# Note we need to reset the seed so the nominal plans are equivalent.
np.random.seed(1234)
options.rrt_star = True
options.max_rewire_dist = np.inf
planner = RRTPlanner(model, collision_model, options=options)
Expand Down

0 comments on commit ac40298

Please sign in to comment.