Exemplo n.º 1
0
def test_mimic_calculate_position():
    multiplier = 5.0
    offset = 100.
    j1 = Joint('j1', 'prismatic', None, None, axis=Axis('1 0 0'))
    j1.position = 200
    mimic = Mimic(j1, multiplier=multiplier, offset=offset)
    result = mimic.calculate_position(j1.position)
    assert result == multiplier * j1.position + offset
Exemplo n.º 2
0
def test_prismatic_calculate_transformation():
    limit = Limit(lower=0, upper=1000)
    j1 = Joint('j1', 'prismatic', None, None, axis=Axis('1 0 0'), limit=limit)
    t = j1.calculate_transformation(550)
    assert t == Translation([550, 0, 0])