|
17 | 17 |
|
18 | 18 |
|
19 | 19 | import unittest |
20 | | -import pybullet |
21 | 20 |
|
| 21 | +import pybullet |
| 22 | +from robot_descriptions.loaders.idyntree import ( |
| 23 | + load_robot_description as load_idyntree, |
| 24 | +) |
22 | 25 | from robot_descriptions.loaders.mujoco import ( |
23 | 26 | load_robot_description as load_mujoco, |
24 | 27 | ) |
|
34 | 37 | from robot_descriptions.loaders.yourdfpy import ( |
35 | 38 | load_robot_description as load_yourdfpy, |
36 | 39 | ) |
37 | | -from robot_descriptions.loaders.idyntree import ( |
38 | | - load_robot_description as load_idyntree, |
39 | | -) |
| 40 | + |
40 | 41 |
|
41 | 42 | class TestLoaders(unittest.TestCase): |
42 | 43 |
|
43 | 44 | """ |
44 | 45 | Test loaders. |
45 | 46 | """ |
46 | 47 |
|
| 48 | + upkie_description_commit = "98502d5b175c3d6b60b3cf475b7eeef9fd290c43" |
| 49 | + |
47 | 50 | def test_mujoco(self): |
48 | 51 | self.assertIsNotNone(load_mujoco("cassie_mj_description")) |
49 | 52 |
|
50 | 53 | def test_pinocchio(self): |
51 | | - self.assertIsNotNone(load_pinocchio("upkie_description")) |
| 54 | + self.assertIsNotNone( |
| 55 | + load_pinocchio( |
| 56 | + "upkie_description", |
| 57 | + commit=self.upkie_description_commit, |
| 58 | + ) |
| 59 | + ) |
52 | 60 |
|
53 | 61 | def test_pybullet(self): |
54 | 62 | pybullet.connect(pybullet.DIRECT) |
55 | | - self.assertIsNotNone(load_pybullet("upkie_description")) |
| 63 | + self.assertIsNotNone( |
| 64 | + load_pybullet( |
| 65 | + "upkie_description", |
| 66 | + commit=self.upkie_description_commit, |
| 67 | + ) |
| 68 | + ) |
56 | 69 | pybullet.disconnect() |
57 | 70 |
|
58 | 71 | def test_robomeshcat(self): |
59 | | - self.assertIsNotNone(load_robomeshcat("upkie_description")) |
| 72 | + self.assertIsNotNone( |
| 73 | + load_robomeshcat( |
| 74 | + "upkie_description", |
| 75 | + commit=self.upkie_description_commit, |
| 76 | + ) |
| 77 | + ) |
60 | 78 |
|
61 | 79 | def test_yourdfpy(self): |
62 | | - self.assertIsNotNone(load_yourdfpy("upkie_description")) |
| 80 | + self.assertIsNotNone( |
| 81 | + load_yourdfpy( |
| 82 | + "upkie_description", |
| 83 | + commit=self.upkie_description_commit, |
| 84 | + ) |
| 85 | + ) |
63 | 86 |
|
64 | 87 | def test_idyntree(self): |
65 | | - self.assertIsNotNone(load_idyntree("upkie_description")) |
| 88 | + self.assertIsNotNone( |
| 89 | + load_idyntree( |
| 90 | + "upkie_description", |
| 91 | + commit=self.upkie_description_commit, |
| 92 | + ) |
| 93 | + ) |
0 commit comments