From e7230fa3a1a6d861bfaf78bde562af50fc091d7b Mon Sep 17 00:00:00 2001 From: Kalana Ratnayake Date: Fri, 10 Jan 2025 21:11:13 +1100 Subject: [PATCH 1/3] minor fix --- launch/system.launch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launch/system.launch.py b/launch/system.launch.py index 4f27c4f..19db1d1 100644 --- a/launch/system.launch.py +++ b/launch/system.launch.py @@ -86,7 +86,7 @@ def generate_launch_description(): description='Whether to respawn if a node crashes. Applied when composition is disabled.') declare_log_level_cmd = DeclareLaunchArgument( - 'log_level', default_value='debug', + 'log_level', default_value='info', description='log level') declare_use_namespace_cmd = DeclareLaunchArgument( From fb3faa0ecf7a3cf2c4a59c76bec692cc0a7ddb0f Mon Sep 17 00:00:00 2001 From: Kalana Ratnayake Date: Fri, 10 Jan 2025 21:12:11 +1100 Subject: [PATCH 2/3] minor fix --- launch/system.launch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launch/system.launch.py b/launch/system.launch.py index 19db1d1..c4dd0d4 100644 --- a/launch/system.launch.py +++ b/launch/system.launch.py @@ -78,7 +78,7 @@ def generate_launch_description(): description='Automatically startup the nav2 stack') declare_use_composition_cmd = DeclareLaunchArgument( - 'use_composition', default_value='False', + 'use_composition', default_value='True', description='Whether to use composed bringup') declare_use_respawn_cmd = DeclareLaunchArgument( From ce5de3b6c24682d8600f97964fd2c7c0a41f0eb1 Mon Sep 17 00:00:00 2001 From: Kalana Ratnayake Date: Wed, 13 Aug 2025 18:47:17 +1000 Subject: [PATCH 3/3] added simulation launch file as well --- launch/turtlebot3_world.launch.py | 81 +++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 launch/turtlebot3_world.launch.py diff --git a/launch/turtlebot3_world.launch.py b/launch/turtlebot3_world.launch.py new file mode 100644 index 0000000..adbef30 --- /dev/null +++ b/launch/turtlebot3_world.launch.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python3 +# +# Copyright 2019 ROBOTIS CO., LTD. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Authors: Joep Tool +# Modified: Kalana Ratnayake + +import os + +from ament_index_python.packages import get_package_share_directory +from launch import LaunchDescription +from launch.actions import IncludeLaunchDescription +from launch.launch_description_sources import PythonLaunchDescriptionSource +from launch.substitutions import LaunchConfiguration + + +def generate_launch_description(): + launch_file_dir = os.path.join(get_package_share_directory('turtlebot3_gazebo'), 'launch') + pkg_gazebo_ros = get_package_share_directory('gazebo_ros') + + use_sim_time = LaunchConfiguration('use_sim_time', default='true') + x_pose = LaunchConfiguration('x_pose', default='0.0') + y_pose = LaunchConfiguration('y_pose', default='0.5') + + world = os.path.join( + get_package_share_directory('turtlebot3_gazebo'), + 'worlds', + 'turtlebot3_world.world' + ) + + gzserver_cmd = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(pkg_gazebo_ros, 'launch', 'gzserver.launch.py') + ), + launch_arguments={'world': world}.items() + ) + + gzclient_cmd = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(pkg_gazebo_ros, 'launch', 'gzclient.launch.py') + ) + ) + + robot_state_publisher_cmd = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(launch_file_dir, 'robot_state_publisher.launch.py') + ), + launch_arguments={'use_sim_time': use_sim_time}.items() + ) + + spawn_turtlebot_cmd = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(launch_file_dir, 'spawn_turtlebot3.launch.py') + ), + launch_arguments={ + 'x_pose': x_pose, + 'y_pose': y_pose + }.items() + ) + + ld = LaunchDescription() + + # Add the commands to the launch description + ld.add_action(gzserver_cmd) + ld.add_action(gzclient_cmd) + ld.add_action(robot_state_publisher_cmd) + ld.add_action(spawn_turtlebot_cmd) + + return ld \ No newline at end of file