10 from example_robot_data
import load_full
14 def check(self, name, expected_nq, expected_nv, one_kg_bodies=[]):
15 """Helper function for the real tests""" 16 robot, _, urdf, _ =
load_full(name, display=
False)
17 self.assertEqual(robot.model.nq, expected_nq)
18 self.assertEqual(robot.model.nv, expected_nv)
19 self.assertTrue(hasattr(robot,
"q0"))
24 client_id = pybullet.connect(pybullet.DIRECT)
25 robot_id = pybullet.loadURDF(urdf, physicsClientId=client_id)
26 for joint_id
in range(pybullet.getNumJoints(robot_id, client_id)):
27 dynamics = pybullet.getDynamicsInfo(robot_id, joint_id, client_id)
29 joint = pybullet.getJointInfo(robot_id, joint_id, client_id)
32 self.assertIn(joint[12].decode(), one_kg_bodies)
33 pybullet.disconnect(client_id)
36 self.
check(
"a1", 19, 18)
39 self.
check(
"anymal", 19, 18)
42 self.
check(
"anymal_kinova", 25, 24)
45 self.
check(
"baxter", 19, 19)
49 self.
check(
"cassie", 29, 28)
53 self.assertLess(int(pinocchio.__version__.split(
".")[0]), 3)
56 self.
check(
"double_pendulum", 2, 2)
59 self.
check(
"double_pendulum_continuous", 4, 2)
62 self.
check(
"double_pendulum_simple", 2, 2)
65 self.
check(
"asr_twodof", 2, 2, one_kg_bodies=[
"ground"])
68 self.
check(
"hector", 7, 6)
71 self.
check(
"hyq", 19, 18)
74 self.
check(
"icub", 39, 38)
77 self.
check(
"icub_reduced", 36, 35)
80 self.
check(
"iris", 7, 6)
83 self.
check(
"kinova", 9, 6)
86 self.
check(
"panda", 9, 9)
89 self.
check(
"romeo", 62, 61)
93 "simple_humanoid", 36, 35, one_kg_bodies=[
"LARM_LINK3",
"RARM_LINK3"]
98 "simple_humanoid_classical",
101 one_kg_bodies=[
"LARM_LINK3",
"RARM_LINK3"],
105 self.
check(
"bolt", 13, 12)
108 self.
check(
"solo8", 15, 14)
111 self.
check(
"solo12", 19, 18)
114 self.
check(
"finger_edu", 3, 3, one_kg_bodies=[
"finger_base_link"])
117 self.
check(
"talos", 39, 38)
120 self.
check(
"laikago", 19, 18)
123 self.
check(
"talos_box", 39, 38)
126 self.
check(
"talos_full", 51, 50)
129 self.
check(
"talos_full_box", 51, 50)
132 self.
check(
"talos_arm", 7, 7)
135 self.
check(
"talos_legs", 19, 18)
138 self.
check(
"tiago", 50, 48)
141 self.
check(
"tiago_dual", 111, 101)
144 self.
check(
"tiago_no_hand", 14, 12)
147 self.
check(
"ur3", 6, 6)
150 self.
check(
"ur3_gripper", 6, 6)
153 self.
check(
"ur3_limited", 6, 6)
156 self.
check(
"ur5", 6, 6)
159 self.
check(
"ur5_gripper", 6, 6)
162 self.
check(
"ur5_limited", 6, 6)
165 self.
check(
"ur10", 6, 6)
168 self.
check(
"ur10_limited", 6, 6)
171 if __name__ ==
"__main__":
def test_talos_full_box(self)
def test_ur5_gripper(self)
def check_pybullet(self, urdf, one_kg_bodies)
def test_tiago_dual(self)
def test_icub_reduced(self)
def test_ur3_gripper(self)
def test_talos_full(self)
def test_talos_legs(self)
def test_anymal_kinova(self)
def test_double_pendulum_simple(self)
def test_tiago_no_hand(self)
def test_ur3_limited(self)
def test_ur10_limited(self)
def test_simple_humanoid_classical(self)
def test_double_pendulum_continuous(self)
def load_full(name, display=False, rootNodeName="")
def test_double_pendulum(self)
def test_simple_humanoid(self)
def test_finger_edu(self)
def check(self, name, expected_nq, expected_nv, one_kg_bodies=[])
def test_ur5_limited(self)