Beispiel #1
0
 def test_pr2(self):
     pr2_robot = robots.PR2()
     env = Environment()
     # env.SetViewer("qtcoin")
     robot = env.ReadRobotXMLFile(pr2_robot.shape)
     env.Add(robot)
     dof_val = robot.GetActiveDOFValues()
     init_dof = np.zeros((39,))
     self.assertTrue(np.allclose(dof_val, init_dof, 1e-6))
Beispiel #2
0
    def test_basic(self):
        pr2_robot = pr2.PR2()
        env = Environment()
        robot = env.ReadRobotXMLFile(pr2_robot.shape)
        env.Add(robot)
        dof_val = robot.GetActiveDOFValues()
        init_dof = np.array([
            0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
            0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
            0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
            0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
            0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
            0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 2.77555756e-17,
            0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
            0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
            0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 2.77555756e-17,
            0.00000000e+00, 0.00000000e+00, 0.00000000e+00
        ])

        self.assertTrue(np.allclose(dof_val, init_dof, 1e-6))