Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass committed Jul 18, 2024
1 parent 84dfd50 commit b82114d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion robotiq_driver/tests/test_robotiq_gripper_hardware_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <hardware_interface/types/lifecycle_state_names.hpp>

#include <lifecycle_msgs/msg/state.hpp>
#include <rclcpp/node.hpp>
#include <rclcpp_lifecycle/state.hpp>

namespace robotiq_driver::test
Expand Down Expand Up @@ -83,10 +84,20 @@ TEST(TestRobotiqGripperHardwareInterface, load_urdf)
</robot>
)";

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();
}

0 comments on commit b82114d

Please sign in to comment.