Current pose of the sensor.


True if the sensor was updated.


See Also


**Required:** 0
**Type:** double
**Default:** 0
**Description:** For type "gaussian*", the mean of the Gaussian distribution
from which bias values are drawn.
](spec?ver=1.11&elem=sensor#noise_bias_mean)


[ Rviz is crashing on changing global fixed frame ](/question/414970/rviz-is-
crashing-on-changing-global-fixed-frame/)


Links


#####  <stddev> Element


Here a screenshot from gazebo window with imu_link pose (highlighted with red,
z = -1355 meters):


**Required:** 1
**Type:** string
**Default:** none
**Description:** The type of noise. Currently supported types are: "none" (no
noise). "gaussian" (draw noise values independently for each measurement from
a Gaussian distribution). "gaussian_quantized" ("gaussian" plus quantization
of outputs (ie. rounding))  ](spec?ver=1.11&elem=sensor#noise_type)


#####  <dynamic_bias_stddev> Element


[ SensorCategory ](namespacegazebo_1_1sensors.html#a166beb8385a31979c4f08a85aabdd1da "SensorCategory is used to categorize sensors. ")


* [ nav2 ](/questions/scope:all/sort:activity-desc/tags:nav2/page:1/)


**Required:** 1
**Type:**
**Default:**
**Description:** specifies range properties of each simulated lidar
](spec?ver=1.11&elem=sensor#lidar_range)


    * [ About logging and logger configuration ](../../Concepts/About-Logging.html)
    * [ About Quality of Service settings ](../../Concepts/About-Quality-of-Service-Settings.html)
    * [ About ROS 2 client libraries ](../../Concepts/About-ROS-2-Client-Libraries.html)
    * [ About ROS 2 interfaces ](../../Concepts/About-ROS-Interfaces.html)
    * [ About parameters in ROS 2 ](../../Concepts/About-ROS-2-Parameters.html)
    * [ Introspection with command line tools ](../../Concepts/About-Command-Line-Tools.html)
    * [ Overview and usage of RQt ](../../Concepts/About-RQt.html)
    * [ About Composition ](../../Concepts/About-Composition.html)
    * [ On the mixing of ament and catkin (catment) ](../../Concepts/About-Catment.html)
    * [ About Cross-compilation ](../../Concepts/About-Cross-Compilation.html)
    * [ About the build system ](../../Concepts/About-Build-System.html)
    * [ About internal ROS 2 interfaces ](../../Concepts/About-Internal-Interfaces.html)
    * [ About ROS 2 middleware implementations ](../../Concepts/About-Middleware-Implementations.html)
    * [ ROS 2 Client Interfaces (Client Libraries) ](../../Concepts/About-Client-Interfaces.html)
  * [ Contributing ](../../Contributing.html)
    * [ ROS 2 developer guide ](../../Contributing/Developer-Guide.html)
    * [ Code style and language versions ](../../Contributing/Code-Style-Language-Versions.html)
    * [ Quality guide: ensuring code quality ](../../Contributing/Quality-Guide.html)
    * [ Migration guide from ROS 1 ](../../Contributing/Migration-Guide.html)
      * [ Python migration guide from ROS 1 ](../../Contributing/Migration-Guide-Python.html)
  * [ Contact ](../../Contact.html)
  * [ ROSCon Content ](../../ROSCon-Content.html)
  * [ Distributions ](../../Releases.html)
    * [ ROS 2 alpha releases (Aug 2015 - Oct 2016) ](../../Releases/Alpha-Overview.html)
    * [ Beta 1 (codename âAsphaltâ; December 2016) ](../../Releases/Beta1-Overview.html)
    * [ Beta 2 (codename âr2b2â; July 2017) ](../../Releases/Beta2-Overview.html)
    * [ Beta 3 (codename âr2b3â; September 2017) ](../../Releases/Beta3-Overview.html)
    * [ ROS 2 Ardent Apalone (codename âardentâ; December 2017) ](../../Releases/Release-Ardent-Apalone.html)
    * [ ROS 2 Bouncy Bolson (codename âbouncyâ; June 2018) ](../../Releases/Release-Bouncy-Bolson.html)
    * [ ROS 2 Crystal Clemmys (codename âcrystalâ; December 2018) ](../../Releases/Release-Crystal-Clemmys.html)
    * [ ROS 2 Dashing Diademata (codename âdashingâ; May 31st, 2019) ](../../Releases/Release-Dashing-Diademata.html)
    * [ ROS 2 Eloquent Elusor (codename âeloquentâ; November 22nd, 2019) ](../../Releases/Release-Eloquent-Elusor.html)
    * [ ROS 2 Foxy Fitzroy (codename âfoxyâ; June 5th, 2020) ](../../Releases/Release-Foxy-Fitzroy.html)
    * [ ROS 2 Galactic Geochelone (codename âgalacticâ; May, 2021) ](../../Releases/Release-Galactic-Geochelone.html)
    * [ ROS 2 Galactic Geochelone Complete Changelog ](../../Releases/Galactic-Geochelone-Complete-Changelog.html)
    * [ ROS 2 Humble Hawksbill (codename âhumbleâ; May, 2022) ](../../Releases/Release-Humble-Hawksbill.html)
    * [ ROS 2 Rolling Ridley (codename ârollingâ; June 2020) ](../../Releases/Release-Rolling-Ridley.html)
  * [ Features Status ](../../Features.html)
  * [ Roadmap ](../../Roadmap.html)
  * [ Feature Ideas ](../../Feature-Ideas.html)


###  Basic node and launch file for this example


_Check out **[ ROS For Beginners ](https://rbcknd.com/ros-for-beginners) **
and learn ROS step by step. _


**Package Links**


    <node
      pkg="name_of_the_package"
      type="name_of_the_executable"
      name="name_of_the_node"
    />


There are many new features being planned for ` roslaunch ` . These include
new features within the launch file syntax, GUI tools for interacting with
launch files more effectively, network API, better coordination between
separate launch files, and more.


rosrun noetic_basics_part_1 simple_publisher_node


** [ Check out the course here ](https://rbcknd.com/ros-for-beginners) **


As we did for the robot_upstart install script, let’s just write a Python code
that will do the exact same thing as using the uninstall script in the
terminal.


* **kinetic:** _Documentation generated on November 02, 2020 at 03:46 AM_ ( [ doc job ](http://build.ros.org/view/Kdoc/job/Kdoc__ros_comm__ubuntu_xenial_amd64) ).


**You're reading the documentation for a version of ROS 2 that has reached its
EOL (end-of-life), and is no longer officially supported. If you want up-to-
date information, please have a look at[ Iron ](../../../iron/index.html) . **


Press CTRL + C when you want the nodes to stop.


Copy and paste the complete code into the ` turtlesim_mimic_launch.py  ` file:


* **electric:** _Documentation generated on March 02, 2013 at 01:23 PM_


    from launch import LaunchDescription
    from launch_ros.actions import Node


Here you have 2 options: using only the terminal, or the robot_upstart Python
API.


If you need help with something, please **[ fill out this form.
](https://automaticaddison.com/contact/) ** Thank you!


##  Want to learn ROS?


_**[ ros_comm ](/ros_comm?distro=noetic) ** : [ message_filters
](/message_filters?distro=noetic) | [ ros ](/ros?distro=noetic) | [ rosbag
](/rosbag?distro=noetic) | [ rosconsole ](/rosconsole?distro=noetic) | [
roscpp ](/roscpp?distro=noetic) | [ rosgraph ](/rosgraph?distro=noetic) | [
rosgraph_msgs ](/rosgraph_msgs?distro=noetic) | roslaunch | [ roslisp
](/roslisp?distro=noetic) | [ rosmaster ](/rosmaster?distro=noetic) | [ rosmsg
](/rosmsg?distro=noetic) | [ rosnode ](/rosnode?distro=noetic) | [ rosout
](/rosout?distro=noetic) | [ rosparam ](/rosparam?distro=noetic) | [ rospy
](/rospy?distro=noetic) | [ rosservice ](/rosservice?distro=noetic) | [
rostest ](/rostest?distro=noetic) | [ rostopic ](/rostopic?distro=noetic) | [
roswtf ](/roswtf?distro=noetic) | [ std_srvs ](/std_srvs?distro=noetic) | [
topic_tools ](/topic_tools?distro=noetic) | [ xmlrpcpp
](/xmlrpcpp?distro=noetic) _


#  How to Create a Launch File for Python Nodes


  * **[ Code API ](http://docs.ros.org/hydro/api/roslaunch/html) **
  * [ Tutorials ](/roslaunch/Tutorials)
  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:roslaunch/page:1/)
  * [ Changelog ](http://docs.ros.org/en/hydro/changelogs/roslaunch/changelog.html)
  * [ Change List ](/ros_comm/ChangeList)
  * [ Reviews ](/roslaunch/Reviews)


roslaunch is a tool for easily launching multiple ROS [ nodes
](http://ros.org/wiki/Nodes) locally and remotely via SSH, as well as setting
parameters on the [ Parameter Server ](http://ros.org/wiki/Parameter Server) .
It includes options to automatically respawn processes that have already died.
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.


    $ rosrun robot_upstart install my_robot_bringup/launch/my_robot.launch --job my_robot_ros
    /lib/systemd/systemd
    Preparing to install files to the following paths:
      /etc/ros/melodic/my_robot_ros.d/.installed_files
      /etc/ros/melodic/my_robot_ros.d/my_robot.launch
      /etc/systemd/system/multi-user.target.wants/my_robot_ros.service
      /lib/systemd/system/my_robot_ros.service
      /usr/sbin/my_robot_ros-start
      /usr/sbin/my_robot_ros-stop
    Now calling: /usr/bin/sudo /opt/ros/melodic/lib/robot_upstart/mutate_files
    [sudo] password for user:
    Filesystem operation succeeded.
    ** To complete installation please run the following command:
     sudo systemctl daemon-reload && sudo systemctl start my_robot_ros


Here’s the outcome when you run the robot_upstart install script:


Let’s now see how to uninstall a job that you created with the robot_upstart
install script.


Every launch file in ROS needs to have exactly one root element. All the other
stuff in the launch file needs to be between these two tags.


_**[ ros_comm ](/ros_comm?distro=groovy) ** : [ message_filters
](/message_filters?distro=groovy) | [ ros ](/ros?distro=groovy) | [ rosbag
](/rosbag?distro=groovy) | [ rosconsole ](/rosconsole?distro=groovy) | [
roscpp ](/roscpp?distro=groovy) | [ rosgraph ](/rosgraph?distro=groovy) | [
rosgraph_msgs ](/rosgraph_msgs?distro=groovy) | roslaunch | [ roslisp
](/roslisp?distro=groovy) | [ rosmaster ](/rosmaster?distro=groovy) | [ rosmsg
](/rosmsg?distro=groovy) | [ rosnode ](/rosnode?distro=groovy) | [ rosout
](/rosout?distro=groovy) | [ rosparam ](/rosparam?distro=groovy) | [ rospy
](/rospy?distro=groovy) | [ rosservice ](/rosservice?distro=groovy) | [
rostest ](/rostest?distro=groovy) | [ rostopic ](/rostopic?distro=groovy) | [
roswtf ](/roswtf?distro=groovy) | [ std_srvs ](/std_srvs?distro=groovy) | [
topic_tools ](/topic_tools?distro=groovy) | [ xmlrpcpp
](/xmlrpcpp?distro=groovy) _


  * [ catkin ](/catkin?distro=groovy)
  * [ python-paramiko ](/python-paramiko?distro=groovy)
  * [ python-yaml ](/python-yaml?distro=groovy)
  * [ rosclean ](/rosclean?distro=groovy)
  * [ rosgraph_msgs ](/rosgraph_msgs?distro=groovy)
  * [ roslib ](/roslib?distro=groovy)
  * [ rosmaster ](/rosmaster?distro=groovy)
  * [ rosout ](/rosout?distro=groovy)
  * [ rosparam ](/rosparam?distro=groovy)


A simple usage example of the Python API can be found here:


Pass an optional argument " ` USE_TEST_DEPENDENCIES ` " to `
roslaunch_add_file_check ` as the following example, if your package defines
dependency for the tests (e.g. ` test_depend ` ). This avoids issues that
happen during tests such as [ this issue
](http://answers.ros.org/question/262558/buildfarm-missing-package-
dependencies-pkg_namepackagexml) .


  * [ catkin ](/catkin?distro=lunar)
  * [ rosclean ](/rosclean?distro=lunar)
  * [ rosgraph_msgs ](/rosgraph_msgs?distro=lunar)
  * [ roslib ](/roslib?distro=lunar)
  * [ rosmaster ](/rosmaster?distro=lunar)
  * [ rosout ](/rosout?distro=lunar)
  * [ rosparam ](/rosparam?distro=lunar)
  * [ rosunit ](/rosunit?distro=lunar)


Analytics


* [ roslaunch .launch/XML format ](/roslaunch/XML)


Documented


    cd launch
    ros2 launch turtlesim_mimic_launch.py


Type the following code in the file, and then click Save.


mkdir launch


Well, that’s about it for installing and uninstalling a job to start a ROS
launch file on boot. Quite simple, isn’t it?


In this file (edit with admin rights), add a new line:  ` ACTION=="add",
KERNEL=="dialout", MODE="0666" ` . This will make the “dialout” group
available for all unprivileged users.


  * [ app_manager ](/app_manager?distro=groovy)
  * [ bwi_launch ](/bwi_launch?distro=groovy)
  * [ capabilities ](/capabilities?distro=groovy)
  * [ default_cfg_fkie ](/default_cfg_fkie?distro=groovy)
  * [ infinisoleil ](/infinisoleil?distro=groovy)
  * [ jsk_topic_tools ](/jsk_topic_tools?distro=groovy)
  * [ launchman ](/launchman?distro=groovy)
  * [ mocap_optitrack ](/mocap_optitrack?distro=groovy)
  * [ nao_audio ](/nao_audio?distro=groovy)
  * [ nao_driver ](/nao_driver?distro=groovy)
  * [ nao_vision ](/nao_vision?distro=groovy)
  * [ node_manager_fkie ](/node_manager_fkie?distro=groovy)
  * [ parallel_util ](/parallel_util?distro=groovy)
  * [ rocon_test ](/rocon_test?distro=groovy)
  * [ ros_comm ](/ros_comm?distro=groovy)
  * [ rostest ](/rostest?distro=groovy)
  * [ roswtf ](/roswtf?distro=groovy)
  * [ rqt_launch ](/rqt_launch?distro=groovy)
  * [ segbot_bringup ](/segbot_bringup?distro=groovy)
  * [ segbot_gazebo ](/segbot_gazebo?distro=groovy)
  * [ segbot_navigation ](/segbot_navigation?distro=groovy)
  * [ segbot_sensors ](/segbot_sensors?distro=groovy)
  * [ test_roslaunch ](/test_roslaunch?distro=groovy)
  * [ turtlebot_app_manage... ](/turtlebot_app_manager?distro=groovy)
  * [ ueye ](/ueye?distro=groovy)


The launch file syntax itself is **stable** , and every effort will be made to
provide backwards compatibility with new features.


` rosrun robot_upstart install my_robot_bringup/launch/my_robot.launch --job
my_robot_ros --symlink `


  * Build history (last 5 of 13 builds):
  * [ #141  21-Nov-2023 22:20  1426 / 1427  ](https://build.ros.org//job/Ndev__ros_comm__ubuntu_focal_amd64/141/)
  * [ #140  20-Apr-2023 14:20  1423 / 1424  ](https://build.ros.org//job/Ndev__ros_comm__ubuntu_focal_amd64/140/)
  * [ #139  15-Feb-2023 14:20  1423 / 1424  ](https://build.ros.org//job/Ndev__ros_comm__ubuntu_focal_amd64/139/)
  * [ #138  25-Jan-2023 18:20  1423 / 1424  ](https://build.ros.org//job/Ndev__ros_comm__ubuntu_focal_amd64/138/)
  * [ #137  25-Jan-2023 17:20  1423 / 1424  ](https://build.ros.org//job/Ndev__ros_comm__ubuntu_focal_amd64/137/)


` roslaunch ` was designed to fit the ROS architecture of complexity via
composition. Understanding ` roslaunch ` 's architecture will give you better
insight in how to construct your ` .launch ` files and better debug remote vs.
local launches.


  * Setup for robot_upstart
    * Install robot_upstart package
    * Basic node and launch file for this example
  * robot_upstart install script
    * Install script from terminal
    * Testing time
    * robot_upstart install with Python API
  * Uninstall
    * Disabling
    * Uninstall from terminal
    * robot_upstart uninstall with Python API
  * Warning about hardware permissions
  * Going further


  * Tutorials
    * [ ROS ](https://roboticsbackend.com/category/ros/)
    * [ ROS2 ](https://roboticsbackend.com/category/ros2/)
    * [ Raspberry Pi ](https://roboticsbackend.com/category/raspberry-pi/)
    * [ Arduino ](https://roboticsbackend.com/category/arduino/)
  * [ Youtube ](https://www.youtube.com/channel/UCelRThOKlWMnpjqr5EBq6tg?sub_confirmation=1)
  * [ **Courses** ](https://roboticsbackend.com/courses/)
  * [ Contact ](https://roboticsbackend.com/contact/)
  * [ **[NEW] ROS 2 Book!** ](https://roboticsbackend.com/ros-2-book-waiting-list/)


##  Going further


  * Maintainer status: maintained
  * Maintainer: Dirk Thomas <dthomas AT osrfoundation DOT org>
  * Author: Ken Conley
  * License: BSD
  * Source: git [ https://github.com/ros/ros_comm.git ](https://github.com/ros/ros_comm) (branch: indigo-devel)


###  Install script from terminal


**[ >> ROS For Beginners - A Step By Step Course << ](https://rbcknd.com/ros-
for-beginners) **


  * Build history (last 5 of 69 builds):
  * [ #69  17-Oct-2020 03:32  1400 / 1401  ](http://build.ros.org//job/Mdev__ros_comm__ubuntu_bionic_amd64/69/)
  * [ #68  17-Oct-2020 00:15  1398 / 1401  ](http://build.ros.org//job/Mdev__ros_comm__ubuntu_bionic_amd64/68/)
  * [ #67  20-Aug-2020 20:15  1394 / 1395  ](http://build.ros.org//job/Mdev__ros_comm__ubuntu_bionic_amd64/67/)
  * [ #66  12-Aug-2020 16:15  1394 / 1395  ](http://build.ros.org//job/Mdev__ros_comm__ubuntu_bionic_amd64/66/)
  * [ #65  07-Aug-2020 17:15  1394 / 1395  ](http://build.ros.org//job/Mdev__ros_comm__ubuntu_bionic_amd64/65/)


  * Maintainer status: maintained
  * Maintainer: Michael Carroll <michael AT openrobotics DOT org>, Shane Loretz <sloretz AT openrobotics DOT org>
  * Author: Ken Conley, Dirk Thomas <dthomas AT osrfoundation DOT org>, Jacob Perron <jacob AT openrobotics DOT org>
  * License: BSD
  * Bug / feature tracker: [ https://github.com/ros/ros_comm/issues ](https://github.com/ros/ros_comm/issues)
  * Source: git [ https://github.com/ros/ros_comm.git ](https://github.com/ros/ros_comm) (branch: noetic-devel)


Continuous Integration


[ Previous  Previous post:  How to Create a Service in ROS Noetic
](https://automaticaddison.com/how-to-create-a-service-in-ros-noetic/)


roslaunch noetic_basics_part_1 noetic_basics_part_1.launch


One more thing: you can also try to change the “/counter_publisher_rate”
parameter in “my_robot.launch”. When you restart “my_robot_ros.service”, the
parameter’s value will be changed. But if you didn’t use the –symlink option
with the install script, the new value wouldn’t have been used.


These launch files usually bring up a set of nodes for the package that
provide some aggregate functionality.


  * [ warthog_gazebo ](/warthog_gazebo?distro=noetic)
  * [ warthog_viz ](/warthog_viz?distro=noetic)
  * [ xacro ](/xacro?distro=noetic)


First, open a new terminal window.


Finally, the install() method will execute the script as you previously did on
the terminal.


  * [ Home ](https://automaticaddison.com)
  * [ Need Help? ](https://automaticaddison.com/contact/)
  * [ Tutorials ](https://automaticaddison.com/tutorials/)
  * [ About Me ](https://automaticaddison.com/about-me/)


####  Privacy Overview


** Dependencies  (10) **


**Package Links**


* [ Emacs ](/roslaunch/Tutorials/Using%20Roslaunch%20with%20Emacs)


** Dependencies  (9) **


* 4 Introspect the system with rqt_graph


Linux  macOS  Windows


We’ll use the “install” script from the robot_upstart package to make a launch
file start on boot.


  * [ Installation ](../../Installation.html)
    * [ Building ROS 2 on Ubuntu Linux ](../../Installation/Ubuntu-Development-Setup.html)
    * [ Installing ROS 2 on Ubuntu Linux ](../../Installation/Ubuntu-Install-Binary.html)
    * [ Installing ROS 2 via Debian Packages ](../../Installation/Ubuntu-Install-Debians.html)
    * [ Building ROS 2 on macOS ](../../Installation/macOS-Development-Setup.html)
    * [ Installing ROS 2 on macOS ](../../Installation/macOS-Install-Binary.html)
    * [ Building ROS 2 on Windows ](../../Installation/Windows-Development-Setup.html)
    * [ Installing ROS 2 on Windows ](../../Installation/Windows-Install-Binary.html)
    * [ Building ROS 2 on Fedora Linux ](../../Installation/Fedora-Development-Setup.html)
    * [ Installing the latest ROS 2 development ](../../Installation/Latest-Development-Setup.html)
    * [ Maintaining a source checkout of ROS 2 ](../../Installation/Maintaining-a-Source-Checkout.html)
    * [ Pre-release Testing ](../../Installation/Prerelease-Testing.html)
    * [ Installing DDS implementations ](../../Installation/DDS-Implementations.html)
      * [ Installing Connext security plugins ](../../Installation/DDS-Implementations/Install-Connext-Security-Plugins.html)
      * [ Installing University or Evaluation versions of RTI Connext DDS ](../../Installation/DDS-Implementations/Install-Connext-University-Eval.html)
      * [ Working with Eclipse Cyclone DDS ](../../Installation/DDS-Implementations/Working-with-Eclipse-CycloneDDS.html)
  * [ Tutorials ](../../Tutorials.html)
    * [ Configuring your ROS 2 environment ](../Configuring-ROS2-Environment.html)
    * [ Introducing turtlesim and rqt ](../Turtlesim/Introducing-Turtlesim.html)
    * [ Understanding ROS 2 nodes ](../Understanding-ROS2-Nodes.html)
    * [ Understanding ROS 2 topics ](../Topics/Understanding-ROS2-Topics.html)
    * [ Understanding ROS 2 services ](../Services/Understanding-ROS2-Services.html)
    * [ Understanding ROS 2 parameters ](../Parameters/Understanding-ROS2-Parameters.html)
    * [ Understanding ROS 2 actions ](../Understanding-ROS2-Actions.html)
    * [ Using rqt_console ](../Rqt-Console/Using-Rqt-Console.html)
    * Creating a launch file
    * [ Recording and playing back data ](../Ros2bag/Recording-And-Playing-Back-Data.html)
    * [ Creating a workspace ](../Workspace/Creating-A-Workspace.html)
    * [ Creating your first ROS 2 package ](../Creating-Your-First-ROS2-Package.html)
    * [ Writing a simple publisher and subscriber (C++) ](../Writing-A-Simple-Cpp-Publisher-And-Subscriber.html)
    * [ Writing a simple publisher and subscriber (Python) ](../Writing-A-Simple-Py-Publisher-And-Subscriber.html)
    * [ Writing a simple service and client (C++) ](../Writing-A-Simple-Cpp-Service-And-Client.html)
    * [ Writing a simple service and client (Python) ](../Writing-A-Simple-Py-Service-And-Client.html)
    * [ Creating custom ROS 2 msg and srv files ](../Custom-ROS2-Interfaces.html)
    * [ Expanding on ROS 2 interfaces ](../Single-Package-Define-And-Use-Interface.html)
    * [ Using parameters in a class (C++) ](../Using-Parameters-In-A-Class-CPP.html)
    * [ Using parameters in a class (Python) ](../Using-Parameters-In-A-Class-Python.html)
    * [ Creating an action ](../Actions/Creating-an-Action.html)
    * [ Writing an action server and client (C++) ](../Actions/Writing-a-Cpp-Action-Server-Client.html)
    * [ Writing an action server and client (Python) ](../Actions/Writing-a-Py-Action-Server-Client.html)


For this example on how to use robot_upstart, we’ll use one node and one
launch file.


* [ roslaunch/API Usage ](/roslaunch/API%20Usage)


This tutorial works on all computers using Ubuntu, and especially Raspberry Pi
4 (and earlier 3B, 3B+) boards. If you’re using a Pi, make sure you have [
correctly installed ROS on it ](https://roboticsbackend.com/install-ros-on-
raspberry-pi-3/) .


It could be great if you could just power on your laptop/Raspberry Pi, and
after a few seconds, your robot automatically starts without you having to ssh
inside and run the command. So you can have a fully autonomous embedded
computer in your robot.


Do you want to learn how to program with ROS?


Functional cookies help to perform certain functionalities like sharing the
content of the website on social media platforms, collect feedbacks, and other
third-party features.


* [ Login ](/action/login/roslaunch?action=login)


You can also go into your systemâs file directory using the GUI and create a
new file that way.


Documented


Two turtlesim windows will open, and you will see the following ` [INFO]  `
messages telling you which nodes your launch file has started:


roslaunch is a tool for easily launching multiple ROS [ nodes
](http://ros.org/wiki/Nodes) locally and remotely via SSH, as well as setting
parameters on the [ Parameter Server ](http://ros.org/wiki/Parameter Server) .
It includes options to automatically respawn processes that have already died.
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.


  * **[ Code API ](http://docs.ros.org/en/kinetic/api/roslaunch/html) **
  * [ Tutorials ](/roslaunch/Tutorials)
  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:roslaunch/page:1/)
  * [ Changelog ](http://docs.ros.org/en/kinetic/changelogs/roslaunch/changelog.html)
  * [ Change List ](/ros_comm/ChangeList)
  * [ Reviews ](/roslaunch/Reviews)


Using the Python API may be more readable if you happen to have a lot of
arguments, and you can also use this script inside other Python code.


Released


2. [ How to Roslaunch Nodes in Valgrind or GDB ](/roslaunch/Tutorials/Roslaunch%20Nodes%20in%20Valgrind%20or%20GDB)


In Development


    Node(
        package='turtlesim',
        node_executable='mimic',
        node_name='mimic',
        remappings=[
          ('/input/pose', '/turtlesim1/turtle1/pose'),
          ('/output/cmd_vel', '/turtlesim2/turtle1/cmd_vel'),
        ]
    )


##  Warning about hardware permissions


![2020-01-07-145918](https://automaticaddison.com/wp-
content/uploads/2020/06/2020-01-07-145918.jpg)


Other uncategorized cookies are those that are being analyzed and have not
been classified into a category as yet.


_You are learning ROS?_


* Tasks


**Package Links**


  * **[ Code API ](http://docs.ros.org/groovy/api/roslaunch/html) **
  * [ Tutorials ](/roslaunch/Tutorials)
  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:roslaunch/page:1/)
  * [ Changelog ](http://docs.ros.org/en/groovy/changelogs/roslaunch/changelog.html)
  * [ Change List ](/ros_comm/ChangeList)
  * [ Reviews ](/roslaunch/Reviews)


Run the command:


$ roslaunch package_name file.launch


This is very handy when you want to debug your programs, so you don’t need to
reboot.


_**[ ros_comm ](/ros_comm?distro=hydro) ** : [ message_filters
](/message_filters?distro=hydro) | [ ros ](/ros?distro=hydro) | [ rosbag
](/rosbag?distro=hydro) | [ rosconsole ](/rosconsole?distro=hydro) | [ roscpp
](/roscpp?distro=hydro) | [ rosgraph ](/rosgraph?distro=hydro) | [
rosgraph_msgs ](/rosgraph_msgs?distro=hydro) | roslaunch | [ roslisp
](/roslisp?distro=hydro) | [ rosmaster ](/rosmaster?distro=hydro) | [ rosmsg
](/rosmsg?distro=hydro) | [ rosnode ](/rosnode?distro=hydro) | [ rosout
](/rosout?distro=hydro) | [ rosparam ](/rosparam?distro=hydro) | [ rospy
](/rospy?distro=hydro) | [ rosservice ](/rosservice?distro=hydro) | [ rostest
](/rostest?distro=hydro) | [ rostopic ](/rostopic?distro=hydro) | [ roswtf
](/roswtf?distro=hydro) | [ std_srvs ](/std_srvs?distro=hydro) | [ topic_tools
](/topic_tools?distro=hydro) | [ xmlrpcpp ](/xmlrpcpp?distro=hydro) _


  ROS 2 Documentation

The ROS Wiki is for ROS 1. Are you using ROS 2 ( [ Humble
](http://docs.ros.org/en/humble/) , [ Iron ](http://docs.ros.org/en/iron/) ,
or [ Rolling ](http://docs.ros.org/en/rolling/) )?
[ Check out the ROS 2 Project Documentation ](http://docs.ros.org)
Package specific documentation can be found on [ index.ros.org
](https://index.ros.org)

#  Wiki

  * [ Distributions ](/Distributions)
  * [ ROS/Installation ](/ROS/Installation)
  * [ ROS/Tutorials ](/ROS/Tutorials)
  * [ RecentChanges ](/RecentChanges)
  * [ Packages ](/Packages)

#  Page

  * Immutable Page
  * Comments
  * [ Info ](/action/info/Packages?action=info)
  * [ Attachments ](/action/AttachFile/Packages?action=AttachFile)
  * More Actions:  Raw Text  Print View  Render as Docbook  Delete Cache  \------------------------  Check Spelling  Like Pages  Local Site Map  \------------------------  Rename Page  Copy Page  Delete Page  \------------------------  My Pages  Subscribe User  \------------------------  Remove Spam  Revert to this revision  Package Pages  Sync Pages  \------------------------  CreatePdfDocument  Load  RawFile  Save  SlideShow

#  User

  * [ Login ](/action/login/Packages?action=login)

**_[ ROS Filesystem Concepts ](/ROS/Concepts) _ ** : Packages | [ Metapackages
](/Metapackages) | [ Manifest ](/Manifest) | [ msg ](/msg) | [ srv ](/srv)

Contents

  1. Common Files and Directories
  2. Command-line Tools
  3. Client Library Support
    1. Python
    2. C++


  * [ dsr_launcher ](/dsr_launcher?distro=kinetic)
  * [ fake_joint_driver ](/fake_joint_driver?distro=kinetic)
  * [ fake_joint_launch ](/fake_joint_launch?distro=kinetic)
  * [ fanuc_m710ic_additiv... ](/fanuc_m710ic_additive_manufacturing_support?distro=kinetic)
  * [ flir_ptu_driver ](/flir_ptu_driver?distro=kinetic)
  * [ flir_ptu_viz ](/flir_ptu_viz?distro=kinetic)
  * [ fsrobo_r_description... ](/fsrobo_r_description?distro=kinetic)
  * [ grizzly_gazebo ](/grizzly_gazebo?distro=kinetic)
  * [ grizzly_navigation ](/grizzly_navigation?distro=kinetic)
  * [ grizzly_viz ](/grizzly_viz?distro=kinetic)
  * [ heron_description ](/heron_description?distro=kinetic)
  * [ heron_simulator ](/heron_simulator?distro=kinetic)
  * [ heron_viz ](/heron_viz?distro=kinetic)
  * [ husky_base ](/husky_base?distro=kinetic)
  * [ husky_bringup ](/husky_bringup?distro=kinetic)
  * [ husky_control ](/husky_control?distro=kinetic)
  * [ husky_description ](/husky_description?distro=kinetic)
  * [ husky_gazebo ](/husky_gazebo?distro=kinetic)
  * [ husky_navigation ](/husky_navigation?distro=kinetic)
  * [ husky_viz ](/husky_viz?distro=kinetic)
  * [ infinisoleil ](/infinisoleil?distro=kinetic)
  * [ innok_heros_descript... ](/innok_heros_description?distro=kinetic)
  * [ jackal_control ](/jackal_control?distro=kinetic)
  * [ jackal_description ](/jackal_description?distro=kinetic)
  * [ jackal_gazebo ](/jackal_gazebo?distro=kinetic)
  * [ jackal_navigation ](/jackal_navigation?distro=kinetic)
  * [ jackal_viz ](/jackal_viz?distro=kinetic)
  * [ jog_controller ](/jog_controller?distro=kinetic)
  * [ jog_launch ](/jog_launch?distro=kinetic)
  * [ jsk_topic_tools ](/jsk_topic_tools?distro=kinetic)
  * [ khi_duaro_descriptio... ](/khi_duaro_description?distro=kinetic)
  * [ khi_rs_description ](/khi_rs_description?distro=kinetic)
  * [ kvh ](/kvh?distro=kinetic)
  * [ launchman ](/launchman?distro=kinetic)
  * [ mir_description ](/mir_description?distro=kinetic)
  * [ mir_driver ](/mir_driver?distro=kinetic)
  * [ mir_gazebo ](/mir_gazebo?distro=kinetic)
  * [ mir_navigation ](/mir_navigation?distro=kinetic)
  * [ mobility_base_bringu... ](/mobility_base_bringup?distro=kinetic)
  * [ mobility_base_gazebo... ](/mobility_base_gazebo?distro=kinetic)


####  2.1 Examine the launch file  ï


So, in this case there is one executable to start the launch file, and one to
stop it. On boot, systemd will call the first one automatically, and your
application will start in the background.


[ Documentation Status ](javascript:toggleDocStatus\(\))


    <launch>
    …
    </launch>


** Used by  (31) **


  * Author: unknown
  * License: unknown
  * Source: git [ https://github.com/ros/ros_comm.git ](https://github.com/ros/ros_comm) (branch: fuerte-devel)


_**[ ros_comm ](/ros_comm?distro=indigo) ** : [ message_filters
](/message_filters?distro=indigo) | [ ros ](/ros?distro=indigo) | [ rosbag
](/rosbag?distro=indigo) | [ rosconsole ](/rosconsole?distro=indigo) | [
roscpp ](/roscpp?distro=indigo) | [ rosgraph ](/rosgraph?distro=indigo) | [
rosgraph_msgs ](/rosgraph_msgs?distro=indigo) | roslaunch | [ roslisp
](/roslisp?distro=indigo) | [ rosmaster ](/rosmaster?distro=indigo) | [ rosmsg
](/rosmsg?distro=indigo) | [ rosnode ](/rosnode?distro=indigo) | [ rosout
](/rosout?distro=indigo) | [ rosparam ](/rosparam?distro=indigo) | [ rospy
](/rospy?distro=indigo) | [ rosservice ](/rosservice?distro=indigo) | [
rostest ](/rostest?distro=indigo) | [ rostopic ](/rostopic?distro=indigo) | [
roswtf ](/roswtf?distro=indigo) | [ std_srvs ](/std_srvs?distro=indigo) | [
topic_tools ](/topic_tools?distro=indigo) | [ xmlrpcpp
](/xmlrpcpp?distro=indigo) _


  * **[ Code API ](http://docs.ros.org/en/diamondback/api/roslaunch/html/) **
  * [ Tutorials ](/roslaunch/Tutorials)
  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:roslaunch/page:1/)
  * [ Reviews ](/roslaunch/Reviews)


  * [ mobility_base_tools ](/mobility_base_tools?distro=kinetic)
  * [ moose_description ](/moose_description?distro=kinetic)
  * [ moose_viz ](/moose_viz?distro=kinetic)
  * [ movidius_ncs_launch ](/movidius_ncs_launch?distro=kinetic)
  * [ mrpt_ekf_slam_2d ](/mrpt_ekf_slam_2d?distro=kinetic)
  * [ mrpt_ekf_slam_3d ](/mrpt_ekf_slam_3d?distro=kinetic)
  * [ mrpt_icp_slam_2d ](/mrpt_icp_slam_2d?distro=kinetic)
  * [ mrpt_rbpf_slam ](/mrpt_rbpf_slam?distro=kinetic)
  * [ multi_jackal_base ](/multi_jackal_base?distro=kinetic)
  * [ multi_jackal_control... ](/multi_jackal_control?distro=kinetic)
  * [ multi_jackal_descrip... ](/multi_jackal_description?distro=kinetic)
  * [ multi_jackal_nav ](/multi_jackal_nav?distro=kinetic)
  * [ multi_jackal_tutoria... ](/multi_jackal_tutorials?distro=kinetic)
  * [ mycroft_ros ](/mycroft_ros?distro=kinetic)
  * [ naoqi_driver_py ](/naoqi_driver_py?distro=kinetic)
  * [ nmea_comms ](/nmea_comms?distro=kinetic)
  * [ node_manager_fkie ](/node_manager_fkie?distro=kinetic)
  * [ novatel_span_driver ](/novatel_span_driver?distro=kinetic)
  * [ omronsentech_camera ](/omronsentech_camera?distro=kinetic)
  * [ open_manipulator_wit... ](/open_manipulator_with_tb3_tools?distro=kinetic)
  * [ openni2_launch ](/openni2_launch?distro=kinetic)
  * [ openni_launch ](/openni_launch?distro=kinetic)
  * [ oxford_gps_eth ](/oxford_gps_eth?distro=kinetic)
  * [ pcl_recorder ](/pcl_recorder?distro=kinetic)
  * [ phidgets_imu ](/phidgets_imu?distro=kinetic)
  * [ pr2_bringup ](/pr2_bringup?distro=kinetic)
  * [ pr2_controller_confi... ](/pr2_controller_configuration?distro=kinetic)
  * [ prbt_gazebo ](/prbt_gazebo?distro=kinetic)
  * [ pyros_utils ](/pyros_utils?distro=kinetic)
  * [ raptor_dbw_can ](/raptor_dbw_can?distro=kinetic)
  * [ raptor_dbw_joystick_... ](/raptor_dbw_joystick_demo?distro=kinetic)
  * [ raptor_dbw_joystick_... ](/raptor_dbw_joystick_speed_demo?distro=kinetic)
  * [ rb1_base_description... ](/rb1_base_description?distro=kinetic)
  * [ rb1_base_sim_bringup... ](/rb1_base_sim_bringup?distro=kinetic)
  * [ ridgeback_descriptio... ](/ridgeback_description?distro=kinetic)
  * [ ridgeback_gazebo ](/ridgeback_gazebo?distro=kinetic)
  * [ ridgeback_viz ](/ridgeback_viz?distro=kinetic)
  * [ robot_systemd ](/robot_systemd?distro=kinetic)
  * [ robot_upstart ](/robot_upstart?distro=kinetic)
  * [ roboteq_control ](/roboteq_control?distro=kinetic)


[ See roslaunch on index.ros.org for more info including aything ROS 2
related. ](https://index.ros.org/p/roslaunch)


Advertisement cookies are used to provide visitors with relevant ads and
marketing campaigns. These cookies track visitors across websites and collect
information to provide customized ads.


You can run the script via rosrun. The package name is “robot_upstart” and the
script name is “install”. Note that usually, when you use rosrun you have to
start a ROS master before, or else you’ll get a “Unable to register with
master node” error. Here, no need to do that, the script won’t create a node
when executed.


[ Automatic Addison ](https://automaticaddison.com/)


  * [ warthog_description ](/warthog_description?distro=kinetic)
  * [ warthog_gazebo ](/warthog_gazebo?distro=kinetic)
  * [ warthog_viz ](/warthog_viz?distro=kinetic)
  * [ xacro ](/xacro?distro=kinetic)
  * [ xarm_gripper ](/xarm_gripper?distro=kinetic)


ros2 launch <package_name> <launch_file_name>


  * **[ Code API ](http://docs.ros.org/lunar/api/roslaunch/html) **
  * [ Tutorials ](/roslaunch/Tutorials)
  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:roslaunch/page:1/)
  * [ Changelog ](http://docs.ros.org/en/lunar/changelogs/roslaunch/changelog.html)
  * [ Change List ](/ros_comm/ChangeList)
  * [ Reviews ](/roslaunch/Reviews)


#  Package Summary


To find out more about the main ` roslaunch ` tool and other command-line
tools, please consult:


  * Maintainer status: maintained
  * Maintainer: Dirk Thomas <dthomas AT osrfoundation DOT org>
  * Author: Ken Conley
  * License: BSD
  * Source: git [ https://github.com/ros/ros_comm.git ](https://github.com/ros/ros_comm) (branch: groovy-devel)


** Used by  (67) **


Fortunately there is a quick way to solve that, by creating a udev rule.


Documented


Analytical cookies are used to understand how visitors interact with the
website. These cookies help provide information on metrics the number of
visitors, bounce rate, traffic source, etc.


These import statements pull in some Python ` launch  ` modules.


    find_package(catkin REQUIRED COMPONENTS roslaunch)
    roslaunch_add_file_check(launch)


This will keep the files created before and the executables, but it will
prevent systemd from starting the launch file on boot. You can still use `
sudo systemctl start my_robot_ros.service ` and ` sudo systemctl stop
my_robot_ros.service ` to start and stop the launch file from the terminal.


[ ROS 2 Documentation: Dashing ![Logo](../../_static/dashing-small.png)
](../../index.html)


  * [ catkin ](/catkin?distro=jade)
  * [ rosclean ](/rosclean?distro=jade)
  * [ rosgraph_msgs ](/rosgraph_msgs?distro=jade)
  * [ roslib ](/roslib?distro=jade)
  * [ rosmaster ](/rosmaster?distro=jade)
  * [ rosout ](/rosout?distro=jade)
  * [ rosparam ](/rosparam?distro=jade)
  * [ rosunit ](/rosunit?distro=jade)


Note the only difference between the two nodes is their namespace values.
Unique namespaces allow the system to start two simulators without node name
nor topic name conflicts.


  * [ rosclean ](/rosclean?distro=diamondback)
  * [ rosgraph ](/rosgraph?distro=diamondback)
  * [ rosgraph_msgs ](/rosgraph_msgs?distro=diamondback)
  * [ roslib ](/roslib?distro=diamondback)
  * [ rosmaster ](/rosmaster?distro=diamondback)
  * [ rosout ](/rosout?distro=diamondback)
  * [ rosparam ](/rosparam?distro=diamondback)
  * [ rospy ](/rospy?distro=diamondback)


gedit noetic_basics_part_1_py.launch


  Common Files and Directories

ROS packages tend to follow a common structure. Here are some of the
directories and files you may notice.

  * ` include/package_name ` : C++ include headers (make sure to export in the [ CMakeLists.txt ](/catkin/CMakeLists.txt#catkin_package.28.29) )

  * ` msg/ ` : [ Folder containing Message (msg) types ](/msg)

  * ` src/package_name/ ` : Source files, especially Python source that are exported to other packages.

  * ` srv/ ` : [ Folder containing Service (srv) types ](/srv)

  * ` scripts/ ` : executable scripts

  * ` CMakeLists.txt ` : CMake build file (see [ catkin/CMakeLists.txt ](/catkin/CMakeLists.txt) )

  * ` package.xml ` : Package [ catkin/package.xml ](/catkin/package.xml)

  * ` CHANGELOG.rst ` : Many packages will define a changelog which can be automatically injected into binary packaging and into the wiki page for the package


  * [ LinkedIn  ](https://www.linkedin.com/in/addisonsearscollins/)
  * [ YouTube  ](https://www.youtube.com/channel/UCyR7hy8XDVnqzBhdpRirOtg)


#  Package Summary


* [ rqt_launchtree ](/rqt_launchtree) allows you to interactively introspect launch files.


#  How to Create a Launch File for C++ Nodes


For rosbuild, see: [ rosbuild/Packages ](/rosbuild/Packages)

Software in ROS is organized in _packages_ . A package might contain ROS [
nodes ](/Nodes) , a ROS-independent library, a dataset, configuration files, a
third-party piece of software, or anything else that logically constitutes a
useful module. The goal of these packages it to provide this useful
functionality in an easy-to-consume manner so that software can be easily
reused. In general, ROS packages follow a "Goldilocks" principle: enough
functionality to be useful, but not too much that the package is heavyweight
and difficult to use from other software.

Packages are easy to create by hand or with tools like [ catkin_create_pkg
](/catkin/commands/catkin_create_pkg) . A ROS package is simply a directory
descended from ` ROS_PACKAGE_PATH ` (see [ ROS Environment Variables
](/ROS/EnvironmentVariables) ) that has a [ package.xml ](/Manifest) file in
it. Packages are the most atomic unit of build and the unit of release. This
means that a package is the smallest individual thing you can build in ROS and
it is the way software is bundled for release (meaning, for example, there is
one debian package for each ROS package), respectively.

Please see the [ catkin/package.xml ](/catkin/package.xml) section for
documentation on how to read and write ` package.xml ` files.


You will learn more about [ creating packages  ](../Creating-Your-First-
ROS2-Package.html#createpkg) in a later tutorial.


First you import the robot_upstart package. Then you can create a “Job” object
and give it a name. There is no argument to set the symlink option here, so
you have to directly set the symlink attribute to True (default is False).


Open a new terminal window, and type:


**Goal:** Create a launch file to run a complex ROS 2 system.


  * Maintainer status: maintained
  * Maintainer: Dirk Thomas <dthomas AT osrfoundation DOT org>
  * Author: Ken Conley
  * License: BSD
  * Source: git [ https://github.com/ros/ros_comm.git ](https://github.com/ros/ros_comm) (branch: hydro-devel)


Menu


And this is the launch file, located in the ‘my_robot_bringup’ package, inside
the ‘launch/’ folder.


The ` roslaunch ` [ package ](/Packages) contains the ` roslaunch ` tools,
which reads the [ roslaunch .launch/XML format ](/roslaunch/XML) . It also
contains a variety of other support tools to help you use these files.


Here is the output:


** Dependencies  (8) **


cd launch


[ ![ros.org](/custom/images/ros_org.png) ](/) |  [ About
](http://www.ros.org/about-ros) | [ Support ](/Support) | [ Discussion Forum
](http://discourse.ros.org/) | [ Index ](http://index.ros.org/) | [ Service
Status ](http://status.ros.org/) | [ ros @ Robotics Stack Exchange
](https://robotics.stackexchange.com/questions/tagged/ros)
---|---
![](/custom/images/menu_left.png) [
![Documentation](/custom/images/menu_documentation.png) ](/)
![](/custom/images/menu_spacer.png) [ ![Browse
Software](/custom/images/menu_browse_software.png)
](https://index.ros.org/packages) ![](/custom/images/menu_spacer.png) [
![News](/custom/images/menu_news.png) ](https://discourse.ros.org/c/general)
![](/custom/images/menu_spacer.png) [
![Download](/custom/images/menu_download.png) ](/ROS/Installation)
![](/custom/images/menu_right.png)

  * [ Packages ](/Packages)


###  1 Setup  ï


####  ROS 2 Documentation


Documented


Necessary


![37-ros-launch-fileJPG](https://automaticaddison.com/wp-
content/uploads/2020/06/37-ros-launch-fileJPG.jpg)


For more info check out: [ Hardware permissions with udev rules
](https://roboticsbackend.com/raspberry-pi-hardware-
permissions/#Give_hardware_permissions_with_udev_rules) .


_**[ ros_comm ](/ros_comm?distro=jade) ** : [ message_filters
](/message_filters?distro=jade) | [ ros ](/ros?distro=jade) | [ rosbag
](/rosbag?distro=jade) | [ rosconsole ](/rosconsole?distro=jade) | [ roscpp
](/roscpp?distro=jade) | [ rosgraph ](/rosgraph?distro=jade) | [ rosgraph_msgs
](/rosgraph_msgs?distro=jade) | roslaunch | [ roslisp ](/roslisp?distro=jade)
| [ rosmaster ](/rosmaster?distro=jade) | [ rosmsg ](/rosmsg?distro=jade) | [
rosnode ](/rosnode?distro=jade) | [ rosout ](/rosout?distro=jade) | [ rosparam
](/rosparam?distro=jade) | [ rospy ](/rospy?distro=jade) | [ rosservice
](/rosservice?distro=jade) | [ rostest ](/rostest?distro=jade) | [ rostopic
](/rostopic?distro=jade) | [ roswtf ](/roswtf?distro=jade) | [ std_srvs
](/std_srvs?distro=jade) | [ topic_tools ](/topic_tools?distro=jade) | [
xmlrpcpp ](/xmlrpcpp?distro=jade) _


Many ROS packages come with "launch files", which you can run with:


Well, there is a solution, called robot_upstart.


This node has added configuration details in the form of remappings.


© 2024 The Robotics Back-End | [ Courses
](https://roboticsbackend.com/courses) | [ Privacy Policy
](https://roboticsbackend.com/privacy-policy/) | [ Contact
](https://roboticsbackend.com/contact/)


roslaunch is a tool for easily launching multiple ROS [ nodes
](http://ros.org/wiki/Nodes) locally and remotely via SSH, as well as setting
parameters on the [ Parameter Server ](http://ros.org/wiki/Parameter Server) .
It includes options to automatically respawn processes that have already died.
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.


##  GUI


#  C++

In C++, you can use ` ros::package ` in the [ roslib ](/roslib) package to get
information about ROS packages. For example:

    #include <ros/package.h>

    ...

      std::string path = ros::package::getPath("roslib");
      using package::V_string;
      V_string packages;
      ros::package::getAll(packages);

Wiki: Packages (last edited 2019-04-14 23:31:02 by  [ IsaacSaito ](/IsaacSaito
"130s @ 47-33-47-138.dhcp.reno.nv.charter.com\[47.33.47.138\]") )

Except where otherwise noted, the ROS wiki is licensed under the
[ Creative Commons Attribution 3.0
](http://creativecommons.org/licenses/by/3.0/)

* * *

[ ![](/custom/images/brought_by_horiz.png) ](https://www.openrobotics.org/)


  * [ openni_launch ](/openni_launch?distro=noetic)
  * [ oxford_gps_eth ](/oxford_gps_eth?distro=noetic)
  * [ phidgets_acceleromet... ](/phidgets_accelerometer?distro=noetic)
  * [ phidgets_analog_inpu... ](/phidgets_analog_inputs?distro=noetic)
  * [ phidgets_analog_outp... ](/phidgets_analog_outputs?distro=noetic)
  * [ phidgets_digital_inp... ](/phidgets_digital_inputs?distro=noetic)
  * [ phidgets_digital_out... ](/phidgets_digital_outputs?distro=noetic)
  * [ phidgets_gyroscope ](/phidgets_gyroscope?distro=noetic)
  * [ phidgets_high_speed_... ](/phidgets_high_speed_encoder?distro=noetic)
  * [ phidgets_ik ](/phidgets_ik?distro=noetic)
  * [ phidgets_magnetomete... ](/phidgets_magnetometer?distro=noetic)
  * [ phidgets_motors ](/phidgets_motors?distro=noetic)
  * [ phidgets_spatial ](/phidgets_spatial?distro=noetic)
  * [ phidgets_temperature... ](/phidgets_temperature?distro=noetic)
  * [ pr2_bringup ](/pr2_bringup?distro=noetic)
  * [ pr2_controller_confi... ](/pr2_controller_configuration?distro=noetic)
  * [ prbt_gazebo ](/prbt_gazebo?distro=noetic)
  * [ psen_scan_v2 ](/psen_scan_v2?distro=noetic)
  * [ raptor_dbw_can ](/raptor_dbw_can?distro=noetic)
  * [ raptor_dbw_joystick_... ](/raptor_dbw_joystick_demo?distro=noetic)
  * [ raptor_dbw_joystick_... ](/raptor_dbw_joystick_speed_demo?distro=noetic)
  * [ ridgeback_descriptio... ](/ridgeback_description?distro=noetic)
  * [ ridgeback_gazebo ](/ridgeback_gazebo?distro=noetic)
  * [ ridgeback_viz ](/ridgeback_viz?distro=noetic)
  * [ robot_upstart ](/robot_upstart?distro=noetic)
  * [ ros_comm ](/ros_comm?distro=noetic)
  * [ rostest ](/rostest?distro=noetic)
  * [ roswtf ](/roswtf?distro=noetic)
  * [ rqt_launch ](/rqt_launch?distro=noetic)
  * [ sensehat_ros ](/sensehat_ros?distro=noetic)
  * [ sick_ldmrs_descripti... ](/sick_ldmrs_description?distro=noetic)
  * [ sick_ldmrs_driver ](/sick_ldmrs_driver?distro=noetic)
  * [ sick_ldmrs_tools ](/sick_ldmrs_tools?distro=noetic)
  * [ sick_tim ](/sick_tim?distro=noetic)
  * [ teleop_twist_joy ](/teleop_twist_joy?distro=noetic)
  * [ turtlebot3_autorace_... ](/turtlebot3_autorace_core?distro=noetic)
  * [ ublox_msg_filters ](/ublox_msg_filters?distro=noetic)
  * [ urdf_tutorial ](/urdf_tutorial?distro=noetic)
  * [ warthog_control ](/warthog_control?distro=noetic)
  * [ warthog_description ](/warthog_description?distro=noetic)


Running one or two nodes is fine this way. However, imagine if you had to run
30 nodes. You would have to open 30 separate terminal windows just to run each
node!


    import robot_upstart

    j = robot_upstart.Job(name="my_robot_ros")
    j.symlink = True

    j.add(package="my_robot_bringup", filename="launch/my_robot.launch")

    j.install()


Here’s a breakdown of all the arguments we used:


My goal is to meet everyone in the world who loves robotics. **[ Connect with
me on LinkedIn ](https://www.linkedin.com/in/addisonsearscollins/) ** if you
found my information useful to you. Also **[ follow my LinkedIn page
](https://www.linkedin.com/company/automaticaddison) where I post cool
robotics-related content. ** Don't be shy! I’d love to hear from you!


#  Package Summary


**pkg** and **type** let us know which program ROS needs to run. These two
lines are equivalent to what you would type in the terminal window manually
using the rosrun command.


** Dependencies  (8) **


Finally, we have the **output=”screen”** element. This element tells ROS to
display the output to the terminal window instead of inside special files
called log files (which are inside the ~/.ros/log directory).


* [ roslaunch Command-line Usage ](/roslaunch/Commandline%20Tools)


  * Author: Ken Conley/kwc@willowgarage.com
  * License: BSD
  * Source: git [ https://github.com/ros/ros_comm.git ](https://github.com/ros/ros_comm) (branch: ros_comm-1.6)


Released


  * [ Home ](https://automaticaddison.com)
  * [ Need Help? ](https://automaticaddison.com/contact/)
  * [ Tutorials ](https://automaticaddison.com/tutorials/)
  * [ About Me ](https://automaticaddison.com/about-me/)


Go to your package folder.


This website uses cookies to improve your experience while you navigate
through the website. Out of these, the cookies that are categorized as
necessary are stored on your browser as they are essential for the working of
basic functionalities of the website. We also use third-party cookies that
help us analyze and understand how you use this website. These cookies will be
stored in your browser only with your consent. You also have the option to
opt-out of these cookies. But opting out of some of these cookies may affect
your browsing experience.


Categories  [ Raspberry Pi Tutorials
](https://roboticsbackend.com/category/raspberry-pi/) , [ ROS Tutorials
](https://roboticsbackend.com/category/ros/)


You can test if the installation went correctly, without having to reboot your
computer/Raspberry Pi.


The code API of ` roslaunch ` is **very unstable** and should not be used
directly. In order to support the new features that are being planned, it may
be necessary to make major, incompatible changes to the programmatic API.


Others


###  robot_upstart uninstall with Python API


**Tutorial level:** Beginner


© Copyright 2024, Open Robotics.


To re-enable the systemd job, run:


_**[ ros_comm ](/ros_comm?distro=fuerte) ** : [ message_filters
](/message_filters?distro=fuerte) | [ perf_roscpp
](/perf_roscpp?distro=fuerte) | [ rosbag ](/rosbag?distro=fuerte) | [
rosconsole ](/rosconsole?distro=fuerte) | [ roscpp ](/roscpp?distro=fuerte) |
[ rosgraph ](/rosgraph?distro=fuerte) | [ rosgraph_msgs
](/rosgraph_msgs?distro=fuerte) | roslaunch | [ roslisp
](/roslisp?distro=fuerte) | [ rosmaster ](/rosmaster?distro=fuerte) | [ rosmsg
](/rosmsg?distro=fuerte) | [ rosnode ](/rosnode?distro=fuerte) | [ rosout
](/rosout?distro=fuerte) | [ rosparam ](/rosparam?distro=fuerte) | [ rospy
](/rospy?distro=fuerte) | [ rosservice ](/rosservice?distro=fuerte) | [
rostest ](/rostest?distro=fuerte) | [ rostopic ](/rostopic?distro=fuerte) | [
roswtf ](/roswtf?distro=fuerte) | [ std_srvs ](/std_srvs?distro=fuerte) | [
topic_tools ](/topic_tools?distro=fuerte) | [ xmlrpcpp
](/xmlrpcpp?distro=fuerte) _


* **melodic:** _Documentation generated on March 01, 2022 at 07:26 AM_ ( [ doc job ](https://build.ros.org/view/Mdoc/job/Mdoc__ros_comm__ubuntu_bionic_amd64) ).


[ ![ros.org](/custom/images/ros_org.png) ](/) |  [ About
](http://www.ros.org/about-ros) | [ Support ](/Support) | [ Discussion Forum
](http://discourse.ros.org/) | [ Index ](http://index.ros.org/) | [ Service
Status ](http://status.ros.org/) | [ ros @ Robotics Stack Exchange
](https://robotics.stackexchange.com/questions/tagged/ros)
---|---
![](/custom/images/menu_left.png) [
![Documentation](/custom/images/menu_documentation.png) ](/)
![](/custom/images/menu_spacer.png) [ ![Browse
Software](/custom/images/menu_browse_software.png)
](https://index.ros.org/packages) ![](/custom/images/menu_spacer.png) [
![News](/custom/images/menu_news.png) ](https://discourse.ros.org/c/general)
![](/custom/images/menu_spacer.png) [
![Download](/custom/images/menu_download.png) ](/ROS/Installation)
![](/custom/images/menu_right.png)

  * [ roslaunch ](/roslaunch)


Analytics


##  roscore


##  Summary  ï


_**[ ros_comm ](/ros_comm?distro=melodic) ** : [ message_filters
](/message_filters?distro=melodic) | [ ros ](/ros?distro=melodic) | [ rosbag
](/rosbag?distro=melodic) | [ rosconsole ](/rosconsole?distro=melodic) | [
roscpp ](/roscpp?distro=melodic) | [ rosgraph ](/rosgraph?distro=melodic) | [
rosgraph_msgs ](/rosgraph_msgs?distro=melodic) | roslaunch | [ roslisp
](/roslisp?distro=melodic) | [ rosmaster ](/rosmaster?distro=melodic) | [
rosmsg ](/rosmsg?distro=melodic) | [ rosnode ](/rosnode?distro=melodic) | [
rosout ](/rosout?distro=melodic) | [ rosparam ](/rosparam?distro=melodic) | [
rospy ](/rospy?distro=melodic) | [ rosservice ](/rosservice?distro=melodic) |
[ rostest ](/rostest?distro=melodic) | [ rostopic ](/rostopic?distro=melodic)
| [ roswtf ](/roswtf?distro=melodic) | [ std_srvs ](/std_srvs?distro=melodic)
| [ topic_tools ](/topic_tools?distro=melodic) | [ xmlrpcpp
](/xmlrpcpp?distro=melodic) _


[ ![The Robotics Back-End](https://roboticsbackend.com/wp-
content/uploads/2020/02/favicon_white.png) ](https://roboticsbackend.com/ "The
Robotics Back-End")


* **diamondback:** _Only showing information from the released package extracted on Unknown. No API documentation available. Please see[ this page ](http://wiki.ros.org/rosdistro/Tutorials/Indexing%20Your%20ROS%20Repository%20for%20Documentation%20Generation) for information on how to submit your repository to our index. _


Here’s the result you should see:


* **indigo:** _Documentation generated on June 07, 2019 at 04:55 AM_ ( [ doc job ](http://build.ros.org/view/Idoc/job/Idoc__ros_comm__ubuntu_trusty_amd64) ).


  * [ grizzly_navigation ](/grizzly_navigation?distro=indigo)
  * [ grizzly_viz ](/grizzly_viz?distro=indigo)
  * [ heron_description ](/heron_description?distro=indigo)
  * [ heron_viz ](/heron_viz?distro=indigo)
  * [ husky_base ](/husky_base?distro=indigo)
  * [ husky_bringup ](/husky_bringup?distro=indigo)
  * [ husky_control ](/husky_control?distro=indigo)
  * [ husky_description ](/husky_description?distro=indigo)
  * [ husky_gazebo ](/husky_gazebo?distro=indigo)
  * [ husky_navigation ](/husky_navigation?distro=indigo)
  * [ husky_ur5_moveit_con... ](/husky_ur5_moveit_config?distro=indigo)
  * [ husky_viz ](/husky_viz?distro=indigo)
  * [ imu_transformer ](/imu_transformer?distro=indigo)
  * [ industrial_robot_sim... ](/industrial_robot_simulator?distro=indigo)
  * [ infinisoleil ](/infinisoleil?distro=indigo)
  * [ innok_heros_control ](/innok_heros_control?distro=indigo)
  * [ innok_heros_descript... ](/innok_heros_description?distro=indigo)
  * [ innok_heros_gazebo ](/innok_heros_gazebo?distro=indigo)
  * [ interactive_marker_t... ](/interactive_marker_twist_server?distro=indigo)
  * [ jackal_base ](/jackal_base?distro=indigo)
  * [ jackal_control ](/jackal_control?distro=indigo)
  * [ jackal_description ](/jackal_description?distro=indigo)
  * [ jackal_gazebo ](/jackal_gazebo?distro=indigo)
  * [ jackal_navigation ](/jackal_navigation?distro=indigo)
  * [ jackal_viz ](/jackal_viz?distro=indigo)
  * [ kingfisher_descripti... ](/kingfisher_description?distro=indigo)
  * [ mir_description ](/mir_description?distro=indigo)
  * [ mir_driver ](/mir_driver?distro=indigo)
  * [ mir_gazebo ](/mir_gazebo?distro=indigo)
  * [ mir_navigation ](/mir_navigation?distro=indigo)
  * [ mobility_base_bringu... ](/mobility_base_bringup?distro=indigo)
  * [ mobility_base_gazebo... ](/mobility_base_gazebo?distro=indigo)
  * [ mobility_base_tools ](/mobility_base_tools?distro=indigo)
  * [ motoman_bmda3_suppor... ](/motoman_bmda3_support?distro=indigo)
  * [ motoman_mh5_support ](/motoman_mh5_support?distro=indigo)
  * [ motoman_mh_support ](/motoman_mh_support?distro=indigo)
  * [ motoman_mpl_support ](/motoman_mpl_support?distro=indigo)
  * [ motoman_sda10f_suppo... ](/motoman_sda10f_support?distro=indigo)
  * [ motoman_sia10d_suppo... ](/motoman_sia10d_support?distro=indigo)
  * [ motoman_sia10f_suppo... ](/motoman_sia10f_support?distro=indigo)


#  Package Summary


##  Next steps  ï


    $ sudo systemctl start my_robot_ros.service
    $ rosparam get /counter_publisher_rate
    5

    ...
    # Modify your launch file and change the parameter's value
    ...

    $ sudo systemctl start my_robot_ros.service
    $ rosparam get /counter_publisher_rate
    1


* **fuerte:** _Documentation generated on December 28, 2013 at 05:42 PM_


Contents


This tutorial explains how to use profiling tools for [ roscpp ](/roscpp) [
nodes ](/Nodes) that you are launching with [ roslaunch ](/roslaunch) .


* Next steps


  * **[ Code API ](http://docs.ros.org/en/noetic/api/roslaunch/html) **
  * [ Tutorials ](/roslaunch/Tutorials)
  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:roslaunch/page:1/)
  * [ Changelog ](http://docs.ros.org/en/noetic/changelogs/roslaunch/changelog.html)
  * [ Change List ](/ros_comm/ChangeList)
  * [ Reviews ](/roslaunch/Reviews)


Continuous Integration:  1400 / 1401


**Master ROS Concepts
**


Except where otherwise noted, the ROS wiki is licensed under the
[ Creative Commons Attribution 3.0
](http://creativecommons.org/licenses/by/3.0/)


    if (CATKIN_ENABLE_TESTING)
      find_package(roslaunch REQUIRED)
      roslaunch_add_file_check(launch)
    endif()


To install the package, simply run ` sudo apt-get install ros-<distro>-robot-
upstart ` , and replace “<distro>” by your ROS version: kinetic, melodic, …


Create a new directory to store your launch file:


[ ![Automatic Addison](https://automaticaddison.com/wp-
content/uploads/2018/11/cropped-logo_sq_240.png)
](https://automaticaddison.com/)


  1. Opened a terminal window
  2. Typed roscore
  3. Opened another terminal window
  4. Typed rosrun <name_of_package> <name_of_node>


Here is the output:


NOTE: ` roslaunch_add_file_check ` takes only one directory at a time.


* [ roslaunch Architecture ](/roslaunch/Architecture)


The macro accepts either a single directory or file argument. Basically, it
adds additional test targets into catkin generated Makefile.


  * [ app_manager ](/app_manager?distro=melodic)
  * [ ati_force_torque ](/ati_force_torque?distro=melodic)
  * [ capabilities ](/capabilities?distro=melodic)
  * [ cartographer_ros ](/cartographer_ros?distro=melodic)
  * [ caster_app ](/caster_app?distro=melodic)
  * [ caster_base ](/caster_base?distro=melodic)
  * [ caster_control ](/caster_control?distro=melodic)
  * [ caster_description ](/caster_description?distro=melodic)
  * [ caster_navigation ](/caster_navigation?distro=melodic)
  * [ cnn_bridge ](/cnn_bridge?distro=melodic)
  * [ copernicus_descripti... ](/copernicus_description?distro=melodic)
  * [ dataspeed_can_usb ](/dataspeed_can_usb?distro=melodic)
  * [ dataspeed_pds_can ](/dataspeed_pds_can?distro=melodic)
  * [ dataspeed_pds_lcm ](/dataspeed_pds_lcm?distro=melodic)
  * [ dbw_fca_can ](/dbw_fca_can?distro=melodic)
  * [ dbw_fca_description ](/dbw_fca_description?distro=melodic)
  * [ dbw_fca_joystick_dem... ](/dbw_fca_joystick_demo?distro=melodic)
  * [ dbw_mkz_can ](/dbw_mkz_can?distro=melodic)
  * [ dbw_mkz_description ](/dbw_mkz_description?distro=melodic)
  * [ dbw_mkz_joystick_dem... ](/dbw_mkz_joystick_demo?distro=melodic)
  * [ dbw_polaris_can ](/dbw_polaris_can?distro=melodic)
  * [ dbw_polaris_descript... ](/dbw_polaris_description?distro=melodic)
  * [ dbw_polaris_joystick... ](/dbw_polaris_joystick_demo?distro=melodic)
  * [ default_cfg_fkie ](/default_cfg_fkie?distro=melodic)
  * [ dsr_launcher ](/dsr_launcher?distro=melodic)
  * [ fake_joint_driver ](/fake_joint_driver?distro=melodic)
  * [ fake_joint_launch ](/fake_joint_launch?distro=melodic)
  * [ fsrobo_r_description... ](/fsrobo_r_description?distro=melodic)
  * [ heifu_description ](/heifu_description?distro=melodic)
  * [ heron_description ](/heron_description?distro=melodic)
  * [ heron_simulator ](/heron_simulator?distro=melodic)
  * [ heron_viz ](/heron_viz?distro=melodic)
  * [ husky_base ](/husky_base?distro=melodic)
  * [ husky_bringup ](/husky_bringup?distro=melodic)
  * [ husky_control ](/husky_control?distro=melodic)
  * [ husky_description ](/husky_description?distro=melodic)
  * [ husky_gazebo ](/husky_gazebo?distro=melodic)
  * [ husky_navigation ](/husky_navigation?distro=melodic)
  * [ husky_viz ](/husky_viz?distro=melodic)
  * [ jackal_control ](/jackal_control?distro=melodic)


[ ![](/custom/images/brought_by_horiz.png) ](https://www.openrobotics.org/)


Other Versions  v: dashing


    $ sudo systemctl disable my_robot_ros.service
    Removed /etc/systemd/system/multi-user.target.wants/my_robot_ros.service.


roscd noetic_basics_part_1/launch


** Dependencies  (8) **


Continuous Integration


**Package Links**


##  Setup for robot_upstart


  * [ source ubuntu bionic ](https://build.ros.org/view/Msrc_uB/job/Msrc_uB__roslaunch__ubuntu_bionic__source)
  * [ binary ubuntu bionic amd64 ](https://build.ros.org/view/Mbin_uB64/job/Mbin_uB64__roslaunch__ubuntu_bionic_amd64__binary)
  * [ binary ubuntu bionic armhf ](https://build.ros.org/view/Mbin_ubhf_uBhf/job/Mbin_ubhf_uBhf__roslaunch__ubuntu_bionic_armhf__binary)
  * [ binary ubuntu bionic arm64 ](https://build.ros.org/view/Mbin_ubv8_uBv8/job/Mbin_ubv8_uBv8__roslaunch__ubuntu_bionic_arm64__binary)
  * [ devel ubuntu bionic amd64 ](https://build.ros.org/view/Mdev/job/Mdev__ros_comm__ubuntu_bionic_amd64)
  * [ doc ](https://build.ros.org/view/Mdoc/job/Mdoc__ros_comm__ubuntu_bionic_amd64)


  * [ app_manager ](/app_manager?distro=fuerte)
  * [ corobot_state_tf ](/corobot_state_tf?distro=fuerte)
  * [ corobot_teleop ](/corobot_teleop?distro=fuerte)
  * [ default_cfg_fkie ](/default_cfg_fkie?distro=fuerte)
  * [ hrl_move_floor_detec... ](/hrl_move_floor_detect?distro=fuerte)
  * [ hrl_object_fetching ](/hrl_object_fetching?distro=fuerte)
  * [ hrl_table_detect ](/hrl_table_detect?distro=fuerte)
  * [ launchman ](/launchman?distro=fuerte)
  * [ node_manager_fkie ](/node_manager_fkie?distro=fuerte)
  * [ openrave_calibration... ](/openrave_calibration?distro=fuerte)
  * [ parallel_util ](/parallel_util?distro=fuerte)
  * [ pr2_props_rfn ](/pr2_props_rfn?distro=fuerte)
  * [ roslaunch_caller ](/roslaunch_caller?distro=fuerte)
  * [ turtlebot_follower_r... ](/turtlebot_follower_rfn?distro=fuerte)


Now that we’ve created the launch file, let’s run it. The syntax for running a
launch file is as follows:


** Used by  (153) **


A few graphical tools are available to support ` launch ` functionalities of
ROS.


This is the node, located in the ‘my_robot_tutorials’ package for this
tutorial.


  * **[ Code API ](http://docs.ros.org/fuerte/api/roslaunch/html) **
  * [ Tutorials ](/roslaunch/Tutorials)
  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:roslaunch/page:1/)
  * [ Change List ](/ros_comm/ChangeList)
  * [ Reviews ](/roslaunch/Reviews)


Let’s look at how to create a launch file in ROS that launches two nodes at
the same time. We will launch **simple_publisher_node** and
**simple_subscriber_node** that exist inside the noetic_basics_part_1 package.


* **lunar:** _Documentation generated on February 03, 2019 at 11:24 AM_ ( [ doc job ](http://build.ros.org/view/Ldoc/job/Ldoc__ros_comm__ubuntu_xenial_amd64) ).


Build the Future


** Used by  (14) **


###  3 ros2 launch  ï


##  Tasks  ï


Documented


#  Wiki


Ref. [ SIG for roslaunch ](/sig/roslaunch)


Now that we have everything setup, let’s make this ROS launch file start on
boot!


**Package Links**


**Note:** these *.launch file tests can also be initiated using console tool
called [ roslaunch-check ](/roslaunch/Commandline%20Tools#roslaunch-check) OR
[ roslaunch-deps ](/roslaunch/Commandline%20Tools#roslaunch-deps) .


    cd /etc/udev/rules.d/
    sudo touch local.rules


  * [ rocon_test ](/rocon_test?distro=indigo)
  * [ ros_comm ](/ros_comm?distro=indigo)
  * [ rostest ](/rostest?distro=indigo)
  * [ roswtf ](/roswtf?distro=indigo)
  * [ rplidar_python ](/rplidar_python?distro=indigo)
  * [ rqt_joint_trajectory... ](/rqt_joint_trajectory_plot?distro=indigo)
  * [ rqt_launch ](/rqt_launch?distro=indigo)
  * [ rqt_launchtree ](/rqt_launchtree?distro=indigo)
  * [ schunk_lwa4d ](/schunk_lwa4d?distro=indigo)
  * [ schunk_lwa4p ](/schunk_lwa4p?distro=indigo)
  * [ schunk_lwa4p_extende... ](/schunk_lwa4p_extended?distro=indigo)
  * [ schunk_pg70 ](/schunk_pg70?distro=indigo)
  * [ schunk_pw70 ](/schunk_pw70?distro=indigo)
  * [ sick_ldmrs_descripti... ](/sick_ldmrs_description?distro=indigo)
  * [ sick_ldmrs_driver ](/sick_ldmrs_driver?distro=indigo)
  * [ sick_ldmrs_tools ](/sick_ldmrs_tools?distro=indigo)
  * [ sick_tim ](/sick_tim?distro=indigo)
  * [ sick_visionary_t_dri... ](/sick_visionary_t_driver?distro=indigo)
  * [ staubli_rx160_suppor... ](/staubli_rx160_support?distro=indigo)
  * [ staubli_tx60_support... ](/staubli_tx60_support?distro=indigo)
  * [ staubli_tx90_support... ](/staubli_tx90_support?distro=indigo)
  * [ summit_xl_descriptio... ](/summit_xl_description?distro=indigo)
  * [ summit_xl_sim_bringu... ](/summit_xl_sim_bringup?distro=indigo)
  * [ teleop_twist_joy ](/teleop_twist_joy?distro=indigo)
  * [ ueye ](/ueye?distro=indigo)
  * [ urdf_tutorial ](/urdf_tutorial?distro=indigo)
  * [ ursa_driver ](/ursa_driver?distro=indigo)
  * [ vrpn_client_ros ](/vrpn_client_ros?distro=indigo)
  * [ warthog_control ](/warthog_control?distro=indigo)
  * [ warthog_description ](/warthog_description?distro=indigo)
  * [ warthog_gazebo ](/warthog_gazebo?distro=indigo)
  * [ warthog_viz ](/warthog_viz?distro=indigo)
  * [ xacro ](/xacro?distro=indigo)


  * Immutable Page
  * Comments
  * [ Info ](/action/info/roslaunch?action=info)
  * [ Attachments ](/action/AttachFile/roslaunch?action=AttachFile)
  * More Actions:  Raw Text  Print View  Render as Docbook  Delete Cache  \------------------------  Check Spelling  Like Pages  Local Site Map  \------------------------  Rename Page  Copy Page  Delete Page  \------------------------  My Pages  Subscribe User  \------------------------  Remove Spam  Revert to this revision  Package Pages  Sync Pages  \------------------------  CreatePdfDocument  Load  RawFile  Save  SlideShow


##  Catkin


In this tutorial you have discovered how to make your ROS launch file start on
boot, thanks to the robot_upstart package. You know how to install and
uninstall a startup job, both from the terminal or using the Python API. Also,
you know how to do basic debugging on those startup jobs you have created.


###  2 Write the launch file  ï


** Used by  (7) **


Create a launch file named ` turtlesim_mimic_launch.py  ` by entering the
following command in the terminal:


##  Overview


* [ Vim ](https://gist.github.com/jbohren/5964014)


* Summary


Manage consent


* Background


Continuous Integration:  1426 / 1427


When the launch file is started on boot with the job you created in the
install script, the user will be the same user who installed the script, but
it will be an **unprivileged user** . You loose the group memberships you’ve
setup before.


Go to your package launch folder.


Close


_**[ ros_comm ](/ros_comm?distro=lunar) ** : [ message_filters
](/message_filters?distro=lunar) | [ ros ](/ros?distro=lunar) | [ rosbag
](/rosbag?distro=lunar) | [ rosconsole ](/rosconsole?distro=lunar) | [ roscpp
](/roscpp?distro=lunar) | [ rosgraph ](/rosgraph?distro=lunar) | [
rosgraph_msgs ](/rosgraph_msgs?distro=lunar) | roslaunch | [ roslisp
](/roslisp?distro=lunar) | [ rosmaster ](/rosmaster?distro=lunar) | [ rosmsg
](/rosmsg?distro=lunar) | [ rosnode ](/rosnode?distro=lunar) | [ rosout
](/rosout?distro=lunar) | [ rosparam ](/rosparam?distro=lunar) | [ rospy
](/rospy?distro=lunar) | [ rosservice ](/rosservice?distro=lunar) | [ rostest
](/rostest?distro=lunar) | [ rostopic ](/rostopic?distro=lunar) | [ roswtf
](/roswtf?distro=lunar) | [ std_srvs ](/std_srvs?distro=lunar) | [ topic_tools
](/topic_tools?distro=lunar) | [ xmlrpcpp ](/xmlrpcpp?distro=lunar) _


** Dependencies  (11) **


New in K Turtle


  * **[ Code API ](http://docs.ros.org/en/melodic/api/roslaunch/html) **
  * [ Tutorials ](/roslaunch/Tutorials)
  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:roslaunch/page:1/)
  * [ Changelog ](http://docs.ros.org/en/melodic/changelogs/roslaunch/changelog.html)
  * [ Change List ](/ros_comm/ChangeList)
  * [ Reviews ](/roslaunch/Reviews)


  * [ catkin ](/catkin?distro=indigo)
  * [ rosclean ](/rosclean?distro=indigo)
  * [ rosgraph_msgs ](/rosgraph_msgs?distro=indigo)
  * [ roslib ](/roslib?distro=indigo)
  * [ rosmaster ](/rosmaster?distro=indigo)
  * [ rosout ](/rosout?distro=indigo)
  * [ rosparam ](/rosparam?distro=indigo)
  * [ rosunit ](/rosunit?distro=indigo)


Others


No API documentation


Type the following code in the file, and then click Save.


  * [ app_manager ](/app_manager?distro=lunar)
  * [ ca_description ](/ca_description?distro=lunar)
  * [ capabilities ](/capabilities?distro=lunar)
  * [ cartographer_ros ](/cartographer_ros?distro=lunar)
  * [ imu_transformer ](/imu_transformer?distro=lunar)
  * [ mir_description ](/mir_description?distro=lunar)
  * [ mir_driver ](/mir_driver?distro=lunar)
  * [ mir_gazebo ](/mir_gazebo?distro=lunar)
  * [ mir_navigation ](/mir_navigation?distro=lunar)
  * [ mrpt_ekf_slam_2d ](/mrpt_ekf_slam_2d?distro=lunar)
  * [ mrpt_ekf_slam_3d ](/mrpt_ekf_slam_3d?distro=lunar)
  * [ mrpt_icp_slam_2d ](/mrpt_icp_slam_2d?distro=lunar)
  * [ mrpt_rbpf_slam ](/mrpt_rbpf_slam?distro=lunar)
  * [ novatel_span_driver ](/novatel_span_driver?distro=lunar)
  * [ omronsentech_camera ](/omronsentech_camera?distro=lunar)
  * [ openni2_launch ](/openni2_launch?distro=lunar)
  * [ openni_launch ](/openni_launch?distro=lunar)
  * [ phidgets_imu ](/phidgets_imu?distro=lunar)
  * [ ros_comm ](/ros_comm?distro=lunar)
  * [ rostest ](/rostest?distro=lunar)
  * [ roswtf ](/roswtf?distro=lunar)
  * [ rqt_launch ](/rqt_launch?distro=lunar)
  * [ sick_ldmrs_descripti... ](/sick_ldmrs_description?distro=lunar)
  * [ sick_ldmrs_driver ](/sick_ldmrs_driver?distro=lunar)
  * [ sick_ldmrs_tools ](/sick_ldmrs_tools?distro=lunar)
  * [ sick_tim ](/sick_tim?distro=lunar)
  * [ urdf_tutorial ](/urdf_tutorial?distro=lunar)
  * [ xacro ](/xacro?distro=lunar)


** Used by  (6) **


Released


Skip to content


** Dependencies  (8) **


The final node is also from the ` turtlesim  ` package, but a different
executable: ` mimic  ` .


  * [ paramiko ](/paramiko?distro=electric)
  * [ python-yaml ](/python-yaml?distro=electric)
  * [ rosclean ](/rosclean?distro=electric)
  * [ rosgraph ](/rosgraph?distro=electric)
  * [ rosgraph_msgs ](/rosgraph_msgs?distro=electric)
  * [ roslib ](/roslib?distro=electric)
  * [ rosmaster ](/rosmaster?distro=electric)
  * [ rosout ](/rosout?distro=electric)
  * [ rosparam ](/rosparam?distro=electric)
  * [ rospy ](/rospy?distro=electric)


The first two actions in the launch description launch two turtlesim windows:


  * [ ](../../index.html)
  * [ Tutorials ](../../Tutorials.html)
  * Creating a launch file
  * [ Edit on GitHub ](https://github.com/ros2/ros2_documentation/blob/dashing/source/Tutorials/Launch-Files/Creating-Launch-Files.rst)


While the system is still running, open a new terminal and run ` rqt_graph  `
to get a better idea of the relationship between the nodes in your launch
file.


To launch ` turtlesim_mimic_launch.py  ` , enter into the directory you
created earlier and run the following command:


The ROS Wiki is for ROS 1. Are you using ROS 2 ( [ Humble
](http://docs.ros.org/en/humble/) , [ Iron ](http://docs.ros.org/en/iron/) ,
or [ Rolling ](http://docs.ros.org/en/rolling/) )?
[ Check out the ROS 2 Project Documentation ](http://docs.ros.org)
Package specific documentation can be found on [ index.ros.org
](https://index.ros.org)


mkdir launch


**name** assigns a name to the node. This name overrides that name that the
node (i.e. C++ program we wrote earlier in this tutorial) would usually have
due to the ros::init call. I kept the name as-is.


Since roslaunch XML allows inline YAML parsing, it is beneficial to have
syntax (highlighting and indentation) support in your favorite editor.


##  Background  ï


Let’s see how you can use the robot_upstart Python API to install your launch
file. Note that it’s the exact same thing as running the script in the
terminal.


    <launch>
      <node
        pkg="noetic_basics_part_1"
        type="simple_python_publisher.py"
        name="simple_python_publisher"
        output="screen"
      />
      <node
        pkg="noetic_basics_part_1"
        type="simple_python_subscriber.py"
        name="simple_python_subscriber"
        output="screen"
      />
    </launch>


  * Maintainer status: maintained
  * Maintainer: Dirk Thomas <dthomas AT osrfoundation DOT org>
  * Author: Ken Conley
  * License: BSD
  * Source: git [ https://github.com/ros/ros_comm.git ](https://github.com/ros/ros_comm) (branch: indigo-devel)


  * **[ Code API ](http://docs.ros.org/jade/api/roslaunch/html) **
  * [ Tutorials ](/roslaunch/Tutorials)
  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:roslaunch/page:1/)
  * [ Changelog ](http://docs.ros.org/en/jade/changelogs/roslaunch/changelog.html)
  * [ Change List ](/ros_comm/ChangeList)
  * [ Reviews ](/roslaunch/Reviews)


    <launch>
        <param name="/counter_publisher_rate" type="int" value="5" />
        <node name="counter_publisher" pkg="my_robot_tutorials" type="counter.py" output="screen"/>
    </launch>


Press CTRL + C when you want the nodes to stop.


In the next tutorial, [ Recording and playing back data
](../Ros2bag/Recording-And-Playing-Back-Data.html#ros2bag) , youâll learn
about another helpful tool, ` ros2bag  ` .


  * [ Distributions ](/Distributions)
  * [ ROS/Installation ](/ROS/Installation)
  * [ ROS/Tutorials ](/ROS/Tutorials)
  * [ RecentChanges ](/RecentChanges)
  * [ roslaunch ](/roslaunch)


* [ roslaunch_to_dot ](/roslaunch_to_dot) converts a launch file tree to a graph and save into a dot file.


[ ![The Robotics Back-End](https://roboticsbackend.com/wp-
content/uploads/2020/02/cropped-favicon_white-1.png)
](https://roboticsbackend.com/ "The Robotics Back-End")


Just run those 2 commands to start and stop your ROS launch file:


![38-python-launch-file-rosJPG](https://automaticaddison.com/wp-
content/uploads/2020/06/38-python-launch-file-rosJPG.jpg)


** Used by  (25) **


**Package Links**


  * [ novatel_span_driver ](/novatel_span_driver?distro=hydro)
  * [ openni_launch ](/openni_launch?distro=hydro)
  * [ osm_cartography ](/osm_cartography?distro=hydro)
  * [ parallel_util ](/parallel_util?distro=hydro)
  * [ pointcloud_to_lasers... ](/pointcloud_to_laserscan?distro=hydro)
  * [ pr2_controller_confi... ](/pr2_controller_configuration?distro=hydro)
  * [ robot_upstart ](/robot_upstart?distro=hydro)
  * [ rocon_launch ](/rocon_launch?distro=hydro)
  * [ rocon_test ](/rocon_test?distro=hydro)
  * [ ros_comm ](/ros_comm?distro=hydro)
  * [ rostest ](/rostest?distro=hydro)
  * [ roswtf ](/roswtf?distro=hydro)
  * [ route_network ](/route_network?distro=hydro)
  * [ rqt_launch ](/rqt_launch?distro=hydro)
  * [ segbot_bringup ](/segbot_bringup?distro=hydro)
  * [ segbot_gazebo ](/segbot_gazebo?distro=hydro)
  * [ segbot_navigation ](/segbot_navigation?distro=hydro)
  * [ segbot_sensors ](/segbot_sensors?distro=hydro)
  * [ segbot_simulation_ap... ](/segbot_simulation_apps?distro=hydro)
  * [ staubli_rx160_suppor... ](/staubli_rx160_support?distro=hydro)
  * [ test_roslaunch ](/test_roslaunch?distro=hydro)
  * [ ueye ](/ueye?distro=hydro)
  * [ urdf_tutorial ](/urdf_tutorial?distro=hydro)
  * [ utexas_gdc ](/utexas_gdc?distro=hydro)
  * [ velodyne_driver ](/velodyne_driver?distro=hydro)
  * [ velodyne_pointcloud ](/velodyne_pointcloud?distro=hydro)
  * [ xacro ](/xacro?distro=hydro)


###  Options for check during Catkin


  * [ app_manager ](/app_manager?distro=noetic)
  * [ capabilities ](/capabilities?distro=noetic)
  * [ create_description ](/create_description?distro=noetic)
  * [ dataspeed_can_usb ](/dataspeed_can_usb?distro=noetic)
  * [ dataspeed_pds_can ](/dataspeed_pds_can?distro=noetic)
  * [ dataspeed_pds_lcm ](/dataspeed_pds_lcm?distro=noetic)
  * [ dbw_fca_can ](/dbw_fca_can?distro=noetic)
  * [ dbw_fca_description ](/dbw_fca_description?distro=noetic)
  * [ dbw_fca_joystick_dem... ](/dbw_fca_joystick_demo?distro=noetic)
  * [ dbw_mkz_can ](/dbw_mkz_can?distro=noetic)
  * [ dbw_mkz_description ](/dbw_mkz_description?distro=noetic)
  * [ dbw_mkz_joystick_dem... ](/dbw_mkz_joystick_demo?distro=noetic)
  * [ dbw_polaris_can ](/dbw_polaris_can?distro=noetic)
  * [ dbw_polaris_descript... ](/dbw_polaris_description?distro=noetic)
  * [ dbw_polaris_joystick... ](/dbw_polaris_joystick_demo?distro=noetic)
  * [ fkie_node_manager ](/fkie_node_manager?distro=noetic)
  * [ fkie_node_manager_da... ](/fkie_node_manager_daemon?distro=noetic)
  * [ franka_gazebo ](/franka_gazebo?distro=noetic)
  * [ husky_control ](/husky_control?distro=noetic)
  * [ husky_description ](/husky_description?distro=noetic)
  * [ husky_navigation ](/husky_navigation?distro=noetic)
  * [ husky_viz ](/husky_viz?distro=noetic)
  * [ jackal_control ](/jackal_control?distro=noetic)
  * [ jackal_description ](/jackal_description?distro=noetic)
  * [ jackal_gazebo ](/jackal_gazebo?distro=noetic)
  * [ jackal_navigation ](/jackal_navigation?distro=noetic)
  * [ jackal_viz ](/jackal_viz?distro=noetic)
  * [ jsk_topic_tools ](/jsk_topic_tools?distro=noetic)
  * [ khi_duaro_descriptio... ](/khi_duaro_description?distro=noetic)
  * [ khi_rs_description ](/khi_rs_description?distro=noetic)
  * [ mir_description ](/mir_description?distro=noetic)
  * [ mir_driver ](/mir_driver?distro=noetic)
  * [ mir_gazebo ](/mir_gazebo?distro=noetic)
  * [ mir_navigation ](/mir_navigation?distro=noetic)
  * [ mrpt_ekf_slam_2d ](/mrpt_ekf_slam_2d?distro=noetic)
  * [ mrpt_ekf_slam_3d ](/mrpt_ekf_slam_3d?distro=noetic)
  * [ mrpt_icp_slam_2d ](/mrpt_icp_slam_2d?distro=noetic)
  * [ mrpt_rbpf_slam ](/mrpt_rbpf_slam?distro=noetic)
  * [ nmea_comms ](/nmea_comms?distro=noetic)
  * [ openni2_launch ](/openni2_launch?distro=noetic)


The ` roslaunch_add_file_check ` CMake macro can be used to check launch files
for common errors such as missing arguments, dependencies, packages, or nodes.


Menu


The following is how you would check all ` *.launch ` files in a package's " `
launch ` " directory:


_**[ ros_comm ](/ros_comm?distro=diamondback) ** : [ cpp_common
](/cpp_common?distro=diamondback) | [ message_filters
](/message_filters?distro=diamondback) | [ perf_roscpp
](/perf_roscpp?distro=diamondback) | [ rosbag ](/rosbag?distro=diamondback) |
[ rosbagmigration ](/rosbagmigration?distro=diamondback) | [ rosconsole
](/rosconsole?distro=diamondback) | [ roscore_migration_rules
](/roscore_migration_rules?distro=diamondback) | [ roscpp
](/roscpp?distro=diamondback) | [ roscpp_serialization
](/roscpp_serialization?distro=diamondback) | [ roscpp_traits
](/roscpp_traits?distro=diamondback) | [ rosgraph
](/rosgraph?distro=diamondback) | [ rosgraph_msgs
](/rosgraph_msgs?distro=diamondback) | roslaunch | [ roslisp
](/roslisp?distro=diamondback) | [ rosmaster ](/rosmaster?distro=diamondback)
| [ rosmsg ](/rosmsg?distro=diamondback) | [ rosnode
](/rosnode?distro=diamondback) | [ rosout ](/rosout?distro=diamondback) | [
rosparam ](/rosparam?distro=diamondback) | [ rospy
](/rospy?distro=diamondback) | [ rosrecord ](/rosrecord?distro=diamondback) |
[ rosservice ](/rosservice?distro=diamondback) | [ rostest
](/rostest?distro=diamondback) | [ rostime ](/rostime?distro=diamondback) | [
rostopic ](/rostopic?distro=diamondback) | [ roswtf
](/roswtf?distro=diamondback) | [ std_msgs ](/std_msgs?distro=diamondback) | [
std_srvs ](/std_srvs?distro=diamondback) | [ topic_tools
](/topic_tools?distro=diamondback) | [ xmlrpcpp
](/xmlrpcpp?distro=diamondback) _


#  Page


As it’s running with systemd, you can simply run:


__ [ ROS 2 Documentation: Dashing ](../../index.html)


As you can see, the script created a bunch of files in different places.
Behind the hood, robot_upstart uses systemd to create executables that run on
boot. For more info on how to use systemd on your Raspberry Pi (for any
executable, not ROS specific), [ check out this tutorial
](https://roboticsbackend.com/make-a-raspberry-pi-3-program-start-on-boot/) .


  * Tutorials
    * [ ROS ](https://roboticsbackend.com/category/ros/)
    * [ ROS2 ](https://roboticsbackend.com/category/ros2/)
    * [ Raspberry Pi ](https://roboticsbackend.com/category/raspberry-pi/)
    * [ Arduino ](https://roboticsbackend.com/category/arduino/)
  * [ Youtube ](https://www.youtube.com/channel/UCelRThOKlWMnpjqr5EBq6tg?sub_confirmation=1)
  * [ **Courses** ](https://roboticsbackend.com/courses/)
  * [ Contact ](https://roboticsbackend.com/contact/)
  * [ **[NEW] ROS 2 Book!** ](https://roboticsbackend.com/ros-2-book-waiting-list/)


##  Syntax Highlighting


* **hydro:** _Documentation generated on August 28, 2015 at 12:33 PM_ ( [ doc job ](http://jenkins.ros.org/job/doc-hydro-ros_comm/) ).


Continuous Integration


* 3 ros2 launch


* **noetic:** _Documentation generated on November 23, 2023 at 11:56 AM_ ( [ doc job ](https://build.ros.org/view/Ndoc/job/Ndoc__ros_comm__ubuntu_focal_amd64) ).


Create a new folder named, **launch** .


* 2 Write the launch file


Did you find this tutorial useful?


Functional


_**[ ros_comm ](/ros_comm?distro=kinetic) ** : [ message_filters
](/message_filters?distro=kinetic) | [ ros ](/ros?distro=kinetic) | [ rosbag
](/rosbag?distro=kinetic) | [ rosconsole ](/rosconsole?distro=kinetic) | [
roscpp ](/roscpp?distro=kinetic) | [ rosgraph ](/rosgraph?distro=kinetic) | [
rosgraph_msgs ](/rosgraph_msgs?distro=kinetic) | roslaunch | [ roslisp
](/roslisp?distro=kinetic) | [ rosmaster ](/rosmaster?distro=kinetic) | [
rosmsg ](/rosmsg?distro=kinetic) | [ rosnode ](/rosnode?distro=kinetic) | [
rosout ](/rosout?distro=kinetic) | [ rosparam ](/rosparam?distro=kinetic) | [
rospy ](/rospy?distro=kinetic) | [ rosservice ](/rosservice?distro=kinetic) |
[ rostest ](/rostest?distro=kinetic) | [ rostopic ](/rostopic?distro=kinetic)
| [ roswtf ](/roswtf?distro=kinetic) | [ std_srvs ](/std_srvs?distro=kinetic)
| [ topic_tools ](/topic_tools?distro=kinetic) | [ xmlrpcpp
](/xmlrpcpp?distro=kinetic) _


**Package Links**


##  Tutorials


* 1 Setup


##  Recent Posts


roslaunch is a tool for easily launching multiple ROS [ nodes
](http://ros.org/wiki/Nodes) locally and remotely via SSH, as well as setting
parameters on the [ Parameter Server ](http://ros.org/wiki/Parameter Server) .
It includes options to automatically respawn processes that have already died.
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.


#  User


1. [ Roslaunch tips for large projects ](/roslaunch/Tutorials/Roslaunch%20tips%20for%20larger%20projects)


**Please read – it will save you a lot of time!**


Documented


    find_package(catkin REQUIRED COMPONENTS roslaunch)
    roslaunch_add_file_check(launch USE_TEST_DEPENDENCIES)


Performance


Open a new file named noetic_basics_part_1.launch.


3. [ How to profile roslaunch nodes ](/roslaunch/Tutorials/Profiling%20roslaunch%20nodes)


  * Maintainer status: maintained
  * Maintainer: Jacob Perron <jacob AT openrobotics DOT org>, Michael Carroll <michael AT openrobotics DOT org>, Shane Loretz <sloretz AT openrobotics DOT org>
  * Author: Ken Conley, Dirk Thomas <dthomas AT osrfoundation DOT org>
  * License: BSD
  * Bug / feature tracker: [ https://github.com/ros/ros_comm/issues ](https://github.com/ros/ros_comm/issues)
  * Source: git [ https://github.com/ros/ros_comm.git ](https://github.com/ros/ros_comm) (branch: melodic-devel)


    $ rosrun robot_upstart uninstall my_robot_ros
    /lib/systemd/systemd
    Preparing to remove the following paths:
      /etc/ros/melodic/my_robot_ros.d
      /etc/ros/melodic/my_robot_ros.d/.installed_files
      /etc/systemd/system/multi-user.target.wants/my_robot_ros.service
      /lib/systemd/system/my_robot_ros.service
      /usr/sbin/my_robot_ros-start
      /usr/sbin/my_robot_ros-stop
    Now calling: /usr/bin/sudo /opt/ros/melodic/lib/robot_upstart/mutate_files
    Filesystem operation succeeded.


Releases


** Dependencies  (8) **


Released


Usually, this Python file is place inside a scripts/ folder in the
my_robot_bringup package. You can follow this “convention” if you want.


  * [ catkin ](/catkin?distro=hydro)
  * [ python-paramiko ](/python-paramiko?distro=hydro)
  * [ python-rospkg ](/python-rospkg?distro=hydro)
  * [ python-yaml ](/python-yaml?distro=hydro)
  * [ rosbuild ](/rosbuild?distro=hydro)
  * [ rosclean ](/rosclean?distro=hydro)
  * [ rosgraph_msgs ](/rosgraph_msgs?distro=hydro)
  * [ roslib ](/roslib?distro=hydro)
  * [ rosmaster ](/rosmaster?distro=hydro)
  * [ rosout ](/rosout?distro=hydro)
  * [ rosparam ](/rosparam?distro=hydro)


Table of Contents


Notice that **when you use roslaunch, you do not have to execute the roscore
command.** roslaunch starts up roscore automatically.


  * ` my_robot_bringup/launch/my_robot.launch ` : the first argument is the relative path to the launch file, from the catkin workspace src/ folder.
  * ` --job my_robot_ros ` : you can choose to give a name to the “Job” that will be created. This name will be used to create the systemd job.
  * ` --symlink ` : By default, the install script will copy the content of your launch file and run this copy. Thus, every time you update your launch file you have to remember to also update the copy. Here, problem solved: the install script will create a symbolic link to your original launch file.


  * [ catkin ](/catkin?distro=noetic)
  * [ rosclean ](/rosclean?distro=noetic)
  * [ rosgraph_msgs ](/rosgraph_msgs?distro=noetic)
  * [ roslib ](/roslib?distro=noetic)
  * [ rosmaster ](/rosmaster?distro=noetic)
  * [ rosout ](/rosout?distro=noetic)
  * [ rosparam ](/rosparam?distro=noetic)
  * [ rosunit ](/rosunit?distro=noetic)


#  Package Summary


Documented


Within the ` LaunchDescription  ` is a system of three nodes, all from the `
turtlesim  ` package. The goal of the system is to launch two turtlesim
windows, and have one turtle mimic the movements of the other.


Launch files allow you to start up and configure a number of executables
containing ROS 2 nodes simultaneously.


#  How to Create a Launch File in ROS Noetic


So, you’ve developed a nice ROS application, which can be launched with a
single launch file: great!


  1. Overview
  2. roscore
  3. Stability/Roadmap
  4. Tutorials
  5. Syntax Highlighting
  6. Catkin
    1. Options for check during Catkin
  7. GUI
  8. Video Tutorial on Launch Files


You will see both turtles following the same path.


#  Make a ROS Launch Start on Boot (robot_upstart)


Now, you can reboot your computer/Raspberry Pi, and check that the program has
started on boot. You should get the counter node with ` rosnode list ` , and
be able to see the values published on the /counter topic with ` rostopic echo
/counter ` . You don’t need to manually start the launch file anymore.
Success!


SAVE & ACCEPT


Both turtles in this system receive commands over the same topic and publish
their pose over the same topic. Without unique namespaces, there would be no
way to distinguish between messages meant for one turtle or the other.


Advertisement


    Node(
        package='turtlesim',
        node_namespace='turtlesim1',
        node_executable='turtlesim_node',
        node_name='sim'
    ),
    Node(
        package='turtlesim',
        node_namespace='turtlesim2',
        node_executable='turtlesim_node',
        node_name='sim'
    ),


* **groovy:** _Documentation generated on October 06, 2014 at 11:47 AM_


In this tutorial I’ll show you how to install the robot_upstart package, and
how to use it so you won’t have to manually launch your application anymore.
Also I’ll give you some useful tips so you save time on potential future
headaches.


  * Author: Ken Conley/kwc@willowgarage.com
  * License: BSD
  * Repository: [ ros ](/ros)
  * Source: svn [ https://code.ros.org/svn/ros/stacks/ros_comm/tags/ros_comm-1.4.8 ](https://code.ros.org/svn/ros/stacks/ros_comm/tags/ros_comm-1.4.8)


[ ![ROS For Beginners - A Step By Step Course](https://roboticsbackend.com/wp-
content/plugins/wp-fastest-cache-premium/pro/images/blank.gif)
](https://rbcknd.com/ros-for-beginners)


You need to reboot so the new settings can apply.


** Dependencies  (8) **


** Jenkins jobs  (6) **


Wiki: roslaunch (last edited 2019-10-23 03:20:24 by  [ realtime-neil
](/realtime-neil "realtime-neil @
2607:fb90:3b79:a96c:2b2a:305d:9cb1:62ea\[2607:fb90:3b79:a96c:2b2a:305d:9cb1:62ea\]")
)


** Used by  (165) **


As always, donât forget to source ROS 2 in [ every new terminal you open
](../Configuring-ROS2-Environment.html#configros2) .


Contents


Next, the launch description itself begins:


    * [ Launching/monitoring multiple nodes with Launch ](../Launch-system.html)
    * [ Composing multiple nodes in a single process ](../Composition.html)
    * [ Using colcon to build packages ](../Colcon-Tutorial.html)
    * [ Implement a custom memory allocator ](../Allocator-Template-Tutorial.html)
    * [ ROS2 on IBM Cloud Kubernetes [community-contributed] ](../Deploying-ROS-2-on-IBM-Cloud.html)
    * [ Eclipse Oxygen with ROS 2 and rviz2 [community-contributed] ](../Eclipse-Oxygen-with-ROS-2-and-rviz2.html)
    * [ Building ROS 2 on Linux with Eclipse Oxygen [community-contributed] ](../Building-ROS-2-on-Linux-with-Eclipse-Oxygen.html)
    * [ Building realtime Linux for ROS 2 [community-contributed] ](../Building-Realtime-rt_preempt-kernel-for-ROS-2.html)
    * [ Use quality-of-service settings to handle lossy networks ](../Quality-of-Service.html)
    * [ Management of nodes with managed lifecycles ](../Managed-Nodes.html)
    * [ Efficient intra-process communication ](../Intra-Process-Communication.html)
    * [ Recording and playback of topic data with rosbag using the ROS 1 bridge ](../Rosbag-with-ROS1-Bridge.html)
    * [ Using tf2 with ROS 2 ](../tf2.html)
    * [ Real-time programming in ROS 2 ](../Real-Time-Programming.html)
    * [ Trying the dummy robot demo ](../dummy-robot-demo.html)
    * [ Logging and logger configuration demo ](../Logging-and-logger-configuration.html)
  * [ Guides ](../../Guides.html)
    * [ Installation troubleshooting ](../../Guides/Installation-Troubleshooting.html)
    * [ Developing a ROS 2 package ](../../Guides/Developing-a-ROS-2-Package.html)
    * [ ament_cmake user documentation ](../../Guides/Ament-CMake-Documentation.html)
    * [ Migrating launch files from ROS 1 to ROS 2 ](../../Guides/Launch-files-migration-guide.html)
    * [ Migrating YAML parameter files from ROS 1 to ROS 2 ](../../Guides/Parameters-YAML-files-migration-guide.html)
    * [ Passing ROS arguments to nodes via the command-line ](../../Guides/Node-arguments.html)
    * [ Synchronous vs. asynchronous service clients ](../../Guides/Sync-Vs-Async.html)
    * [ DDS tuning information ](../../Guides/DDS-tuning.html)
    * [ rosbag2: Overriding QoS Policies ](../../Guides/Overriding-QoS-Policies-For-Recording-And-Playback.html)
    * [ Working with multiple ROS 2 middleware implementations ](../../Guides/Working-with-multiple-RMW-implementations.html)
    * [ Cross-compilation ](../../Guides/Cross-compilation.html)
    * [ Releasing a ROS 2 package with bloom ](../../Guides/Releasing-a-ROS-2-package-with-bloom.html)
    * [ Using Python Packages with ROS 2 ](../../Guides/Using-Python-Packages.html)
    * [ Porting RQt plugins to Windows ](../../Guides/RQt-Port-Plugin-Windows.html)
    * [ Running ROS 2 nodes in Docker [community-contributed] ](../../Guides/Run-2-nodes-in-single-or-separate-docker-containers.html)
    * [ ROS 2 Package Maintainer Guide ](../../Guides/Package-maintainer-guide.html)
    * [ Building a custom Debian package ](../../Guides/Building-a-Custom-Debian-Package.html)
    * [ Building RQt from source ](../../Guides/RQt-Source-Install.html)
      * [ Building RQt from source on macOS ](../../Guides/RQt-Source-Install-MacOS.html)
      * [ Building RQt from source on Windows 10 ](../../Guides/RQt-Source-Install-Windows10.html)
  * [ Concepts ](../../Concepts.html)
    * [ The ROS_DOMAIN_ID ](../../Concepts/About-Domain-ID.html)
    * [ About different ROS 2 DDS/RTPS vendors ](../../Concepts/About-Different-Middleware-Vendors.html)


  * Maintainer status: maintained
  * Maintainer: Jacob Perron <jacob AT openrobotics DOT org>, Michael Carroll <michael AT openrobotics DOT org>, Shane Loretz <sloretz AT openrobotics DOT org>
  * Author: Ken Conley, Dirk Thomas <dthomas AT osrfoundation DOT org>
  * License: BSD
  * Source: git [ https://github.com/ros/ros_comm.git ](https://github.com/ros/ros_comm) (branch: kinetic-devel)


Move into that directory.


    $ sudo systemctl start my_robot_ros.service
    $ rosnode list
    /counter_publisher
    /rosout

    ...

    $ sudo systemctl stop my_robot_ros.service
    $ rosnode list
    ERROR: Unable to communicate with master!


     [ Iron (latest) ](../../../iron/index.html)
     [ Humble ](../../../humble/index.html)
     [ Galactic (EOL) ](../../../galactic/index.html)
     [ Foxy (EOL) ](../../../foxy/index.html)
     [ Eloquent (EOL) ](../../../eloquent/Tutorials/Launch-Files/Creating-Launch-Files.html)
     [ Dashing (EOL) ](Creating-Launch-Files.html)
     [ Crystal (EOL) ](../../../crystal/Tutorials/Launch-Files/Creating-Launch-Files.html)


Note


Let’s say your computer/Raspberry Pi is talking to another device via
USB/Serial communication – which is not an uncommon thing to do in a robotics
application. In this case, you have to make your user belong to the “dialout”
group.


    def generate_launch_description():
       return LaunchDescription([

       ])


  * [ catkin ](/catkin?distro=kinetic)
  * [ rosclean ](/rosclean?distro=kinetic)
  * [ rosgraph_msgs ](/rosgraph_msgs?distro=kinetic)
  * [ roslib ](/roslib?distro=kinetic)
  * [ rosmaster ](/rosmaster?distro=kinetic)
  * [ rosout ](/rosout?distro=kinetic)
  * [ rosparam ](/rosparam?distro=kinetic)
  * [ rosunit ](/rosunit?distro=kinetic)


That’s all you need to do.


![Me](https://automaticaddison.com/wp-content/uploads/2020/05/addison-
humanoid-ces-2020.jpg)


To see the system in action, open a new terminal and run the ` ros2  topic
pub  ` command on the ` /turtlesim1/turtle1/cmd_vel  ` topic to get the first
turtle moving:


A launch file is in a special format called [ XML format
](https://en.wikipedia.org/wiki/XML) . It is in this file that you will list
the nodes that you would like the ROS system to launch simultaneously.


Performance cookies are used to understand and analyze the key performance
indexes of the website which helps in delivering a better user experience for
the visitors.


    <launch>
      <node
        pkg="noetic_basics_part_1"
        type="simple_publisher_node"
        name="simple_publisher_node"
        output="screen"
      />
      <node
        pkg="noetic_basics_part_1"
        type="simple_subscriber_node"
        name="simple_subscriber_node"
        output="screen"
      />
    </launch>


You will also need to use a text editor of your preference.


##  Connect With Me on LinkedIn!


Toggle


** Used by  (83) **


#  Package Summary


##  Post navigation


###  Uninstall from terminal


  * [ catkin ](/catkin?distro=melodic)
  * [ rosclean ](/rosclean?distro=melodic)
  * [ rosgraph_msgs ](/rosgraph_msgs?distro=melodic)
  * [ roslib ](/roslib?distro=melodic)
  * [ rosmaster ](/rosmaster?distro=melodic)
  * [ rosout ](/rosout?distro=melodic)
  * [ rosparam ](/rosparam?distro=melodic)
  * [ rosunit ](/rosunit?distro=melodic)


##  robot_upstart install script


[ ![ROS For Beginners - A Step By Step Course](https://roboticsbackend.com/wp-
content/uploads/2019/07/ROS_For_Beginners_A_Step_by_Step_Course.jpg)
](https://rbcknd.com/ros-for-beginners)


  * [ Project Governance ](../../Governance.html)
    * [ ROS 2 Technical Steering Committee Charter ](../../Governance/ROS2-TSC-Charter.html)
  * [ Marketing Materials ](../../Marketing.html)
  * [ Related Projects ](../../Related-Projects.html)
    * [ Intel ROS 2 Projects ](../../Related-Projects/Intel-ROS2-Projects.html)
  * [ Glossary ](../../Glossary.html)


roslaunch is a tool for easily launching multiple ROS [ nodes
](http://ros.org/wiki/Nodes) locally and remotely via SSH, as well as setting
parameters on the [ Parameter Server ](http://ros.org/wiki/Parameter Server) .
It includes options to automatically respawn processes that have already died.
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.


#  Python

In Python, you can use the ` RosPack ` class in the [ rospkg
](http://docs.ros.org/independent/api/rospkg/html/) library to get information
about ROS packages. For example:

       1 import rospkg
       2
       3 # get an instance of RosPack with the default search paths
       4 rospack = rospkg.RosPack()
       5
       6 # list all packages, equivalent to rospack list
       7 rospack.list()
       8
       9 # get the file path for rospy_tutorials
      10 rospack.get_path('rospy_tutorials')

See more at [ rospkg API index
](http://docs.ros.org/independent/api/rospkg/html/genindex.html) .


Running a single launch file with the ` ros2  launch  ` command will start up
your entire system - all nodes and their configurations - at once.


And as you can see, nothing is displayed on the screen when you start the
application. This is because it’s running in the background.


  * **[ Code API ](http://docs.ros.org/indigo/api/roslaunch/html) **
  * [ Tutorials ](/roslaunch/Tutorials)
  * [ FAQ ](http://answers.ros.org/questions/scope:all/sort:activity-desc/tags:roslaunch/page:1/)
  * [ Changelog ](http://docs.ros.org/en/indigo/changelogs/roslaunch/changelog.html)
  * [ Change List ](/ros_comm/ChangeList)
  * [ Reviews ](/roslaunch/Reviews)