Skip to content

Commit

Permalink
Paused gazebo parameter and delay to ensure proper spawn
Browse files Browse the repository at this point in the history
  • Loading branch information
OscarMrZ committed Feb 14, 2024
1 parent 3bb6c34 commit 58b9f45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion Launchers/follow_person.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')),
Expand Down

0 comments on commit 58b9f45

Please sign in to comment.