PID controller /pid_enable topic for multiple controllers
Hi all,
I am using the PID package to run six pid controllers (So far) on a robot. I'm using the parameters in the launch file to differentiate between the different PID nodes, as described in the wiki.ros.org/pid tutorial, section 4.2: parameters. However, I need to be able to individually enable and disable certain of the PID controllers at a time, and I can't find a way to get the controllers to subscribe to different /pid_enable topics. The /pid_enable is listed 4.1: topics, but there is no way documented to change the topic under the parameters like there are for all the other topics. They all subscribe to different setpoint, control effort, etc. topics but there is no way listed in the parameters to have them each to be enabled or disabled one at a time. Any ideas? Thanks.
Here's the launch files for all six controllers. I am aware that they are all on default values as I am just trying to get them all up and running at the same time.
<node name="surge_pid" pkg="pid" type="controller" output="screen" >
<param name="Kp" value="4.0" />
<param name="Ki" value="0.0" />
<param name="Kd" value="0.0" />
<param name="rate" value="20" />
<param name="upper_limit" value="10" />
<param name="lower_limit" value="-10" />
<param name="windup_limit" value="10" />
<param name="cutoff_frequency" value="20" />
<param name="diagnostic_period" value="0.25" />
<param name="topic_from_controller" value="control_effort_surge" />
<param name="topic_from_plant" value="state_surge " />
<param name="setpoint_topic" value="setpoint_surge" />
</node>
<node name="sway_pid" pkg="pid" type="controller" output="screen" >
<param name="Kp" value="4.0" />
<param name="Ki" value="0.0" />
<param name="Kd" value="0.0" />
<param name="rate" value="20" />
<param name="upper_limit" value="10" />
<param name="lower_limit" value="-10" />
<param name="windup_limit" value="10" />
<param name="cutoff_frequency" value="20" />
<param name="diagnostic_period" value="0.25" />
<param name="topic_from_controller" value="control_effort_sway" />
<param name="topic_from_plant" value="state_sway" />
<param name="setpoint_topic" value="setpoint_sway" />
</node>
<node name="heave_pid" pkg="pid" type="controller" output="screen" >
<param name="Kp" value="4.0" />
<param name="Ki" value="0.0" />
<param name="Kd" value="0.0" />
<param name="rate" value="20" />
<param name="upper_limit" value="10" />
<param name="lower_limit" value="-10" />
<param name="windup_limit" value="10" />
<param name="cutoff_frequency" value="20" />
<param name="diagnostic_period" value="0.25" />
<param name="topic_from_controller" value="control_effort_heave" />
<param name="topic_from_plant" value="state_heave" />
<param name="setpoint_topic" value="setpoint_heave" />
</node>
<node name="roll_pid" pkg="pid" type="controller" output="screen" >
<param name="Kp" value="4.0" />
<param name="Ki" value="0.0" />
<param name="Kd" value="0.0" />
<param name="rate" value="20" />
<param name="upper_limit" value="10" />
<param name="lower_limit" value="-10" />
<param name="windup_limit" value="10" />
<param name="cutoff_frequency" value="20" />
<param name="diagnostic_period" value="0.25" />
<param name="topic_from_controller" value="control_effort_roll" />
<param name="topic_from_plant" value="state_roll" />
<param name="setpoint_topic" value="setpoint_roll" />
</node>
<node name="pitch_pid" pkg="pid" type="controller" output="screen" >
<param name="Kp" value="4.0" />
<param name="Ki" value="0.0" />
<param name ...