ros / dynamic_reconfigure

BSD 3-Clause "New" or "Revised" License
47 stars 112 forks source link

Array parameter for each type (int, double, string, bool) #67

Open wkentaro opened 8 years ago

wkentaro commented 8 years ago

I'd like to use array for parameter, and currently it seems not possible. Anyone who tried this, or are there any ways to achieve this?

awesomebytes commented 7 years ago

I personally use a string and then parse its contents from code to form the actual array.

From python you can just evaluate to get it, like (using ipython as example):

In [1]: import ast

In [2]: ast.literal_eval('[1, 2, 3, 4, 5]')
Out[2]: [1, 2, 3, 4, 5]

In [3]: 
wkentaro commented 7 years ago

Hmm. I think it's not a fundamental solution.

awesomebytes commented 7 years ago

It's a way to achieve it at least. Dynamic reconfigure has no implementation of an array.

wkentaro commented 7 years ago

I see. Thank you.