Ask Your Question
0

PID controller /pid_enable topic for multiple controllers

asked 2016-05-09 21:05:45 -0600

Seth Isaacson gravatar image

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 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-05-12 10:52:12 -0600

alee gravatar image

Could the "remap" tag be what you're looking for? http://wiki.ros.org/roslaunch/XML/remap

edit flag offensive delete link more

Comments

hello, could you please elaborate how to use this?

aarontan gravatar imageaarontan ( 2019-05-23 12:50:31 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2016-05-09 21:04:35 -0600

Seen: 362 times

Last updated: May 12 '16