If you're doing this you probably want to use getParamCached(), as getParam() itself is expensive (it incurs an xmlrpc call to the master).  <a href="http://www.ros.org/wiki/roscpp/Overview/Parameter%20Server#Cached_Parameters">http://www.ros.org/wiki/roscpp/Overview/Parameter%20Server#Cached_Parameters</a><br>

<br>Blaise can answer in more detail, but dynamic_reconfigure allows things like automatic GUI generation and feedback from the node (for e.g. invalid values etc.).<br><br>Josh<br><br><div class="gmail_quote">On Mon, Apr 19, 2010 at 11:18 AM, Dejan Pangercic <span dir="ltr"><<a href="mailto:dejan.pangercic@gmail.com">dejan.pangercic@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Ugo,<br>
<br>
I am by no means authority but this is the way I update parameters in my nodes:<br>
Define node's member function, e.g.:<br>
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>
 double param_;<br>
 void<br>
      updateParametersFromServer ()<br>
    {<br>
      nh_.getParam ("my_param", param_);<br>
    }<br>
and then constantly call it in that node's spin function:<br>
<br>
      updateParametersFromServer ();<br>
<br>
See also an attached example file.<br>
<br>
Furthermore, I just recently stumbled upon<br>
<a href="http://www.ros.org/wiki/dynamic_reconfigure" target="_blank">http://www.ros.org/wiki/dynamic_reconfigure</a> which "facilitates dynamic<br>
node reconfiguration". However I do not really understand in how far<br>
is it different to conventional updating of parameters as discussed<br>
before. But maybe Blaise can tell here more.<br>
<br>
D.<br>
<div><div></div><div class="h5">On Mon, Apr 19, 2010 at 6:56 PM, Ugo Cupcic <<a href="mailto:ugo@shadowrobot.com">ugo@shadowrobot.com</a>> wrote:<br>
> Hi,<br>
><br>
> I'm currently setting the parameters for the controllers (PID and so on)<br>
> via a message (I have a subscriber which updates the values when it<br>
> receives the corresponding message).<br>
><br>
> It works well, but I wanted to know what was the recommended way of<br>
> doing that in ROS. Is it better to do it using parameters? (But then how<br>
> can I  change the corresponding values when the parameters are updated?)<br>
><br>
> Cheers,<br>
><br>
> Ugo<br>
><br>
> --<br>
> Ugo Cupcic         |  Shadow Robot Company | <a href="mailto:ugo@shadowrobot.com">ugo@shadowrobot.com</a><br>
> Software Engineer      251 Liverpool Road<br>
> need a Hand?           London  N1 1LX       | +44 20 7700 2487<br>
> <a href="http://www.shadowrobot.com/hand/" target="_blank">http://www.shadowrobot.com/hand/</a>              @shadowrobot<br>
><br>
><br>
> _______________________________________________<br>
> ros-users mailing list<br>
> <a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
> <a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
><br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
MSc. Dejan Pangercic<br>
PhD Student/Researcher<br>
Computer Science IX<br>
Technische Universität München<br>
Telephone: +49 (89) 289-17780<br>
E-Mail: <a href="mailto:dejan.pangercic@in.tum.de">dejan.pangercic@in.tum.de</a><br>
WWW: <a href="http://ias.cs.tum.edu/people/pangercic" target="_blank">http://ias.cs.tum.edu/people/pangercic</a><br>
</font><br>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br>