Roslaunch
Roslaunch is a tool for easily launching multiple ROS nodes as well as setting parameters. Roslaunch takes in one or more XML configuration files (with the .launch extension) that specify the parameters to set and nodes to launch, as well as the machines that they should be run on.
Basic sytax is
<launch>
<param name="/parameter_name" type="variable_type" value="variable_value"/>
<node name="name_of_the_node" pkg="name_of_the_package" type="source_file.py" ns="namespace" args="optional arguments"/>
<include file="included.launch">
<arg name="arg_name" value="arg_val" />
</include>
</launch>
New .launch
Create new package rpi_feros_bringup used for launch files:
catkin_make.
Go the new package and create folder launch
Inside the folder create new file feros.launch
Copy the following lines
| rpi_led.launch | |
|---|---|
To run the rpi_led.launch use roslaunch function
By running this .launch file three things are started
roscore(automatically),button_publisher.py, andled_actuator.py.