Code Monkey home page Code Monkey logo

Comments (8)

xqms avatar xqms commented on July 23, 2024

Hi, thanks for the report! Could you share a full .launch file that shows how you include the YAML data?

I'm kind of surprised since rosmon uses yaml-cpp as the YAML parser, which should be pretty feature-complete. Well, you never know ;-)

from rosmon.

xqms avatar xqms commented on July 23, 2024

also I just noticed: Where is frequency coming from? I guess the YAML file you tried has more fields?

from rosmon.

Timple avatar Timple commented on July 23, 2024

param.launch.txt
robot_localization.yaml.txt

Here ya go. Sorry for the .txt extension, seemed most convenient to attach to issue.

I tried to create a minimal example.
These example files work with roslaunch but not with mon launch

from rosmon.

xqms avatar xqms commented on July 23, 2024

Thanks! I had a look and I think the syntax you are using is not supported by yaml-cpp. See here for a PR against yaml-cpp: jbeder/yaml-cpp#300

Furthermore, the syntax is not even in the YAML spec: https://stackoverflow.com/a/47203224

Maybe it is possible to work around this in rosmon, but I doubt it, so we will have to wait for the yaml-cpp developers to implement this.

But there is an alternative: You can do the same at launch file level. Example:

<node ...>
  <rosparam command="load" file=".../generic.yaml">
  <rosparam command="load" file=".../special_A.yaml">
</node>

<node ...>
  <rosparam command="load" file=".../generic.yaml">
  <rosparam command="load" file=".../special_B.yaml">
</node>

rosmon guarantees that <rosparam> tags are executed in order. Because the <rosparam> tags are scoped inside the node tag, the contents will be loaded inside the node namespace.

from rosmon.

Timple avatar Timple commented on July 23, 2024

That must be a discrepancy with the python yaml import then.
That's a bummer...

Thanks for the alternative though! I'll see if we want to convert the files (this will place some of the substitution in two places, param & launch) or switch back to roslaunch.

Implementing a workaround in rosmon sounds like the least neat solution. And since your referenced PR is open since 2015 I have little hopes there...

from rosmon.

xqms avatar xqms commented on July 23, 2024

Implementing a workaround in rosmon sounds like the least neat solution. And since your referenced PR is open since 2015 I have little hopes there...

That could actually be quite easy - just do a first pass over the YAML nodes to find all << nodes and work on these, then the rest (overwriting already set parameters). If you are interested in working on this, I'd be happy to consider a PR - otherwise I might have time to look at this next week.

from rosmon.

Timple avatar Timple commented on July 23, 2024

Hmm, might still be an option then to include this. Would be consistent with roslaunch 👍
Working towards a deadline I won't get to this again before the holidays :(
If your up to speed with the code, feel free to check next week. Otherwise I might pick it up later!

from rosmon.

xqms avatar xqms commented on July 23, 2024

Fixed by @Cartoonman in #117.

from rosmon.

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.