コード例 #1
0
def test_SetGetAngularSpeedVector_fails():
    kine = Kinematic()
    with pytest.raises(TypeError):
        kine.w = 1
    with pytest.raises(TypeError):
        kine.w = None
    with pytest.raises(ValueError):
        kine.w = (1, 0, 0, 0)
コード例 #2
0
def test_SetGetLinearAcceleration_fails():
    kine = Kinematic()
    with pytest.raises(TypeError):
        kine.w = 1
    with pytest.raises(TypeError):
        kine.w = None
    with pytest.raises(ValueError):
        kine.w = (1, 0, 0, 0)
コード例 #3
0
def test_SetGetAngularSpeedVector_random():
    kine = Kinematic()
    Ntests = 100
    for i in range(Ntests):
        new_speed = np.random.rand(3)
        kine.w = new_speed
        np.testing.assert_almost_equal(new_speed, kine.w)
コード例 #4
0
def test_SetGetLinearAcceleration_standard():
    kine = Kinematic()
    kine.w = (0, 0, 5)
コード例 #5
0
def test_SetGetLinearSpeed_standard():
    kine = Kinematic()
    kine.w = (0, 0, 5)
コード例 #6
0
def test_SetGetAngularSpeedVector_standard():
    kine = Kinematic()
    kine.w = (0, 0, 3)
コード例 #7
0
def test_SetGetAngularPositionVector_standard():
    kine = Kinematic()
    kine.w = (0, 0, 5)