Пример #1
0
def test_pair_ego_precursor():
    geometry = Geometry(*get_precursor_model())
    sender = Sender()
    scanner = PairScanner(
        send=sender,
        geometry1=geometry,
        geometry2=None,
        action_radius=5.0,
        hit_tolerance=0.1,
        rotation2=None,
    )
    scanner.run()
Пример #2
0
def test_pair_ego_precursor_rot():
    geometry = Geometry(*get_precursor_model())
    rot = Rotation.from_properties(-0.5*np.pi, [-1, 1, 0], False)
    sender = Sender()
    scanner = PairScanner(
        send=sender,
        geometry1=geometry,
        geometry2=None,
        action_radius=10.0,
        hit_tolerance=0.1,
        rotation2=rot,
    )
    scanner.run()
Пример #3
0
def test_pair_ego_simple():
    geometry = Geometry(*get_simple_model1())
    sender = Sender()
    scanner = PairScanner(
        send=sender,
        geometry1=geometry,
        geometry2=None,
        action_radius=10.0,
        hit_tolerance=0.1,
        rotation2=None,
    )
    scanner.run()
    assert len(sender.connections) == 1
Пример #4
0
def test_pair_simple_rot():
    geometry1 = Geometry(*get_simple_model1())
    geometry2 = Geometry(*get_simple_model2())
    rot = Rotation.from_properties(-0.5*np.pi, [0, 1, 0], False)
    sender = Sender()
    scanner = PairScanner(
        send=sender,
        geometry1=geometry1,
        geometry2=geometry2,
        action_radius=10.0,
        hit_tolerance=0.1,
        rotation2=rot,
    )
    scanner.run()
    assert len(sender.connections) == 2