示例#1
0
def UprightState():
    state = AcrobotState()
    state.set_theta1(np.pi)
    state.set_theta2(0.)
    state.set_theta1dot(0.)
    state.set_theta2dot(0.)
    return state
def UprightState():
    state = AcrobotState()
    state.set_theta1(math.pi)
    state.set_theta2(0.)
    state.set_theta1dot(0.)
    state.set_theta2dot(0.)
    return state
示例#3
0
 def test_state(self):
     state = AcrobotState()
     state.set_theta1(1.)
     state.set_theta1dot(2.)
     state.set_theta2(3.)
     state.set_theta2dot(4.)
     self.assertEqual(state.theta1(), 1.)
     self.assertEqual(state.theta1dot(), 2.)
     self.assertEqual(state.theta2(), 3.)
     self.assertEqual(state.theta2dot(), 4.)
示例#4
0
 def test_state(self):
     state = AcrobotState()
     state.set_theta1(1.)
     state.set_theta1dot(2.)
     state.set_theta2(3.)
     state.set_theta2dot(4.)
     self.assertEqual(state.theta1(), 1.)
     self.assertEqual(state.theta1dot(), 2.)
     self.assertEqual(state.theta2(), 3.)
     self.assertEqual(state.theta2dot(), 4.)