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

Min and max value with ROS2 Parameter

asked 2019-01-04 02:13:33 -0600

poonam1120 gravatar image

Hi Everyone,

The dynamic reconfigure is not available in ROS2, and its replacement Parameter feature is used. With ROS, .cfg files are used, where parameter's value, min , max and other details can be given. With ROS2, I tried to set parameter with value and its working fine, but is there a way to set min and max value for that parameter? e.g. of .cfg

gen.add ("min_x", double_t, 0, "X coordinate of the minimum point of the box.", -1, -1000, 1000)

Thanks.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2019-01-04 10:07:14 -0600

Dirk Thomas gravatar image

updated 2019-01-04 10:07:24 -0600

There is currently (as of Crystal) no comparable feature to declare parameter boundaries.

Once the change to IDL has landed I imagine that it will be possible to create an .idl which declares the parameters of a node including their valid range (like .cfg files in ROS 1 but language agnostic).

edit flag offensive delete link more

Comments

Once the change to IDL has landed [..]

the change?

gvdhoorn gravatar image gvdhoorn  ( 2019-01-04 10:10:07 -0600 )edit
1

@gvdhoorn This is a change to add support for IDL messages in addition to msg format.

tfoote gravatar image tfoote  ( 2019-01-04 13:17:06 -0600 )edit

Thanks all for the response

poonam1120 gravatar image poonam1120  ( 2019-01-04 13:31:26 -0600 )edit

@tfoote: I was/am aware of the IDL work :) Just thought it would be nice if @Dirk Thomas could link to a PR / issue as that would make his answer better.

gvdhoorn gravatar image gvdhoorn  ( 2019-01-04 14:57:29 -0600 )edit
0

answered 2019-01-04 13:16:26 -0600

tfoote gravatar image

The ability to describe a parameter and expected ranges is not currently implemented but we have designed the ParameterDescription message to be able to be able to be extended to support expressing limits of various forms: https://github.com/ros2/rcl_interface...

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2019-01-04 02:13:33 -0600

Seen: 965 times

Last updated: Jan 04 '19