<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi all,<br>
<br>
Thanks a lot for your answers. I'll have a look at the
dynamic_reconfigure stack. It seems to be exactly what I was looking
for!<br>
<br>
Cheers,<br>
<br>
Ugo<br>
<br>
On 19/04/10 20:30, Dejan Pangercic wrote:
<blockquote
 cite="mid:q2j6482963f1004191230p92376b7cwb824c3f2da883e82@mail.gmail.com"
 type="cite">
  <pre wrap="">Ugo,

as our guru Lorenz just pointed out, please note that the earlier
attached code was actually taking 100% of CPU.
I am attaching an improved version with added sleep in the spin function.
D.

On Mon, Apr 19, 2010 at 8:18 PM, Dejan Pangercic
<a class="moz-txt-link-rfc2396E" href="mailto:dejan.pangercic@gmail.com"><dejan.pangercic@gmail.com></a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi Ugo,

I am by no means authority but this is the way I update parameters in my nodes:
Define node's member function, e.g.:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 double param_;
 void
     updateParametersFromServer ()
   {
     nh_.getParam ("my_param", param_);
   }
and then constantly call it in that node's spin function:

     updateParametersFromServer ();

See also an attached example file.

Furthermore, I just recently stumbled upon
<a class="moz-txt-link-freetext" href="http://www.ros.org/wiki/dynamic_reconfigure">http://www.ros.org/wiki/dynamic_reconfigure</a> which "facilitates dynamic
node reconfiguration". However I do not really understand in how far
is it different to conventional updating of parameters as discussed
before. But maybe Blaise can tell here more.

D.
On Mon, Apr 19, 2010 at 6:56 PM, Ugo Cupcic <a class="moz-txt-link-rfc2396E" href="mailto:ugo@shadowrobot.com"><ugo@shadowrobot.com></a> wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Hi,

I'm currently setting the parameters for the controllers (PID and so on)
via a message (I have a subscriber which updates the values when it
receives the corresponding message).

It works well, but I wanted to know what was the recommended way of
doing that in ROS. Is it better to do it using parameters? (But then how
can I  change the corresponding values when the parameters are updated?)

Cheers,

Ugo

--
Ugo Cupcic         |  Shadow Robot Company | <a class="moz-txt-link-abbreviated" href="mailto:ugo@shadowrobot.com">ugo@shadowrobot.com</a>
Software Engineer      251 Liverpool Road
need a Hand?           London  N1 1LX       | +44 20 7700 2487
<a class="moz-txt-link-freetext" href="http://www.shadowrobot.com/hand/">http://www.shadowrobot.com/hand/</a>              @shadowrobot


_______________________________________________
ros-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a>
<a class="moz-txt-link-freetext" href="https://code.ros.org/mailman/listinfo/ros-users">https://code.ros.org/mailman/listinfo/ros-users</a>

      </pre>
    </blockquote>
    <pre wrap="">


--
MSc. Dejan Pangercic
PhD Student/Researcher
Computer Science IX
Technische Universität München
Telephone: +49 (89) 289-17780
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:dejan.pangercic@in.tum.de">dejan.pangercic@in.tum.de</a>
WWW: <a class="moz-txt-link-freetext" href="http://ias.cs.tum.edu/people/pangercic">http://ias.cs.tum.edu/people/pangercic</a>

    </pre>
  </blockquote>
  <pre wrap="">


  </pre>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
ros-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a>
<a class="moz-txt-link-freetext" href="https://code.ros.org/mailman/listinfo/ros-users">https://code.ros.org/mailman/listinfo/ros-users</a>
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Ugo Cupcic         |  Shadow Robot Company | <a class="moz-txt-link-abbreviated" href="mailto:ugo@shadowrobot.com">ugo@shadowrobot.com</a>
Software Engineer      251 Liverpool Road
need a Hand?           London  N1 1LX       | +44 20 7700 2487
<a class="moz-txt-link-freetext" href="http://www.shadowrobot.com/hand/">http://www.shadowrobot.com/hand/</a>              @shadowrobot 

</pre>
</body>
</html>