Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 48c539c

Browse files
committed
[tests] use example_robot_data.load_full to get urdf path
1 parent 526105e commit 48c539c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ ADD_PROJECT_DEPENDENCY(sot-tools REQUIRED)
3636

3737
IF(BUILD_TESTING)
3838
FIND_PACKAGE(Boost REQUIRED COMPONENTS unit_test_framework)
39-
ADD_PROJECT_DEPENDENCY(example-robot-data)
39+
ADD_PROJECT_DEPENDENCY(example-robot-data 3.8.0 REQUIRED)
4040
ENDIF(BUILD_TESTING)
4141

4242
IF(BUILD_PYTHON_INTERFACE)

tests/python/humanoid_robot.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
from dynamic_graph.sot.dynamic_pinocchio import DynamicPinocchio
99
from dynamic_graph.sot.dynamic_pinocchio.humanoid_robot import AbstractHumanoidRobot
1010

11+
from example_robot_data import load_full
12+
1113

1214
class Robot(AbstractHumanoidRobot):
1315
def __init__(self, name, urdfString=None, urdfFile=None):
@@ -26,10 +28,9 @@ def defineHalfSitting(self, q):
2628

2729
class HumanoidRobotTest(unittest.TestCase):
2830
def setUp(self):
29-
from example_robot_data.path import EXAMPLE_ROBOT_DATA_MODEL_DIR
30-
self.urdf_file_name = EXAMPLE_ROBOT_DATA_MODEL_DIR + \
31-
'/talos_data/robots/talos_reduced.urdf'
3231
self.name = "talos"
32+
_, _, urdf, _ = load_full(self.name)
33+
self.urdf_file_name = urdf
3334

3435
def test_non_instanciable_robot(self):
3536
class NonInstanciableRobot(AbstractHumanoidRobot):

0 commit comments

Comments
 (0)