ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I see two basic issues with the example posted in the question:
<param>
tag in the launch file set's the parameter name to param_1
. So we will have a parameter /trial/param_1
with a value determined by the station
arg to the launch file. However, the node tries to read a parameter called /trial/param_from_launch
. output
attribute for the node. So even if your node did work as intended you wouldn't see the output messages you're hoping to see (except the calls to ROS_ERROR
).What if you change your launch file to:
<launch>
<arg name="station" />
<node pkg="roscpp_tutorials" type="trial" name="trial" output="screen">
<param name="param_from_launch" value="$(arg station)" type="int" />
</node>
</launch>