diff --git a/CustomRobots/Turtlebot2/turtlebot2_simulated/turtlebot2/launch/spawn_model.launch.py b/CustomRobots/Turtlebot2/turtlebot2_simulated/turtlebot2/launch/spawn_model.launch.py index bc96c48aa..c02834f25 100755 --- a/CustomRobots/Turtlebot2/turtlebot2_simulated/turtlebot2/launch/spawn_model.launch.py +++ b/CustomRobots/Turtlebot2/turtlebot2_simulated/turtlebot2/launch/spawn_model.launch.py @@ -5,8 +5,12 @@ from launch.actions import DeclareLaunchArgument, ExecuteProcess from launch.substitutions import Command, LaunchConfiguration from launch_ros.actions import Node +import time def generate_launch_description(): + + # In order to ensure gazebo is properly intialized + time.sleep(4.0) # Set (x, y, z) default position of turtlebot2 x_pos = LaunchConfiguration('-x', default='0') diff --git a/Launchers/follow_person.launch.py b/Launchers/follow_person.launch.py index 190cba703..19767bd25 100644 --- a/Launchers/follow_person.launch.py +++ b/Launchers/follow_person.launch.py @@ -74,7 +74,7 @@ def generate_launch_description(): start_gazebo_server_cmd = IncludeLaunchDescription( PythonLaunchDescriptionSource(os.path.join(pkg_gazebo_ros, 'launch', 'gzserver.launch.py')), condition=IfCondition(use_simulator), - launch_arguments={'world': world}.items()) + launch_arguments={'world': world, 'pause': 'true'}.items()) start_turtlebot2_cmd = IncludeLaunchDescription( PythonLaunchDescriptionSource(os.path.join(pkg_share_dir, 'launch', 'spawn_model.launch.py')),