Skip to content

Commit 6d555a9

Browse files
committed
header files changed for unit tests
1 parent 5f48cd8 commit 6d555a9

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

io_gripper_controller/test/test_load_io_gripper_controller.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 PAL Robotics SL.
1+
// Copyright (c) 2025, b»robotized by Stogl Robotics
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
1313
// limitations under the License.
1414

1515
#include <gmock/gmock.h>
16+
1617
#include <memory>
1718

1819
#include "controller_manager/controller_manager.hpp"
@@ -31,10 +32,15 @@ TEST(TestLoadIOGripperController, load_controller)
3132

3233
controller_manager::ControllerManager cm(
3334
executor, ros2_control_test_assets::minimal_robot_urdf, true, "test_controller_manager");
35+
const std::string test_file_path =
36+
std::string(TEST_FILES_DIRECTORY) + "/test_io_gripper_controller.yaml";
37+
38+
cm.set_parameter({"test_io_gripper_controller.params_file", test_file_path});
39+
40+
cm.set_parameter(
41+
{"test_io_gripper_controller.type", "io_gripper_controller/IOGripperController"});
3442

35-
ASSERT_NE(
36-
cm.load_controller("test_io_gripper_controller", "io_gripper_controller/IOGripperController"),
37-
nullptr);
43+
ASSERT_NE(cm.load_controller("test_io_gripper_controller"), nullptr);
3844

3945
rclcpp::shutdown();
4046
}

0 commit comments

Comments
 (0)