roslaunch file using rosparam
I'm trying to write a roslaunch file which opens a few nodes with unique ip addresses which are provided in a yaml file. If I wanted to start each one using terminals for each I would type it in as follows:
rosrun foo_pkg foo_node 1 192.168.100.10
rosrun foo_pkg foo_node 2 192.168.100.20
I want to be able to open them all in one launch file:
FIRST TRY SIMPLY CODING INTO LAUNCH FILE:
<launch>
<node name="FOO1"
pkg="foo_pkg"
type="foo_node"
args="1 192.168.100.10"
output="screen"/>
<node name="FOO2"
pkg="foo_pkg"
type="foo_node"
args="2 192.168.100.20"
output="screen"/>
</launch>
This didn't work, I guess I can't put the arguments in this way but don't know how to put them in correctly.
**In the end I want it to get these values from a launch file like below:**
ip:
board1:
num: 1
address: '192.168.10.10'
board2:
num: 2
address: '192.168.10.20'
So my main question is ... HOW CAN I USE THE ROSPARAMS INSIDE THE ROSLAUNCH FILE TO PROPERLY LAUNCH THEM?