ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
template<typename T>
void param(const std::string& param_name, T& param_val, const T& default_val) const;
From the function prototype, param_val and default_val are both the template type, in this case bool.
The string value "false" is a pointer to the characters 'false' which is non-zero. This is interpreted as true when used as a bool. Try without quotes around false;
nh_private.param<bool>("state", state, false);