Unverified Commit 76446720 authored by Guilhem Saurel's avatar Guilhem Saurel Committed by GitHub
Browse files

Merge pull request #191 from nim65s/topic/tests

[test] update use of example_robot_data to 3.8.0
parents 3bb26c45 dc80579b
Pipeline #15895 passed with stage
in 46 minutes and 32 seconds
......@@ -39,7 +39,7 @@ ADD_PROJECT_DEPENDENCY(dynamic-graph REQUIRED)
ADD_PROJECT_DEPENDENCY(pinocchio REQUIRED)
ADD_PROJECT_DEPENDENCY(Boost REQUIRED COMPONENTS regex)
IF(BUILD_TESTING)
ADD_PROJECT_DEPENDENCY(example-robot-data)
ADD_PROJECT_DEPENDENCY(example-robot-data 3.8.0)
FIND_PACKAGE(Boost REQUIRED COMPONENTS unit_test_framework program_options)
ENDIF()
......
import sys
import unittest
import pinocchio as pin
import parameter_server_conf as param_server_conf
from os.path import abspath, dirname, join
from dynamic_graph.sot.core.parameter_server import ParameterServer
import sys
from os.path import dirname, join, abspath
from example_robot_data import load_full
# Switch pinocchio to numpy matrix
pin.switchToNumpyMatrix()
import parameter_server_conf as param_server_conf
param_server = ParameterServer("param_server")
param_server.init(0.001, "talos.urdf", "talos")
......@@ -25,14 +24,9 @@ class TestParameterServer(unittest.TestCase):
path = join(dirname(dirname(abspath(__file__))), 'models', 'others', 'python')
sys.path.append(path)
from example_robot_data.path import EXAMPLE_ROBOT_DATA_MODEL_DIR
urdf_file_name = EXAMPLE_ROBOT_DATA_MODEL_DIR + \
'/talos_data/robots/talos_reduced.urdf'
fs = open(urdf_file_name, 'r')
urdf_rrbot_model_string = fs.read()
fs.close()
_, _, urdf_file_name, _ = load_full('talos')
with open(urdf_file_name) as fs:
urdf_rrbot_model_string = fs.read()
param_server.setParameter("/robot_description", urdf_rrbot_model_string)
model2_string = param_server.getParameter("/robot_description")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment