Skip to content

Commit b448c36

Browse files
Make default value of saturation ROS param dynamic
1 parent 4577aef commit b448c36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

control_toolbox/src/pid_ros.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ bool PidROS::initialize_from_ros_parameters()
260260
u_max = UMAX_INFINITY;
261261
u_min = -UMAX_INFINITY;
262262
bool antiwindup = false;
263-
bool saturation = false;
264263
std::string antiwindup_strat_str = "legacy";
265264
bool all_params_available = true;
266265

@@ -275,6 +274,7 @@ bool PidROS::initialize_from_ros_parameters()
275274
all_params_available &=
276275
get_double_param(param_prefix_ + "tracking_time_constant", tracking_time_constant);
277276

277+
bool saturation = std::isfinite(u_max) || std::isfinite(u_min);
278278
get_boolean_param(param_prefix_ + "saturation", saturation);
279279
if (!saturation)
280280
{

0 commit comments

Comments
 (0)