willowgarage/ros_control — pull request #14 by bobholmberg (2013-02-05 02:30:43+00:00)
Title: Using zero i_gain_ to turn off integral control did unsavory things.

If the user did not want integral control and set i_gain_ to zero, then dividing by i_gain_ would set i_error_ to NaN. This is not desired. Instead, replace the use of division to create i_term with direct integration of i_term_.

Replace private member i_error_ with i_term_.

In getCurrentPIDErrors(): create & return i_error_ with the same old meaning and units. NOTE: i_error_ is not needed internally anywhere else.