From b82114d80d6030d2a0432bcc82137465a75716f7 Mon Sep 17 00:00:00 2001 From: Sebastian Castro Date: Wed, 17 Jul 2024 21:06:19 -0400 Subject: [PATCH] Fix test --- .../test_robotiq_gripper_hardware_interface.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/robotiq_driver/tests/test_robotiq_gripper_hardware_interface.cpp b/robotiq_driver/tests/test_robotiq_gripper_hardware_interface.cpp index fb7a71b..0eb8da6 100644 --- a/robotiq_driver/tests/test_robotiq_gripper_hardware_interface.cpp +++ b/robotiq_driver/tests/test_robotiq_gripper_hardware_interface.cpp @@ -40,6 +40,7 @@ #include #include +#include #include namespace robotiq_driver::test @@ -83,10 +84,20 @@ TEST(TestRobotiqGripperHardwareInterface, load_urdf) )"; - hardware_interface::ResourceManager rm(urdf); + rclcpp::Node node{ "test_robotiq_gripper_hardware_interface" }; + + // Initialize the resource manager + hardware_interface::ResourceManager rm(urdf, node.get_node_clock_interface(), node.get_node_logging_interface()); // Check interfaces EXPECT_EQ(1u, rm.system_components_size()); } } // namespace robotiq_driver::test + +int main(int argc, char** argv) +{ + rclcpp::init(argc, argv); + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +}