Skip to content

Commit 89b5f19

Browse files
committed
Fix issues introduced by master merge
1 parent 6e3263e commit 89b5f19

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

pid_controller/src/pid_controller.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,6 @@ controller_interface::return_type PidController::update_and_write_commands(
503503
for (size_t i = 0; i < dof_; ++i)
504504
{
505505
double tmp_command = 0.0;
506-
double tmp_command = 0.0;
507506

508507
if (std::isfinite(reference_interfaces_[i]) && std::isfinite(measured_state_values_[i]))
509508
{
@@ -542,24 +541,19 @@ controller_interface::return_type PidController::update_and_write_commands(
542541
std::isfinite(measured_state_values_[dof_ + i]))
543542
{
544543
// use calculation with 'error' and 'error_dot'
545-
tmp_command += pids_[i]->compute_command(
546544
tmp_command += pids_[i]->compute_command(
547545
error, reference_interfaces_[dof_ + i] - measured_state_values_[dof_ + i], period);
548546
}
549547
else
550548
{
551549
// Fallback to calculation with 'error' only
552550
tmp_command += pids_[i]->compute_command(error, period);
553-
RCLCPP_WARN(
554-
get_node()->get_logger(), "Two interfaces, fallback to calculation with 'error' only");
555-
tmp_command += pids_[i]->compute_command(error, period);
556551
}
557552
}
558553
else
559554
{
560555
// use calculation with 'error' only
561556
tmp_command += pids_[i]->compute_command(error, period);
562-
tmp_command += pids_[i]->compute_command(error, period);
563557
}
564558

565559
// write calculated values

pid_controller/test/pid_controller_params.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,5 @@ test_pid_controller_with_feedforward_gain_dual_interface:
4747
gains:
4848
joint1: {p: 0.5, i: 0.3, d: 0.4, i_clamp_max: 5.0, i_clamp_min: -5.0, feedforward_gain: 1.0}
4949
joint2: {p: 0.5, i: 0.3, d: 0.4, i_clamp_max: 5.0, i_clamp_min: -5.0, feedforward_gain: 1.0}
50-
joint1: {p: 1.0, i: 2.0, d: 10.0, i_clamp_max: 5.0, i_clamp_min: -5.0}
5150

5251

53-
test_pid_controller_with_feedforward_gain:
54-
ros__parameters:
55-
dof_names:
56-
- joint1
57-
58-
command_interface: position
59-
60-
reference_and_state_interfaces: ["position"]
61-
62-
gains:
63-
joint1: {p: 0.5, i: 0.0, d: 0.0, i_clamp_max: 5.0, i_clamp_min: -5.0, feedforward_gain: 1.0}

pid_controller/test/test_pid_controller.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ class TestablePidController : public pid_controller::PidController
6060
FRIEND_TEST(PidControllerTest, test_update_logic_angle_wraparound_on);
6161
FRIEND_TEST(PidControllerTest, subscribe_and_get_messages_success);
6262
FRIEND_TEST(PidControllerTest, receive_message_and_publish_updated_status);
63-
FRIEND_TEST(PidControllerDualInterfaceTest, test_chained_feedforward_with_gain_dual_interface);
6463
FRIEND_TEST(PidControllerTest, test_update_chained_feedforward_with_gain);
6564
FRIEND_TEST(PidControllerTest, test_update_chained_feedforward_off_with_gain);
66-
65+
FRIEND_TEST(PidControllerDualInterfaceTest, test_chained_feedforward_with_gain_dual_interface);
66+
6767
public:
6868
controller_interface::CallbackReturn on_configure(
6969
const rclcpp_lifecycle::State & previous_state) override

0 commit comments

Comments
 (0)