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

Dynamic Reconfigure - Can I Set An Array Of Values?

asked 2014-03-10 07:47:06 -0500

trianta2 gravatar image


I want to use dynamic_reconfigure in one of my nodes, however, one of my parameters is actually a variably-sized array of doubles. Can dynamic_reconfigure support variably-sized arrays, or does it only handle name-value pairs and structures?

Would a service with custom message type be a better solution for setting the array?

Thank you for your help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-08-01 08:57:52 -0500

Oded gravatar image

Know it's been a long time but: You can't have an array of values, however, you can use a string with a comma deliminator between the values.

For example

gen.add("vals", str_t, 0, "A comma delimited list", "1,2,3,4")

later on you can break it into an array in your code. In python it's really ease, just use you_string.split(',')

edit flag offensive delete link more


anything changed here since 2016?

tanasis gravatar image tanasis  ( 2020-11-30 07:46:17 -0500 )edit

Question Tools

1 follower


Asked: 2014-03-10 07:47:06 -0500

Seen: 1,298 times

Last updated: Aug 01 '16