Exemplo 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)
Exemplo 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)
Exemplo 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)
Exemplo 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)