Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The format in which you write down parameters in a launch file (or via rosparam) or even in a plain .yaml file is (as the filename implies): YAML.

YAML supports two notations for lists:

  • on a single line: my_list: [a, b, c, d, .., z], and
  • a more verbose formatting:

    my_list:
      - a
      - b
      - c
      - d
      - ..
      - z
    

No other forms are supported.

So:

How Can I read data in the format: [0.1 0.2 0.3] from the rosparameter server into a std::vector?

I would say "you can't", as what you show is not a valid notation for lists in YAML.

Perhaps it would be good / informative if you could explain why you would like to avoid commas.