Skip to content

Commit

Permalink
Remove current_vel_threshold_pid_integration param
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Sanchez <[email protected]>
  • Loading branch information
danielsanchezaran committed Nov 20, 2023
1 parent 1fbf782 commit 48dfaca
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion control/pid_longitudinal_controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ AutonomouStuff Lexus RX 450h for under 40 km/h driving.
| max_d_effort | double | max value of acceleration with d gain | 0.0 |
| min_d_effort | double | min value of acceleration with d gain | 0.0 |
| lpf_vel_error_gain | double | gain of low-pass filter for velocity error | 0.9 |
| current_vel_threshold_pid_integration | double | Velocity error is integrated for I-term only when the absolute value of current velocity is larger than this parameter. [m/s] | 0.5 |
| brake_keeping_acc | double | If `enable_brake_keeping_before_stop` is true, a certain acceleration is kept during DRIVE state before the ego stops [m/s^2] See [Brake keeping](#brake-keeping). | 0.2 |

### STOPPING Parameter (smooth stop)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
max_d_effort: 0.0
min_d_effort: 0.0
lpf_vel_error_gain: 0.9
current_vel_threshold_pid_integration: 0.5
enable_brake_keeping_before_stop: false
brake_keeping_acc: -0.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ PidLongitudinalController::PidLongitudinalController(rclcpp::Node & node)
const double lpf_vel_error_gain{node.declare_parameter<double>("lpf_vel_error_gain")};
m_lpf_vel_error = std::make_shared<LowpassFilter1d>(0.0, lpf_vel_error_gain);

Check notice on line 102 in control/pid_longitudinal_controller/src/pid_longitudinal_controller.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

✅ Getting better: Large Method

diagnostic_updater_ decreases from 116 to 114 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
m_current_vel_threshold_pid_integrate =
node.declare_parameter<double>("current_vel_threshold_pid_integration"); // [m/s]

m_enable_brake_keeping_before_stop =
node.declare_parameter<bool>("enable_brake_keeping_before_stop"); // [-]
m_brake_keeping_acc = node.declare_parameter<double>("brake_keeping_acc"); // [m/s^2]
Expand Down Expand Up @@ -282,8 +279,6 @@ rcl_interfaces::msg::SetParametersResult PidLongitudinalController::paramCallbac
update_param("max_d_effort", max_d);
update_param("min_d_effort", min_d);
m_pid_vel.setLimits(max_pid, min_pid, max_p, min_p, max_i, min_i, max_d, min_d);

Check notice on line 281 in control/pid_longitudinal_controller/src/pid_longitudinal_controller.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

✅ Getting better: Large Method

PidLongitudinalController::paramCallback decreases from 109 to 108 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

update_param("current_vel_threshold_pid_integration", m_current_vel_threshold_pid_integrate);
}

// stopping state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
max_d_effort: 0.0
min_d_effort: 0.0
lpf_vel_error_gain: 0.9
current_vel_threshold_pid_integration: 0.5
enable_brake_keeping_before_stop: false
brake_keeping_acc: -0.2

Expand Down

0 comments on commit 48dfaca

Please sign in to comment.