willowgarage/ros_controllers — pull request #16 by davetcoleman (2013-06-20 05:53:06+00:00)
Title: Fixed control_toolbox deprecated errors with updatePid()

Please give feedback if this is the right way to fix this deprecated error. I had to reverse the way a PID's error is calculated per the deprecated function message:

According to ``control_toolbox/include/control_toolbox/pid.h``:

> This function assumes p_error = (state - target)
> which is an unconventional definition of the error. Please use \ref
> computeCommand instead, which assumes error = (target - state)

During build control_toolbox causes these deprecated warnings:
```
/home/dave/ros/ws_misc/src/ros_controllers/effort_controllers/src/joint_velocity_controller.cpp: In member function ‘virtual void effort_controllers::JointVelocityController::update(const ros::Time&, const ros::Duration&)’:
/home/dave/ros/ws_misc/src/ros_controllers/effort_controllers/src/joint_velocity_controller.cpp:112:59: warning: ‘double control_toolbox::Pid::updatePid(double, ros::Duration)’ is deprecated (declared at /home/dave/ros/ws_misc/src/ros_control/control_toolbox/include/control_toolbox/pid.h:231) [-Wdeprecated-declarations]

/home/dave/ros/ws_misc/src/ros_controllers/effort_controllers/src/joint_position_controller.cpp: In member function ‘virtual void effort_controllers::JointPositionController::update(const ros::Time&, const ros::Duration&)’:
/home/dave/ros/ws_misc/src/ros_controllers/effort_controllers/src/joint_position_controller.cpp:147:90: warning: ‘double control_toolbox::Pid::updatePid(double, double, ros::Duration)’ is deprecated (declared at /home/dave/ros/ws_misc/src/ros_control/control_toolbox/include/control_toolbox/pid.h:247) [-Wdeprecated-declarations]
```

How much will this break current robot's PID gains and control behavior? I think this fix needs to be done, and it should be done before the Hydro release.