Skip to content

Commit e20e63c

Browse files
authored
Merge branch 'master' into master
2 parents 4f14831 + 11ed083 commit e20e63c

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

effort_controllers/test/test_joint_group_effort_controller.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,13 @@ TEST_F(JointGroupEffortControllerTest, ActivateWithWrongJointsNamesFails)
8585
// activate failed, 'joint4' is not a valid joint name for the hardware
8686
ASSERT_EQ(controller_->on_configure(rclcpp_lifecycle::State()), CallbackReturn::SUCCESS);
8787
ASSERT_EQ(controller_->on_activate(rclcpp_lifecycle::State()), CallbackReturn::ERROR);
88+
ASSERT_EQ(controller_->on_cleanup(rclcpp_lifecycle::State()), CallbackReturn::SUCCESS);
8889

8990
controller_->get_node()->set_parameter({"joints", std::vector<std::string>{"joint1", "joint2"}});
9091

91-
// activate failed, 'acceleration' is not a registered interface for `joint1`
92+
// activate should succeed now
9293
ASSERT_EQ(controller_->on_configure(rclcpp_lifecycle::State()), CallbackReturn::SUCCESS);
93-
ASSERT_EQ(controller_->on_activate(rclcpp_lifecycle::State()), CallbackReturn::ERROR);
94+
ASSERT_EQ(controller_->on_activate(rclcpp_lifecycle::State()), CallbackReturn::SUCCESS);
9495
}
9596

9697
TEST_F(JointGroupEffortControllerTest, CommandSuccessTest)

forward_command_controller/src/forward_command_controller.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ controller_interface::CallbackReturn ForwardCommandController::read_parameters()
4545
return controller_interface::CallbackReturn::ERROR;
4646
}
4747

48+
command_interface_types_.clear();
4849
for (const auto & joint : params_.joints)
4950
{
5051
command_interface_types_.push_back(joint + "/" + params_.interface_name);

position_controllers/test/test_joint_group_position_controller.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,13 @@ TEST_F(JointGroupPositionControllerTest, ActivateWithWrongJointsNamesFails)
8585
// activate failed, 'joint4' is not a valid joint name for the hardware
8686
ASSERT_EQ(controller_->on_configure(rclcpp_lifecycle::State()), CallbackReturn::SUCCESS);
8787
ASSERT_EQ(controller_->on_activate(rclcpp_lifecycle::State()), CallbackReturn::ERROR);
88+
ASSERT_EQ(controller_->on_cleanup(rclcpp_lifecycle::State()), CallbackReturn::SUCCESS);
8889

8990
controller_->get_node()->set_parameter({"joints", std::vector<std::string>{"joint1", "joint2"}});
9091

91-
// activate failed, 'acceleration' is not a registered interface for `joint1`
92+
// activate should succeed now
9293
ASSERT_EQ(controller_->on_configure(rclcpp_lifecycle::State()), CallbackReturn::SUCCESS);
93-
ASSERT_EQ(controller_->on_activate(rclcpp_lifecycle::State()), CallbackReturn::ERROR);
94+
ASSERT_EQ(controller_->on_activate(rclcpp_lifecycle::State()), CallbackReturn::SUCCESS);
9495
}
9596

9697
TEST_F(JointGroupPositionControllerTest, CommandSuccessTest)

velocity_controllers/test/test_joint_group_velocity_controller.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,13 @@ TEST_F(JointGroupVelocityControllerTest, ActivateWithWrongJointsNamesFails)
8585
// activate failed, 'joint4' is not a valid joint name for the hardware
8686
ASSERT_EQ(controller_->on_configure(rclcpp_lifecycle::State()), CallbackReturn::SUCCESS);
8787
ASSERT_EQ(controller_->on_activate(rclcpp_lifecycle::State()), CallbackReturn::ERROR);
88+
ASSERT_EQ(controller_->on_cleanup(rclcpp_lifecycle::State()), CallbackReturn::SUCCESS);
8889

8990
controller_->get_node()->set_parameter({"joints", std::vector<std::string>{"joint1", "joint2"}});
9091

91-
// activate failed, 'acceleration' is not a registered interface for `joint1`
92+
// activate should succeed now
9293
ASSERT_EQ(controller_->on_configure(rclcpp_lifecycle::State()), CallbackReturn::SUCCESS);
93-
ASSERT_EQ(controller_->on_activate(rclcpp_lifecycle::State()), CallbackReturn::ERROR);
94+
ASSERT_EQ(controller_->on_activate(rclcpp_lifecycle::State()), CallbackReturn::SUCCESS);
9495
}
9596

9697
TEST_F(JointGroupVelocityControllerTest, CommandSuccessTest)

0 commit comments

Comments
 (0)