[Documentation] [TitleIndex] [WordIndex


This script can delay the launch of a roslaunch file.



To install the timed_roslaunch package via apt, type the command as follows.

   1 sudo apt install ros-${ROS_DISTRO}-timed-roslaunch


To install the timed_roslaunch package, you can install from source with the following commands:

   1 cd /(your catkin workspace)/src
   2 git clone https://github.com/MoriKen254/timed_roslaunch.git
   3 cd ..
   4 catkin_make


This script can delay the launch of a roslaunch file. Make sure that the file is executable (chmod +x timed_roslaunch.sh)

Run it from command line

   1 rosrun timed_roslaunch timed_roslaunch.sh [number of seconds to delay] [rospkg] [roslaunch file] [arguments (optional)]


   1 roslaunch timed_roslaunch timed_roslaunch.launch time:=[number of second to delay] pkg:=[rospkg] file:=[roslaunch file] value:=[arguments (optional)]


   1 rosrun timed_roslaunch timed_roslaunch.sh 2 turtlebot_navigation amcl_demo.launch initial_pose_x:=17.0 initial_pose_y:=17.0"

Run it from another roslaunch file

   1 <launch>
   2   <include file="$(find timed_roslaunch)/launch/timed_roslaunch.launch">
   3     <arg name="time" value="2" />
   4     <arg name="pkg" value="turtlebot_navigation" />
   5     <arg name="file" value="amcl_demo.launch" />
   6     <arg name="value" value="initial_pose_x:=17.0 initial_pose_y:=17.0" />
   7     <arg name="node_name" value="timed_roslaunch" /> <!-- This is optional argument -->
   8   </include>
   9 </launch>


   1 <launch>
   2   <node pkg="timed_roslaunch" type="timed_roslaunch.sh"
   3     args="2 turtlebot_navigation amcl_demo.launch initial_pose_x:=17.0 initial_pose_y:=17.0"
   4     name="timed_roslaunch" output="screen" />
   5 </launch>

2024-07-13 14:39