Giter VIP home page Giter VIP logo

Comments (19)

prashanthr05 avatar prashanthr05 commented on August 17, 2024 2

I made the following quick hack and it apparently works,

In the launch-wholebodydynamics-icub-six-fts-sim.xml
I changed
https://github.com/robotology/codyco-modules/blob/75a681590889a13967351911f694dd7a0a9c14df/src/devices/wholeBodyDynamics/app/launch-wholebodydynamics-icub-six-fts-sim.xml#L2
to

<robot name="@WBD_YARP_ROBOT_NAME" portprefix="icubSim" build="1"  xmlns:xi="http://www.w3.org/2001/XInclude">

Then I changed
https://github.com/robotology/codyco-modules/blob/75a681590889a13967351911f694dd7a0a9c14df/src/devices/wholeBodyDynamics/app/launch-wholebodydynamics-icub-six-fts-sim.xml#L95
to

    <xi:include href="estimators/wholebodydynamics-external.xml" />

In the wholebodydynamics-icub-external-six-fts-sim.xml,
I commented the lines ,
https://github.com/robotology/codyco-modules/blob/75a681590889a13967351911f694dd7a0a9c14df/src/devices/wholeBodyDynamics/app/wholebodydynamics-icub-external-six-fts-sim.xml#L4
and
https://github.com/robotology/codyco-modules/blob/75a681590889a13967351911f694dd7a0a9c14df/src/devices/wholeBodyDynamics/app/wholebodydynamics-icub-external-six-fts-sim.xml#L75

then finally changed,
https://github.com/robotology/codyco-modules/blob/75a681590889a13967351911f694dd7a0a9c14df/src/devices/wholeBodyDynamics/app/wholebodydynamics-icub-external-six-fts-sim.xml#L5
to

<device xmlns:xi="http://www.w3.org/2001/XInclude" name="wholebodydynamics" type="wholebodydynamics">

from codyco-modules.

gabrielenava avatar gabrielenava commented on August 17, 2024 1

I did now the following test:

  • I modified the launch-wholebodydynamics.xml. I removed the right foot FT sensor device and I put it in a file called device-test.xml. Then, I modified this path to point my device-test file instead of wholebodydynamics-external.xml. The two files are in the same folder.

I run YARP_ROBOT_NAME=iCubgazeboV2_5 yarprobotinterface --config launch-wholebodydynamics.xml. The last device loaded is the left foot FT:

[INFO]created device <analogsensorclient>. See C++ class AnalogSensorClient for documentation.
yarp: Port /wholeBodyDynamics/l_foot_ft_sensor active at tcp://140.93.4.152:10079/
yarp: Port /wholeBodyDynamics/l_foot_ft_sensor/rpc:o active at tcp://140.93.4.152:10080/
yarp: Receiving input from /icubSim/left_foot/analog:o to /wholeBodyDynamics/l_foot_ft_sensor using udp
yarp: Sending output from /wholeBodyDynamics/l_foot_ft_sensor/rpc:o to /icubSim/left_foot/analog:o/rpc:i using tcp
[INFO]created device <analogsensorclient>. See C++ class AnalogSensorClient for documentation.

Therefore it seems the problem is not in the wholebodydynamics-external.xml file.

from codyco-modules.

nunoguedelha avatar nunoguedelha commented on August 17, 2024 1

I just experienced the same issue. Actually the issue is solved by using the current format supported by YARP for including device config files (we are more familiar with it now).
I just replaced

<!-- estimators -->
<devices file="estimators/wholebodydynamics-external.xml" />

by

<!-- estimators -->
<devices>
<xi:include href="estimators/wholebodydynamics-external.xml" />
</devices>

As it is done in for any other inclusion.
@prashanthr05 had already done this more or less, but I didn't need the other workarounds:

  • There is no need for changing the included file for removing the tag <devices>.
  • The following prefix is no more required
<device xmlns:xi="http://www.w3.org/2001/XInclude" name=... />
  • Nor setting the xmlns:xi include tool at the top (apparently), probably becasue now it is a default?

I'm pushing a fix in the same PR opened by @GiulioRomualdi #280.

from codyco-modules.

traversaro avatar traversaro commented on August 17, 2024 1

Thanks @nunoguedelha .

from codyco-modules.

traversaro avatar traversaro commented on August 17, 2024

Did you fixed the problem in #276 ?
What is location of the files that you are trying to run in the yarprobotinterface?

from codyco-modules.

gabrielenava avatar gabrielenava commented on August 17, 2024

I fixed the invalid DTD problem locally on my laptop, see #276 (comment). I will open a PR for fixing the remote branch too.

the launch-wholebodydynamics.xml file is located in $PATH_TO_SUPERBUILD_INSTALL/share/codyco/robots/iCubGazeboV2_5/ and the wholebodydynamics-external.xml is located in $PATH_TO_SUPERBUILD_INSTALL/share/codyco/robots/iCubGazeboV2_5/estimators. Superbuild paths seem to be set correctly an I set them by sourcing the setup.sh file.

from codyco-modules.

traversaro avatar traversaro commented on August 17, 2024

Have you tried to test it with another devices file to check if that is loaded instead?

from codyco-modules.

gabrielenava avatar gabrielenava commented on August 17, 2024

All the other devices in the file are correctly loaded: https://github.com/robotology/codyco-modules/blob/master/src/devices/wholeBodyDynamics/app/launch-wholebodydynamics-icub-six-fts-sim.xml#L89

The wholebodydynamics device itself is loaded without any problem if I copy the content of wholebodydynamics-external.xml instead of using the path to the xml file as specified currently in the launch-wholebodydynamics.xml file: https://github.com/robotology/codyco-modules/blob/master/src/devices/wholeBodyDynamics/app/launch-wholebodydynamics-icub-six-fts-sim.xml#L95

from codyco-modules.

traversaro avatar traversaro commented on August 17, 2024

I got it. I asked if you could load any other devices files, similar to wholebodydynamics-external.xml but with less devices or something similar.

from codyco-modules.

prashanthr05 avatar prashanthr05 commented on August 17, 2024

I also experience this issue.

from codyco-modules.

prashanthr05 avatar prashanthr05 commented on August 17, 2024

Were there any recent changes in the parsing done by yarprobotinterface?

The only change as listed in the changelog of YARP 3.2 release seems to be,

Tools
yarprobotinterface
YARP//DTD yarprobotinterface 3.0//EN is now the default parser for robot xml configuration files.
yarprobotinterface will not run anymore deprecated DTD format v1.0

from codyco-modules.

GiulioRomualdi avatar GiulioRomualdi commented on August 17, 2024

Same problem with the latest version of YARP

from codyco-modules.

GiulioRomualdi avatar GiulioRomualdi commented on August 17, 2024

Thanks to @prashanthr05 suggestion the problem is solved. I open a PR

from codyco-modules.

traversaro avatar traversaro commented on August 17, 2024

Guys, do you have any idea why this is now necessary? I am a bit out of time to check this out, but it could be interesting.

from codyco-modules.

prashanthr05 avatar prashanthr05 commented on August 17, 2024

Guys, do you have any idea why this is now necessary? I am a bit out of time to check this out, but it could be interesting.

I faced this problem after updating YARP to 3.2, specifically to this commit robotology/yarp@7ee03f8. and this line

<devices file="estimators/wholebodydynamics-external.xml" />

in the configuration file was not being parsed by the yarprobotinterface.

from codyco-modules.

traversaro avatar traversaro commented on August 17, 2024

Yes, I was asking because I fear that we are actually doing a workaround but the actual bug is in YARP, but if no one has bandwidth to investigate that I am ok to merge Giulio's PR. Opening a bug in YARP without a minimun working example is probably just creating noise.

from codyco-modules.

nunoguedelha avatar nunoguedelha commented on August 17, 2024

CC @CarlottaSartore

from codyco-modules.

traversaro avatar traversaro commented on August 17, 2024

Thanks @nunoguedelha

from codyco-modules.

nunoguedelha avatar nunoguedelha commented on August 17, 2024

Fixed by by #280 .

from codyco-modules.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.