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

How does <param> know the type when not explicitly set?

asked 2015-08-21 07:34:23 -0600

I am currently doing a C++ program which executes launchfiles and monitor their processes if they die and I now I wonder how normally the type of the value of the param is selected.

Actually I thought it is saved as string all the time and then depending on what the user decides to have it, trying to be converted.

But when I look at the functions in param.h ... this does not seem to be the case. So how are they checked if they are bool, float, double, string, when no type is given?

Regards,

Christian

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-08-21 07:55:27 -0600

Ah ok found it myself,

http://wiki.ros.org/roslaunch/XML/param

Specifies the type of the parameter. If you don't specify the type, roslaunch will attempt to automatically determine the type. These rules are very basic:

  • numbers with '.'s are floating point,
  • integers otherwise;
  • "true" and "false" are boolean (not case-sensitive).
  • all other values are strings
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-08-21 07:34:23 -0600

Seen: 227 times

Last updated: Aug 21 '15