What is the general structure of .launch file for using a sensor?
For example:
1.Following code is example for using a JoyStick to control TurtleSim
<launch>
<node pkg="turtlesim" type="turtlesim_node" name="sim"/>
<node pkg="chapter4_tutorials" type="example1" name="example1" />
<param name="axis_linear" value="1" type="int" />
<param name="axis_angular" value="0" type="int" />
<node respawn="true" pkg="joy"type="joy" name="teleopJoy">
<param name="dev" type="string" value="/dev/input/js0" />
<param name="deadzone" value="0.12" />
</node>
</launch>
2.Using a Laser Range finder
<launch>
<node pkg="hokuyo_node" type="hokuyo_node" name="hokuyo_node"/>
<node pkg="rviz" type="rviz" name="rviz"
args="-d $(find chapter4_tutorials)/example2.vcg"/>
<node pkg="chapter4_tutorials" type="example2" name="example2" />
</launch>
What exactly is the syntax?
Why do we have two <node pkg>
?