Esempio n. 1
0
def local_check_path(state1, state2):
    it = local_planner.plan_path(state1, state2)

    path_planner_util.check_it_equal_to_state(it, state1)
    it.advance(it.travel_time)
    assert (it.finished())
    path_planner_util.check_it_equal_to_state(it, state2)
    it.reset()
    path_planner_util.check_it_equal_to_state(it, state1)

    path_planner_util.check_path(it)

    assert (it.finished())
    path_planner_util.check_it_equal_to_state(it, state2)
Esempio n. 2
0
def check_path(states):
    times = [local_planner.plan_path(s1, s2).travel_time
             for s1, s2 in zip(states[:-1], states[1:])]

    it = prm._PathIterator(states)
    path_planner_util.check_it_equal_to_state(it, states[0])

    for time, state in zip(times, states[1:]):
        it.advance(time)
        path_planner_util.check_it_equal_to_state(it, state)

    it.reset()

    path_planner_util.check_path(it)
Esempio n. 3
0
def local_check_path(state1, state2):
    it = local_planner.plan_path(state1, state2)

    path_planner_util.check_it_equal_to_state(it, state1)
    it.advance(it.travel_time)
    assert(it.finished())
    path_planner_util.check_it_equal_to_state(it, state2)
    it.reset()
    path_planner_util.check_it_equal_to_state(it, state1)

    path_planner_util.check_path(it)

    assert(it.finished())
    path_planner_util.check_it_equal_to_state(it, state2)
Esempio n. 4
0
def check_path(states):
    times = [
        local_planner.plan_path(s1, s2).travel_time
        for s1, s2 in zip(states[:-1], states[1:])
    ]

    it = prm._PathIterator(states)
    path_planner_util.check_it_equal_to_state(it, states[0])

    for time, state in zip(times, states[1:]):
        it.advance(time)
        path_planner_util.check_it_equal_to_state(it, state)

    it.reset()

    path_planner_util.check_path(it)