ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rosparam load all yaml-files in folder

asked 2014-09-05 08:29:21 -0600

Tobias Neumann gravatar image

Hi, is it possible to load all yaml-files in an folder? Like:

<rosparam folder="$(find parameter)/my_params/" />
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-09-05 09:55:38 -0600

Chrissi gravatar image

According to the roslaunch doc it shouldn't work: "The <rosparam> tag can either reference a YAML file or contain raw YAML text." You could try writing a small node that takes a path and uses rosparam.load_file()

edit flag offensive delete link more

Comments

Yes I thought about that too, but I thought there might be an easier solution.

But if I write a node, how can I guarantee that all parameters are loaded before my launch file startes the next node that is depending on them?

Tobias Neumann gravatar image Tobias Neumann  ( 2014-09-05 10:30:18 -0600 )edit

One solution would be to offer a service once all parameters are set and to make the other nodes wait for that service to become available before doing anything.

Chrissi gravatar image Chrissi  ( 2014-09-05 10:50:00 -0600 )edit

Mh, that would work, but needs more codeing than adding a line for each yaml file in the launch file :(

There might be an different way? Would be a cool feature for rosparam

Tobias Neumann gravatar image Tobias Neumann  ( 2014-09-05 11:25:35 -0600 )edit

We are actually following a database approach to that. In my project we are using mongodb and have a tool that reads yaml files, saves the found parameters in the datacentre and also sets them on the parameter server. You can have a look at this

Chrissi gravatar image Chrissi  ( 2014-09-06 04:29:41 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-09-05 08:29:21 -0600

Seen: 1,907 times

Last updated: Sep 05 '14