<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 09/30/2013 02:16 PM, Jakob
      Schwendner wrote:<br>
    </div>
    <blockquote
cite="mid:1837010020.18244.1380543388209.JavaMail.open-xchange@ox6.dfki.de"
      type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div> &nbsp; </div>
      <div> <br>
        On September 25, 2013 at 5:28 PM Dennis Mronga
        <a class="moz-txt-link-rfc2396E" href="mailto:dennis.mronga@dfki.de">&lt;dennis.mronga@dfki.de&gt;</a> wrote: <br>
        &gt; Hi, <br>
        &gt; <br>
        &gt; I recently stumbled across the joint_dispatcher component,
        which <br>
        &gt; "nearly" seems to be what I need. However, it seems a bit
        complicated to <br>
        &gt; configure and I think it does not cover the following
        cases: </div>
      <div> I can second the complicated to configure bit :) Since I got
        it working, it was working fine for my case. </div>
      <div> <br>
        &gt; <br>
        &gt; 1. Send only a subset of all available joints to the input
        ports and <br>
        &gt; dispatch them correctly to the outputs, instead of always
        expecting all <br>
        &gt; available joints. Right now, the component crashes with an
        unhandled <br>
        &gt; exception, if you do not send all joints to the input port.
      </div>
      <div> I guess this could be easily fixed in the component. In my
        opinion the best way would be to make this configurable, e.g.
        AllowPartialJointUpdate = true or something similar. </div>
      <div> <br>
        &gt; <br>
        &gt; 2. Get input from different sources and dispatch arbitrary
        subsets of <br>
        &gt; the inputs. E.g. if you have the joint state of the wheels
        and the joint <br>
        &gt; state of the manipulator as inputs and you want to output
        the port <br>
        &gt; "odometry" containing only the wheels, "manipulator"
        containing only the <br>
        &gt; manipulator and "full_joint_state" containing all joints. </div>
      <div> Yes, this I couldn't get working either, and would have
        needed. Currently I am running two components in parallel to get
        this behaviour. </div>
      <div> <br>
        &gt; <br>
        &gt; Generally I think it would be nicest, if you just have to
        configure the <br>
        &gt; input and output ports with the corresponding joint names
        and the <br>
        &gt; distribution of the joint states is done by the component
        according to <br>
        &gt; the joint names. However, I think that would reduce a bit
        the <br>
        &gt; capabilities of the component!? </div>
      <div> Yes, would have thought the same. It gets a little
        complicated because of the duality of the names/index mechanism
        in the Joints class. </div>
      <div> But, even when you don't want to use names in the Joints
        port, it would imo be ok to name them for the sake of the
        dispatcher. </div>
      <div> <br>
        &gt; <br>
        &gt; Before creating a branch and adding the functionality that
        I need, I <br>
        &gt; would like to know if anyone of you has used the
        joint_dispatcher and <br>
        &gt; has some remarks!? <br>
        I had a discussion with Sylvain on this subject, which I guess
        would have been good to put on the mailing list. The agreement
        was, though, that changing the way the module is configured
        would be nice. </div>
      <div> &nbsp; </div>
      <div> My preferred configuration would be something like: </div>
      <div> &nbsp; </div>
      <div> struct DispatchOutput </div>
      <div> { </div>
      <div> string name; // name of dynamic port </div>
      <div> vector&lt;string&gt; jointNames; // list of joint names </div>
      <div> vector&lt;string&gt; internalNames; // list of internal
        names for the joints <br>
        } </div>
      <div> &nbsp; </div>
      <div> struct DispatchInput </div>
      <div> { </div>
      <div> string name; // name of dynamic port </div>
      <div> vector&lt;string&gt; internalNames; // list of internal
        names for the joints </div>
      <div> vector&lt;string&gt; jointNames; // list of external joint
        names </div>
      <div> } </div>
      <div> &nbsp; </div>
      <div id="ox-signature"> module </div>
      <div> { </div>
      <div> vector&lt;DispatchInput&gt; inputs; </div>
      <div> vector&lt;DispatchOutput&gt; outputs; </div>
      <div> } </div>
      <div> &nbsp; </div>
      <div> the linking between input and output would be done on the
        internal names. For the index based Joints structs (e.g. no
        names), this would name the joints internally. The reason for
        not just using a single names vector per input/output is that
        you could have a configuration where the joint names are the
        same two different input ports, or that you would want to rename
        the output ports. On the other hand, maybe we should just not
        allow this... Thoughts? </div>
    </blockquote>
    I quite like the idea of assigning internal names.<br>
    <br>
    For people using joint names, we could allow internalNames to be
    empty (in which case internal names = actual names). People that are
    not using names at all could leave jointNames empty, in which case
    the joint-to-internal assignation would be done by index.<br>
    <br>
    I had an alternative proposal in mind, so there it is:<br>
    <br>
    &nbsp; /** Description of the set of joints on a single input<br>
    &nbsp;&nbsp; *<br>
    &nbsp;&nbsp; * If both byIndex and byName are empty, the whole input is
    selected<br>
    &nbsp;&nbsp; */<br>
    &nbsp; struct Input<br>
    &nbsp; {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /** Name of the input port */<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::string name;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /** Selection of the joints by index */<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::vector&lt;int&gt; byIndex;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /** Selection of the joints by name */<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::vector&lt;std::string&gt; byName;<br>
    &nbsp; };<br>
    <br>
    &nbsp; /** Description of a dispatched output */<br>
    &nbsp; struct Dispatch<br>
    &nbsp; {<br>
    &nbsp;&nbsp;&nbsp;&nbsp; /** Name of the output port */<br>
    &nbsp;&nbsp;&nbsp;&nbsp; std::string outputName;<br>
    &nbsp;&nbsp;&nbsp;&nbsp; /** (optional) Name of the joints on the output.<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If empty, simply copy the names from the inputs */<br>
    &nbsp;&nbsp;&nbsp;&nbsp; std::vector&lt;std::string&gt; jointNames;<br>
    &nbsp;&nbsp;&nbsp;&nbsp; /** Description of where the joints should be copied from */<br>
    &nbsp;&nbsp;&nbsp;&nbsp; std::vector&lt;Input&gt; joints;<br>
    &nbsp; };<br>
    <pre class="moz-signature" cols="72">-- 
Sylvain Joyeux (Dr.Ing.)
Senior Researcher

Space &amp; Security Robotics
Underwater Robotics

!!! Achtung, neue Telefonnummer!!!

Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Stra&szlig;e 5
28359 Bremen, Germany

Phone: +49 (0)421 178-454136
Fax:   +49 (0)421 218-454150
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:robotik@dfki.de">robotik@dfki.de</a>

Weitere Informationen: <a class="moz-txt-link-freetext" href="http://www.dfki.de/robotik">http://www.dfki.de/robotik</a>
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Stra&szlig;e 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.:    DE 148646973
Steuernummer:  19/673/0060/3
----------------------------------------------------------------------- </pre>
  </body>
</html>