diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7ffb1d8549c16413cd4b2230912000cb146aa91e..ecf044ce393e37a856857bab7c1b833bb75012f2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -14,7 +14,6 @@ if(BUILD_TESTING) add_library(impl_test_sot_mock_device SHARED impl_test_sot_mock_device.cpp) set_target_properties(impl_test_sot_mock_device PROPERTIES INSTALL_RPATH $ORIGIN) - # target_include_directories(impl_test_sot_mock_device PUBLIC include) target_link_libraries( impl_test_sot_mock_device PUBLIC sot-core::sot-core dynamic-graph-python::dynamic-graph-python) @@ -32,15 +31,12 @@ if(BUILD_TESTING) dynamic_graph_bridge-impl_test_sot_mock_device-wrap SOURCE_PYTHON_MODULE "${CMAKE_CURRENT_SOURCE_DIR}/impl_test_sot_mock_device-python-module-py.cc") - install( - TARGETS ${plugin_library_name} - EXPORT ${TARGETS_EXPORT_NAME} - DESTINATION ${DYNAMIC_GRAPH_PLUGINDIR}) # Library for sot_external_interface add_library(impl_test_library SHARED impl_test_sot_external_interface.cpp) target_include_directories(impl_test_library PUBLIC include) - target_link_libraries(impl_test_library PUBLIC sot-core::sot-core) + target_link_libraries(impl_test_library PUBLIC impl_test_sot_mock_device + sot-core::sot-core) ament_target_dependencies(impl_test_library PUBLIC dynamic_graph_bridge_msgs rclcpp rcl_interfaces std_srvs) # Executable for SotLoaderBasic test diff --git a/tests/launch/launching_test_sot_loader.py b/tests/launch/launching_test_sot_loader.py index cb713bc1cd455ffd70122b1e5e12886455a4a11b..2080ad0e8c85a737158d9dabb6ebefc7e9bff7f5 100644 --- a/tests/launch/launching_test_sot_loader.py +++ b/tests/launch/launching_test_sot_loader.py @@ -31,7 +31,7 @@ from launch_ros.actions import Node def generate_test_description(): """Load a simple urdf, parameters and the library.""" ld = LaunchDescription() - + print("After launch description") robot_description_content_path = PathJoinSubstitution( [ get_package_share_directory("dynamic_graph_bridge"), @@ -39,11 +39,10 @@ def generate_test_description(): "dgb_minimal_robot.urdf", ], ) - - robot_description_content = Path.open( - robot_description_content_path.perform(None), - ).read() - + print("Before robot_description_content") + robot_description_content_path = Path(robot_description_content_path.perform(None)) + robot_description_content = robot_description_content_path.open().read() + print("Before params") params = { "state_vector_map": ["joint1", "joint2"], "robot_description": robot_description_content, diff --git a/tests/launch/launching_test_sot_loader_basic.py b/tests/launch/launching_test_sot_loader_basic.py index 5a6eba4d557d7748fb1e41453de9981fae5643b2..13b5ad1037c27ff098230c4a5271a6723dd0fc5c 100644 --- a/tests/launch/launching_test_sot_loader_basic.py +++ b/tests/launch/launching_test_sot_loader_basic.py @@ -33,17 +33,19 @@ def generate_test_description(): It also set parameters state_vector_map and robot_description """ + print("start generate_test_description") ld = LaunchDescription() - robot_description_content_path = ( - Path(get_package_share_directory("dynamic_graph_bridge")) - / "urdf" - / "dgb_minimal_robot.urdf" + robot_description_pathjs_str = PathJoinSubstitution( + [ + get_package_share_directory("dynamic_graph_bridge"), + "urdf", + "dgb_minimal_robot.urdf", + ], ) - assert robot_description_content_path.exists() - robot_description_content = Path.open( - PathJoinSubstitution(str(robot_description_content_path)).perform(None), - ).read() + robot_description_path = Path(robot_description_pathjs_str.perform(None)) + robot_description_content = robot_description_path.open().read() + print("After building robot_description_content") terminating_process = Node( package="dynamic_graph_bridge", executable="test_sot_loader_basic",