ROS arguments data type

asked 2019-07-03 10:40:03 -0600

CalvinK gravatar image

updated 2019-07-03 15:30:36 -0600

jayess gravatar image

Hello all,

I am sorry if this is a beginner question but I am quite confused on what the data type of ROS args are. From the documentation online it shows an example where:

<include file="included.launch">
  <!-- all vars that included.launch requires must be set -->
  <arg name="hoge" value="fuga" />
</include>

Which leads me to believe it only takes in strings, however this doesn't seem logical to me. I also know that is is common place to search for the value utilizing:

$(arg arg-name)

Does this mean for example that if I type "true" as my arg value that it will be a string of "true" or will it recognize this as a Boolean data type?

Thanks,

Calvin

edit retag flag offensive close merge delete

Comments

1

Please clarify: you first write "ROS arguments" -- which isn't actually a thing, perhaps you mean "ROS parameters"? Then you show .launch file syntax, which would be launch file arguments.

Is the latter that your question is really about? Because these two are different concepts with different support and different infrastructure.

gvdhoorn gravatar imagegvdhoorn ( 2019-07-03 10:42:49 -0600 )edit

I meant the launch file arguments, maybe I am confused on how these differ. I know parameters are hosted in the parameter server and used for configuring ros files, and maintain those values even after a ros node is killed.

CalvinK gravatar imageCalvinK ( 2019-07-03 10:46:08 -0600 )edit