diff --git a/.circleci/config.yml b/.circleci/config.yml index 1d0c08e87df..4d962b4f0e6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -82,7 +82,6 @@ _commands: - run: name: Install Dependencies | << parameters.workspace >> working_directory: << parameters.workspace >> - # Remove/Replace turtlebot3_gazebo and gazebo_ros_pkgs from --skip-keys after https://github.com/ros-navigation/navigation2/pull/3634 command: | . << parameters.underlay >>/install/setup.sh AMENT_PREFIX_PATH=$(echo "$AMENT_PREFIX_PATH" | \ @@ -105,7 +104,6 @@ _commands: --ignore-src \ --skip-keys " \ slam_toolbox \ - turtlebot3_gazebo \ " \ --verbose | \ awk '$1 ~ /^resolution\:/' | \ diff --git a/Dockerfile b/Dockerfile index 1f1060ccd70..43605415322 100644 --- a/Dockerfile +++ b/Dockerfile @@ -97,13 +97,11 @@ ENV OVERLAY_WS $OVERLAY_WS WORKDIR $OVERLAY_WS COPY --from=cacher /tmp/$OVERLAY_WS ./ -# Remove/Replace turtlebot3_gazebo and gazebo_ros_pkgs from --skip-keys after https://github.com/ros-navigation/navigation2/pull/3634 RUN . $UNDERLAY_WS/install/setup.sh && \ apt-get update && rosdep install -q -y \ --from-paths src \ --skip-keys " \ slam_toolbox \ - turtlebot3_gazebo \ "\ --ignore-src \ && rm -rf /var/lib/apt/lists/* @@ -170,9 +168,7 @@ RUN mkdir -p $ROOT_SRV # install demo dependencies RUN apt-get update && apt-get install -y \ - ros-$ROS_DISTRO-aws-robomaker-small-warehouse-world \ ros-$ROS_DISTRO-rviz2 \ - ros-$ROS_DISTRO-turtlebot3-simulations # install gzweb dependacies RUN apt-get install -y --no-install-recommends \ diff --git a/nav2_bringup/CMakeLists.txt b/nav2_bringup/CMakeLists.txt index 629034556e2..de7aa3dfd51 100644 --- a/nav2_bringup/CMakeLists.txt +++ b/nav2_bringup/CMakeLists.txt @@ -10,9 +10,7 @@ nav2_package() install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) install(DIRECTORY maps DESTINATION share/${PROJECT_NAME}) install(DIRECTORY rviz DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY worlds DESTINATION share/${PROJECT_NAME}) install(DIRECTORY params DESTINATION share/${PROJECT_NAME}) -install(DIRECTORY urdf DESTINATION share/${PROJECT_NAME}) if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) diff --git a/nav2_bringup/launch/cloned_multi_tb3_simulation_launch.py b/nav2_bringup/launch/cloned_multi_tb3_simulation_launch.py index dbff594bc71..54f9d60f809 100644 --- a/nav2_bringup/launch/cloned_multi_tb3_simulation_launch.py +++ b/nav2_bringup/launch/cloned_multi_tb3_simulation_launch.py @@ -1,4 +1,5 @@ # Copyright (c) 2023 LG Electronics. +# Copyright (c) 2024 Open Navigation LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,17 +15,23 @@ import os +from pathlib import Path +import tempfile from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription from launch.actions import ( + AppendEnvironmentVariable, DeclareLaunchArgument, ExecuteProcess, GroupAction, IncludeLaunchDescription, LogInfo, + OpaqueFunction, + RegisterEventHandler, ) from launch.conditions import IfCondition +from launch.event_handlers import OnShutdown from launch.launch_description_sources import PythonLaunchDescriptionSource from launch.substitutions import LaunchConfiguration, TextSubstitution from nav2_common.launch import ParseMultiRobotPose @@ -43,10 +50,10 @@ def generate_launch_description(): # Get the launch directory bringup_dir = get_package_share_directory('nav2_bringup') launch_dir = os.path.join(bringup_dir, 'launch') + sim_dir = get_package_share_directory('nav2_minimal_tb3_sim') # Simulation settings world = LaunchConfiguration('world') - simulator = LaunchConfiguration('simulator') # On this example all robots are launched with the same settings map_yaml_file = LaunchConfiguration('map') @@ -60,19 +67,13 @@ def generate_launch_description(): # Declare the launch arguments declare_world_cmd = DeclareLaunchArgument( 'world', - default_value=os.path.join(bringup_dir, 'worlds', 'world_only.model'), + default_value=os.path.join(sim_dir, 'worlds', 'tb3_sandbox.sdf.xacro'), description='Full path to world file to load', ) - declare_simulator_cmd = DeclareLaunchArgument( - 'simulator', - default_value='gazebo', - description='The simulator to use (gazebo or gzserver)', - ) - declare_map_yaml_cmd = DeclareLaunchArgument( 'map', - default_value=os.path.join(bringup_dir, 'maps', 'turtlebot3_world.yaml'), + default_value=os.path.join(bringup_dir, 'maps', 'tb3_sandbox.yaml'), description='Full path to map file to load', ) @@ -107,18 +108,19 @@ def generate_launch_description(): ) # Start Gazebo with plugin providing the robot spawning service - start_gazebo_cmd = ExecuteProcess( - cmd=[ - simulator, - '--verbose', - '-s', - 'libgazebo_ros_init.so', - '-s', - 'libgazebo_ros_factory.so', - world, - ], - output='screen', - ) + world_sdf = tempfile.mktemp(prefix='nav2_', suffix='.sdf') + world_sdf_xacro = ExecuteProcess( + cmd=['xacro', '-o', world_sdf, ['headless:=', 'False'], world]) + start_gazebo_cmd = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(get_package_share_directory('ros_gz_sim'), 'launch', + 'gz_sim.launch.py')), + launch_arguments={'gz_args': ['-r -s ', world_sdf]}.items()) + + remove_temp_sdf_file = RegisterEventHandler(event_handler=OnShutdown( + on_shutdown=[ + OpaqueFunction(function=lambda _: os.remove(world_sdf)) + ])) robots_list = ParseMultiRobotPose('robots').value() @@ -176,11 +178,18 @@ def generate_launch_description(): bringup_cmd_group.append(group) + set_env_vars_resources = AppendEnvironmentVariable( + 'GZ_SIM_RESOURCE_PATH', os.path.join(sim_dir, 'models')) + set_env_vars_resources2 = AppendEnvironmentVariable( + 'GZ_SIM_RESOURCE_PATH', + str(Path(os.path.join(sim_dir)).parent.resolve())) + # Create the launch description and populate ld = LaunchDescription() + ld.add_action(set_env_vars_resources) + ld.add_action(set_env_vars_resources2) # Declare the launch options - ld.add_action(declare_simulator_cmd) ld.add_action(declare_world_cmd) ld.add_action(declare_map_yaml_cmd) ld.add_action(declare_params_file_cmd) @@ -190,7 +199,9 @@ def generate_launch_description(): ld.add_action(declare_use_robot_state_pub_cmd) # Add the actions to start gazebo, robots and simulations + ld.add_action(world_sdf_xacro) ld.add_action(start_gazebo_cmd) + ld.add_action(remove_temp_sdf_file) ld.add_action(LogInfo(msg=['number_of_robots=', str(len(robots_list))])) diff --git a/nav2_bringup/launch/tb3_gz_robot_launch.py b/nav2_bringup/launch/tb3_gz_robot_launch.py deleted file mode 100644 index dbc4f19ddc4..00000000000 --- a/nav2_bringup/launch/tb3_gz_robot_launch.py +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright (C) 2023 Open Source Robotics Foundation -# -# 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. - -import os - -from ament_index_python.packages import get_package_share_directory - -from launch import LaunchDescription -from launch.actions import AppendEnvironmentVariable -from launch.actions import DeclareLaunchArgument -from launch.conditions import IfCondition -from launch.substitutions import LaunchConfiguration - -from launch_ros.actions import Node - - -def generate_launch_description(): - bringup_dir = get_package_share_directory('nav2_bringup') - - namespace = LaunchConfiguration('namespace') - use_simulator = LaunchConfiguration('use_simulator') - robot_name = LaunchConfiguration('robot_name') - robot_sdf = LaunchConfiguration('robot_sdf') - pose = {'x': LaunchConfiguration('x_pose', default='-2.00'), - 'y': LaunchConfiguration('y_pose', default='-0.50'), - 'z': LaunchConfiguration('z_pose', default='0.01'), - 'R': LaunchConfiguration('roll', default='0.00'), - 'P': LaunchConfiguration('pitch', default='0.00'), - 'Y': LaunchConfiguration('yaw', default='0.00')} - - # Declare the launch arguments - declare_namespace_cmd = DeclareLaunchArgument( - 'namespace', - default_value='', - description='Top-level namespace') - - declare_use_simulator_cmd = DeclareLaunchArgument( - 'use_simulator', - default_value='True', - description='Whether to start the simulator') - - declare_robot_name_cmd = DeclareLaunchArgument( - 'robot_name', - default_value='turtlebot3_waffle', - description='name of the robot') - - declare_robot_sdf_cmd = DeclareLaunchArgument( - 'robot_sdf', - default_value=os.path.join(bringup_dir, 'worlds', 'gz_waffle.sdf'), - description='Full path to robot sdf file to spawn the robot in gazebo') - - pkg_nav2_bringup = get_package_share_directory('nav2_bringup') - bridge = Node( - package='ros_gz_bridge', - executable='parameter_bridge', - parameters=[ - { - 'config_file': os.path.join( - pkg_nav2_bringup, 'params', 'turtlebot3_waffle_bridge.yaml' - ), - } - ], - output='screen', - ) - - spawn_model = Node( - condition=IfCondition(use_simulator), - package='ros_gz_sim', - executable='create', - output='screen', - arguments=[ - '-entity', robot_name, - '-file', robot_sdf, - '-robot_namespace', namespace, - '-x', pose['x'], '-y', pose['y'], '-z', pose['z'], - '-R', pose['R'], '-P', pose['P'], '-Y', pose['Y']] - ) - - set_env_vars_resources = AppendEnvironmentVariable( - 'GZ_SIM_RESOURCE_PATH', - os.path.join(get_package_share_directory('turtlebot3_gazebo'), - 'models')) - - # Create the launch description and populate - ld = LaunchDescription() - ld.add_action(declare_namespace_cmd) - ld.add_action(declare_robot_name_cmd) - ld.add_action(declare_robot_sdf_cmd) - ld.add_action(declare_use_simulator_cmd) - - ld.add_action(set_env_vars_resources) - - ld.add_action(bridge) - ld.add_action(spawn_model) - return ld diff --git a/nav2_bringup/launch/tb3_simulation_launch.py b/nav2_bringup/launch/tb3_simulation_launch.py index 2655125a91e..cf6262cd39d 100644 --- a/nav2_bringup/launch/tb3_simulation_launch.py +++ b/nav2_bringup/launch/tb3_simulation_launch.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 Intel Corporation +# Copyright (C) 2023 Open Source Robotics Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ """This is all-in-one launch script intended for use by nav2 developers.""" import os +import tempfile from ament_index_python.packages import get_package_share_directory @@ -23,10 +24,14 @@ DeclareLaunchArgument, ExecuteProcess, IncludeLaunchDescription, + OpaqueFunction, + RegisterEventHandler, ) from launch.conditions import IfCondition +from launch.event_handlers import OnShutdown from launch.launch_description_sources import PythonLaunchDescriptionSource from launch.substitutions import LaunchConfiguration, PythonExpression + from launch_ros.actions import Node @@ -34,8 +39,7 @@ def generate_launch_description(): # Get the launch directory bringup_dir = get_package_share_directory('nav2_bringup') launch_dir = os.path.join(bringup_dir, 'launch') - # This checks that tb3 exists needed for the URDF. If not using TB3, its safe to remove. - _ = get_package_share_directory('turtlebot3_gazebo') + sim_dir = get_package_share_directory('nav2_minimal_tb3_sim') # Create the launch configuration variables slam = LaunchConfiguration('slam') @@ -66,12 +70,6 @@ def generate_launch_description(): robot_name = LaunchConfiguration('robot_name') robot_sdf = LaunchConfiguration('robot_sdf') - # Map fully qualified names to relative ones so the node's namespace can be prepended. - # In case of the transforms (tf), currently, there doesn't seem to be a better alternative - # https://github.com/ros/geometry2/issues/32 - # https://github.com/ros/robot_state_publisher/pull/30 - # TODO(orduno) Substitute with `PushNodeRemapping` - # https://github.com/ros2/launch_ros/issues/56 remappings = [('/tf', 'tf'), ('/tf_static', 'tf_static')] # Declare the launch arguments @@ -91,8 +89,7 @@ def generate_launch_description(): declare_map_yaml_cmd = DeclareLaunchArgument( 'map', - default_value=os.path.join(bringup_dir, 'maps', 'turtlebot3_world.yaml'), - description='Full path to map file to load', + default_value=os.path.join(bringup_dir, 'maps', 'tb3_sandbox.yaml'), ) declare_use_sim_time_cmd = DeclareLaunchArgument( @@ -153,11 +150,7 @@ def generate_launch_description(): declare_world_cmd = DeclareLaunchArgument( 'world', - # TODO(orduno) Switch back once ROS argument passing has been fixed upstream - # https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/91 - # default_value=os.path.join(get_package_share_directory('turtlebot3_gazebo'), - # worlds/turtlebot3_worlds/waffle.model') - default_value=os.path.join(bringup_dir, 'worlds', 'world_only.model'), + default_value=os.path.join(sim_dir, 'worlds', 'tb3_sandbox.sdf.xacro'), description='Full path to world model file to load', ) @@ -167,33 +160,11 @@ def generate_launch_description(): declare_robot_sdf_cmd = DeclareLaunchArgument( 'robot_sdf', - default_value=os.path.join(bringup_dir, 'worlds', 'waffle.model'), + default_value=os.path.join(sim_dir, 'urdf', 'gz_waffle.sdf'), description='Full path to robot sdf file to spawn the robot in gazebo', ) - # Specify the actions - start_gazebo_server_cmd = ExecuteProcess( - condition=IfCondition(use_simulator), - cmd=[ - 'gzserver', - '-s', - 'libgazebo_ros_init.so', - '-s', - 'libgazebo_ros_factory.so', - world, - ], - cwd=[launch_dir], - output='screen', - ) - - start_gazebo_client_cmd = ExecuteProcess( - condition=IfCondition(PythonExpression([use_simulator, ' and not ', headless])), - cmd=['gzclient'], - cwd=[launch_dir], - output='screen', - ) - - urdf = os.path.join(bringup_dir, 'urdf', 'turtlebot3_waffle.urdf') + urdf = os.path.join(sim_dir, 'urdf', 'turtlebot3_waffle.urdf') with open(urdf, 'r') as infp: robot_description = infp.read() @@ -210,32 +181,6 @@ def generate_launch_description(): remappings=remappings, ) - start_gazebo_spawner_cmd = Node( - package='gazebo_ros', - executable='spawn_entity.py', - output='screen', - arguments=[ - '-entity', - robot_name, - '-file', - robot_sdf, - '-robot_namespace', - namespace, - '-x', - pose['x'], - '-y', - pose['y'], - '-z', - pose['z'], - '-R', - pose['R'], - '-P', - pose['P'], - '-Y', - pose['Y'], - ], - ) - rviz_cmd = IncludeLaunchDescription( PythonLaunchDescriptionSource(os.path.join(launch_dir, 'rviz_launch.py')), condition=IfCondition(use_rviz), @@ -261,6 +206,51 @@ def generate_launch_description(): 'use_respawn': use_respawn, }.items(), ) + # The SDF file for the world is a xacro file because we wanted to + # conditionally load the SceneBroadcaster plugin based on wheter we're + # running in headless mode. But currently, the Gazebo command line doesn't + # take SDF strings for worlds, so the output of xacro needs to be saved into + # a temporary file and passed to Gazebo. + world_sdf = tempfile.mktemp(prefix='nav2_', suffix='.sdf') + world_sdf_xacro = ExecuteProcess( + cmd=['xacro', '-o', world_sdf, ['headless:=', headless], world]) + gazebo_server = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(get_package_share_directory('ros_gz_sim'), 'launch', + 'gz_sim.launch.py')), + launch_arguments={'gz_args': ['-r -s ', world_sdf]}.items(), + condition=IfCondition(use_simulator)) + + remove_temp_sdf_file = RegisterEventHandler(event_handler=OnShutdown( + on_shutdown=[ + OpaqueFunction(function=lambda _: os.remove(world_sdf)) + ])) + + gazebo_client = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(get_package_share_directory('ros_gz_sim'), + 'launch', + 'gz_sim.launch.py') + ), + condition=IfCondition(PythonExpression( + [use_simulator, ' and not ', headless])), + launch_arguments={'gz_args': ['-v4 -g ']}.items(), + ) + + gz_robot = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(sim_dir, 'launch', 'spawn_tb3.launch.py')), + launch_arguments={'namespace': namespace, + 'use_simulator': use_simulator, + 'use_sim_time': use_sim_time, + 'robot_name': robot_name, + 'robot_sdf': robot_sdf, + 'x_pose': pose['x'], + 'y_pose': pose['y'], + 'z_pose': pose['z'], + 'roll': pose['R'], + 'pitch': pose['P'], + 'yaw': pose['Y']}.items()) # Create the launch description and populate ld = LaunchDescription() @@ -285,10 +275,11 @@ def generate_launch_description(): ld.add_action(declare_robot_sdf_cmd) ld.add_action(declare_use_respawn_cmd) - # Add any conditioned actions - ld.add_action(start_gazebo_server_cmd) - ld.add_action(start_gazebo_client_cmd) - ld.add_action(start_gazebo_spawner_cmd) + ld.add_action(world_sdf_xacro) + ld.add_action(remove_temp_sdf_file) + ld.add_action(gz_robot) + ld.add_action(gazebo_server) + ld.add_action(gazebo_client) # Add the actions to launch all of the navigation nodes ld.add_action(start_robot_state_publisher_cmd) diff --git a/nav2_bringup/launch/tb3_gz_simulation_launch.py b/nav2_bringup/launch/tb4_simulation_launch.py similarity index 84% rename from nav2_bringup/launch/tb3_gz_simulation_launch.py rename to nav2_bringup/launch/tb4_simulation_launch.py index a6147518d9c..73ae1ac36cf 100644 --- a/nav2_bringup/launch/tb3_gz_simulation_launch.py +++ b/nav2_bringup/launch/tb4_simulation_launch.py @@ -1,4 +1,4 @@ -# Copyright (C) 2023 Open Source Robotics Foundation +# Copyright (C) 2024 Open Navigation LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ from launch.conditions import IfCondition from launch.event_handlers import OnShutdown from launch.launch_description_sources import PythonLaunchDescriptionSource -from launch.substitutions import LaunchConfiguration, PythonExpression +from launch.substitutions import Command, LaunchConfiguration, PythonExpression from launch_ros.actions import Node @@ -40,8 +40,10 @@ def generate_launch_description(): # Get the launch directory bringup_dir = get_package_share_directory('nav2_bringup') launch_dir = os.path.join(bringup_dir, 'launch') - # This checks that tb3 exists needed for the URDF. If not using TB3, its safe to remove. - _ = get_package_share_directory('turtlebot3_gazebo') + # This checks that tb4 exists needed for the URDF / simulation files. + # If not using TB4, its safe to remove. + sim_dir = get_package_share_directory('nav2_minimal_tb4_sim') + desc_dir = get_package_share_directory('nav2_minimal_tb4_description') # Create the launch configuration variables slam = LaunchConfiguration('slam') @@ -62,22 +64,16 @@ def generate_launch_description(): headless = LaunchConfiguration('headless') world = LaunchConfiguration('world') pose = { - 'x': LaunchConfiguration('x_pose', default='-2.00'), - 'y': LaunchConfiguration('y_pose', default='-0.50'), + 'x': LaunchConfiguration('x_pose', default='-8.00'), # Warehouse: 2.12 + 'y': LaunchConfiguration('y_pose', default='0.00'), # Warehouse: -21.3 'z': LaunchConfiguration('z_pose', default='0.01'), 'R': LaunchConfiguration('roll', default='0.00'), 'P': LaunchConfiguration('pitch', default='0.00'), - 'Y': LaunchConfiguration('yaw', default='0.00'), + 'Y': LaunchConfiguration('yaw', default='0.00'), # Warehouse: 1.57 } robot_name = LaunchConfiguration('robot_name') robot_sdf = LaunchConfiguration('robot_sdf') - # Map fully qualified names to relative ones so the node's namespace can be prepended. - # In case of the transforms (tf), currently, there doesn't seem to be a better alternative - # https://github.com/ros/geometry2/issues/32 - # https://github.com/ros/robot_state_publisher/pull/30 - # TODO(orduno) Substitute with `PushNodeRemapping` - # https://github.com/ros2/launch_ros/issues/56 remappings = [('/tf', 'tf'), ('/tf_static', 'tf_static')] # Declare the launch arguments @@ -97,7 +93,7 @@ def generate_launch_description(): declare_map_yaml_cmd = DeclareLaunchArgument( 'map', - default_value=os.path.join(bringup_dir, 'maps', 'turtlebot3_world.yaml'), + default_value=os.path.join(bringup_dir, 'maps', 'depot.yaml'), # Try warehouse.yaml! description='Full path to map file to load', ) @@ -159,28 +155,20 @@ def generate_launch_description(): declare_world_cmd = DeclareLaunchArgument( 'world', - # TODO(orduno) Switch back once ROS argument passing has been fixed upstream - # https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/91 - # default_value=os.path.join(get_package_share_directory('turtlebot3_gazebo'), - # worlds/turtlebot3_worlds/waffle.model') - default_value=os.path.join(bringup_dir, 'worlds', 'gz_world_only.sdf.xacro'), + default_value=os.path.join(sim_dir, 'worlds', 'depot.sdf'), # Try warehouse.sdf! description='Full path to world model file to load', ) declare_robot_name_cmd = DeclareLaunchArgument( - 'robot_name', default_value='turtlebot3_waffle', description='name of the robot' + 'robot_name', default_value='nav2_turtlebot4', description='name of the robot' ) declare_robot_sdf_cmd = DeclareLaunchArgument( 'robot_sdf', - default_value=os.path.join(bringup_dir, 'worlds', 'gz_waffle.sdf'), + default_value=os.path.join(desc_dir, 'urdf', 'standard', 'turtlebot4.urdf.xacro'), description='Full path to robot sdf file to spawn the robot in gazebo', ) - urdf = os.path.join(bringup_dir, 'urdf', 'turtlebot3_waffle.urdf') - with open(urdf, 'r') as infp: - robot_description = infp.read() - start_robot_state_publisher_cmd = Node( condition=IfCondition(use_robot_state_pub), package='robot_state_publisher', @@ -189,7 +177,7 @@ def generate_launch_description(): namespace=namespace, output='screen', parameters=[ - {'use_sim_time': use_sim_time, 'robot_description': robot_description} + {'use_sim_time': use_sim_time, 'robot_description': Command(['xacro', ' ', robot_sdf])} ], remappings=remappings, ) @@ -200,6 +188,7 @@ def generate_launch_description(): launch_arguments={ 'namespace': namespace, 'use_namespace': use_namespace, + 'use_sim_time': use_sim_time, 'rviz_config': rviz_config_file, }.items(), ) @@ -240,8 +229,7 @@ def generate_launch_description(): set_env_vars_resources = AppendEnvironmentVariable( 'GZ_SIM_RESOURCE_PATH', - os.path.join(get_package_share_directory('turtlebot3_gazebo'), - 'models')) + os.path.join(sim_dir, 'worlds')) gazebo_client = IncludeLaunchDescription( PythonLaunchDescriptionSource( os.path.join(get_package_share_directory('ros_gz_sim'), @@ -255,7 +243,7 @@ def generate_launch_description(): gz_robot = IncludeLaunchDescription( PythonLaunchDescriptionSource( - os.path.join(launch_dir, 'tb3_gz_robot_launch.py')), + os.path.join(sim_dir, 'launch', 'spawn_tb4.launch.py')), launch_arguments={'namespace': namespace, 'use_simulator': use_simulator, 'use_sim_time': use_sim_time, diff --git a/nav2_bringup/launch/unique_multi_tb3_simulation_launch.py b/nav2_bringup/launch/unique_multi_tb3_simulation_launch.py index 2319def79ab..7eaaf1a97d6 100644 --- a/nav2_bringup/launch/unique_multi_tb3_simulation_launch.py +++ b/nav2_bringup/launch/unique_multi_tb3_simulation_launch.py @@ -21,18 +21,24 @@ """ import os +from pathlib import Path +import tempfile from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription from launch.actions import ( + AppendEnvironmentVariable, DeclareLaunchArgument, ExecuteProcess, GroupAction, IncludeLaunchDescription, LogInfo, + OpaqueFunction, + RegisterEventHandler, ) from launch.conditions import IfCondition +from launch.event_handlers import OnShutdown from launch.launch_description_sources import PythonLaunchDescriptionSource from launch.substitutions import LaunchConfiguration, TextSubstitution @@ -41,6 +47,7 @@ def generate_launch_description(): # Get the launch directory bringup_dir = get_package_share_directory('nav2_bringup') launch_dir = os.path.join(bringup_dir, 'launch') + sim_dir = get_package_share_directory('nav2_minimal_tb3_sim') # Names and poses of the robots robots = [ @@ -66,7 +73,6 @@ def generate_launch_description(): # Simulation settings world = LaunchConfiguration('world') - simulator = LaunchConfiguration('simulator') # On this example all robots are launched with the same settings map_yaml_file = LaunchConfiguration('map') @@ -80,19 +86,13 @@ def generate_launch_description(): # Declare the launch arguments declare_world_cmd = DeclareLaunchArgument( 'world', - default_value=os.path.join(bringup_dir, 'worlds', 'world_only.model'), + default_value=os.path.join(sim_dir, 'worlds', 'tb3_sandbox.sdf.xacro'), description='Full path to world file to load', ) - declare_simulator_cmd = DeclareLaunchArgument( - 'simulator', - default_value='gazebo', - description='The simulator to use (gazebo or gzserver)', - ) - declare_map_yaml_cmd = DeclareLaunchArgument( 'map', - default_value=os.path.join(bringup_dir, 'maps', 'turtlebot3_world.yaml'), + default_value=os.path.join(bringup_dir, 'maps', 'tb3_sandbox.yaml'), description='Full path to map file to load', ) @@ -135,18 +135,19 @@ def generate_launch_description(): ) # Start Gazebo with plugin providing the robot spawning service - start_gazebo_cmd = ExecuteProcess( - cmd=[ - simulator, - '--verbose', - '-s', - 'libgazebo_ros_init.so', - '-s', - 'libgazebo_ros_factory.so', - world, - ], - output='screen', - ) + world_sdf = tempfile.mktemp(prefix='nav2_', suffix='.sdf') + world_sdf_xacro = ExecuteProcess( + cmd=['xacro', '-o', world_sdf, ['headless:=', 'False'], world]) + start_gazebo_cmd = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(get_package_share_directory('ros_gz_sim'), 'launch', + 'gz_sim.launch.py')), + launch_arguments={'gz_args': ['-r -s ', world_sdf]}.items()) + + remove_temp_sdf_file = RegisterEventHandler(event_handler=OnShutdown( + on_shutdown=[ + OpaqueFunction(function=lambda _: os.remove(world_sdf)) + ])) # Define commands for launching the navigation instances nav_instances_cmds = [] @@ -223,11 +224,18 @@ def generate_launch_description(): nav_instances_cmds.append(group) + set_env_vars_resources = AppendEnvironmentVariable( + 'GZ_SIM_RESOURCE_PATH', os.path.join(sim_dir, 'models')) + set_env_vars_resources2 = AppendEnvironmentVariable( + 'GZ_SIM_RESOURCE_PATH', + str(Path(os.path.join(sim_dir)).parent.resolve())) + # Create the launch description and populate ld = LaunchDescription() + ld.add_action(set_env_vars_resources) + ld.add_action(set_env_vars_resources2) # Declare the launch options - ld.add_action(declare_simulator_cmd) ld.add_action(declare_world_cmd) ld.add_action(declare_map_yaml_cmd) ld.add_action(declare_robot1_params_file_cmd) @@ -238,7 +246,9 @@ def generate_launch_description(): ld.add_action(declare_use_robot_state_pub_cmd) # Add the actions to start gazebo, robots and simulations + ld.add_action(world_sdf_xacro) ld.add_action(start_gazebo_cmd) + ld.add_action(remove_temp_sdf_file) for simulation_instance_cmd in nav_instances_cmds: ld.add_action(simulation_instance_cmd) diff --git a/nav2_bringup/maps/depot.pgm b/nav2_bringup/maps/depot.pgm new file mode 100644 index 00000000000..dc686c7088a Binary files /dev/null and b/nav2_bringup/maps/depot.pgm differ diff --git a/nav2_bringup/maps/depot.yaml b/nav2_bringup/maps/depot.yaml new file mode 100644 index 00000000000..8c7486b8ab6 --- /dev/null +++ b/nav2_bringup/maps/depot.yaml @@ -0,0 +1,7 @@ +image: depot.pgm +mode: trinary +resolution: 0.05 +origin: [-7.14, -7.83, 0] +negate: 0 +occupied_thresh: 0.65 +free_thresh: 0.25 diff --git a/nav2_bringup/maps/turtlebot3_world.pgm b/nav2_bringup/maps/tb3_sandbox.pgm similarity index 100% rename from nav2_bringup/maps/turtlebot3_world.pgm rename to nav2_bringup/maps/tb3_sandbox.pgm diff --git a/nav2_bringup/maps/turtlebot3_world.yaml b/nav2_bringup/maps/tb3_sandbox.yaml similarity index 80% rename from nav2_bringup/maps/turtlebot3_world.yaml rename to nav2_bringup/maps/tb3_sandbox.yaml index 51d4387e3a9..676b700a80d 100644 --- a/nav2_bringup/maps/turtlebot3_world.yaml +++ b/nav2_bringup/maps/tb3_sandbox.yaml @@ -1,4 +1,4 @@ -image: turtlebot3_world.pgm +image: tb3_sandbox.pgm resolution: 0.050000 origin: [-10.000000, -10.000000, 0.000000] negate: 0 diff --git a/nav2_bringup/maps/warehouse.pgm b/nav2_bringup/maps/warehouse.pgm new file mode 100644 index 00000000000..7ba02265299 Binary files /dev/null and b/nav2_bringup/maps/warehouse.pgm differ diff --git a/nav2_bringup/maps/warehouse.yaml b/nav2_bringup/maps/warehouse.yaml new file mode 100644 index 00000000000..46eb197ae09 --- /dev/null +++ b/nav2_bringup/maps/warehouse.yaml @@ -0,0 +1,7 @@ +image: warehouse.pgm +mode: trinary +resolution: 0.03 +origin: [-15.1, -25, 0] +negate: 0 +occupied_thresh: 0.65 +free_thresh: 0.1 diff --git a/nav2_bringup/package.xml b/nav2_bringup/package.xml index 3216746350f..6ff48ad5be8 100644 --- a/nav2_bringup/package.xml +++ b/nav2_bringup/package.xml @@ -24,8 +24,8 @@ ros_gz_sim slam_toolbox xacro - - + nav2_minimal_tb4_sim + nav2_minimal_tb3_sim ament_lint_common ament_lint_auto diff --git a/nav2_bringup/params/nav2_multirobot_params_1.yaml b/nav2_bringup/params/nav2_multirobot_params_1.yaml index 85be4769c44..a62d1221c2f 100644 --- a/nav2_bringup/params/nav2_multirobot_params_1.yaml +++ b/nav2_bringup/params/nav2_multirobot_params_1.yaml @@ -98,8 +98,6 @@ controller_server: min_speed_xy: 0.0 max_speed_xy: 0.26 min_speed_theta: 0.0 - # Add high threshold velocity for turtlebot 3 issue. - # https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/75 acc_lim_x: 2.5 acc_lim_y: 0.0 acc_lim_theta: 3.2 @@ -194,7 +192,7 @@ global_costmap: map_server: ros__parameters: - yaml_filename: "turtlebot3_world.yaml" + yaml_filename: "tb3_sandbox.yaml" save_map_timeout: 5.0 planner_server: diff --git a/nav2_bringup/params/nav2_multirobot_params_2.yaml b/nav2_bringup/params/nav2_multirobot_params_2.yaml index 7ab3d0e3351..d2befc70f5e 100644 --- a/nav2_bringup/params/nav2_multirobot_params_2.yaml +++ b/nav2_bringup/params/nav2_multirobot_params_2.yaml @@ -98,8 +98,6 @@ controller_server: min_speed_xy: 0.0 max_speed_xy: 0.26 min_speed_theta: 0.0 - # Add high threshold velocity for turtlebot 3 issue. - # https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/75 acc_lim_x: 2.5 acc_lim_y: 0.0 acc_lim_theta: 3.2 @@ -193,7 +191,7 @@ global_costmap: map_server: ros__parameters: - yaml_filename: "turtlebot3_world.yaml" + yaml_filename: "tb3_sandbox.yaml" save_map_timeout: 5.0 planner_server: diff --git a/nav2_bringup/params/nav2_multirobot_params_all.yaml b/nav2_bringup/params/nav2_multirobot_params_all.yaml index a61faf1d217..b5960cbbd4c 100644 --- a/nav2_bringup/params/nav2_multirobot_params_all.yaml +++ b/nav2_bringup/params/nav2_multirobot_params_all.yaml @@ -104,8 +104,6 @@ controller_server: min_speed_xy: 0.0 max_speed_xy: 0.26 min_speed_theta: 0.0 - # Add high threshold velocity for turtlebot 3 issue. - # https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/75 acc_lim_x: 2.5 acc_lim_y: 0.0 acc_lim_theta: 3.2 diff --git a/nav2_bringup/params/turtlebot3_waffle_bridge.yaml b/nav2_bringup/params/turtlebot3_waffle_bridge.yaml deleted file mode 100644 index 843699f8eb8..00000000000 --- a/nav2_bringup/params/turtlebot3_waffle_bridge.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# replace clock_bridge -- ros_topic_name: "clock" - gz_topic_name: "/clock" - ros_type_name: "rosgraph_msgs/msg/Clock" - gz_type_name: "gz.msgs.Clock" - direction: GZ_TO_ROS - -# no equivalent in TB3 - add -- ros_topic_name: "joint_states" - gz_topic_name: "joint_states" - ros_type_name: "sensor_msgs/msg/JointState" - gz_type_name: "gz.msgs.Model" - direction: GZ_TO_ROS - -# replace odom_bridge - check gz topic name -# gz topic published by DiffDrive plugin -- ros_topic_name: "odom" - gz_topic_name: "/odom" - ros_type_name: "nav_msgs/msg/Odometry" - gz_type_name: "gz.msgs.Odometry" - direction: GZ_TO_ROS - -# replace odom_tf_bridge - check gz and ros topic names -# gz topic published by DiffDrive plugin -# prefix ros2 topic with gz -- ros_topic_name: "tf" - gz_topic_name: "/tf" - ros_type_name: "tf2_msgs/msg/TFMessage" - gz_type_name: "gz.msgs.Pose_V" - direction: GZ_TO_ROS - -# replace imu_bridge - check gz topic name -- ros_topic_name: "imu" - gz_topic_name: "/imu" - ros_type_name: "sensor_msgs/msg/Imu" - gz_type_name: "gz.msgs.IMU" - direction: GZ_TO_ROS - -# replace lidar_bridge -- ros_topic_name: "scan" - gz_topic_name: "/scan" - ros_type_name: "sensor_msgs/msg/LaserScan" - gz_type_name: "gz.msgs.LaserScan" - direction: GZ_TO_ROS - -# replace cmd_vel_bridge -- ros_topic_name: "cmd_vel" - gz_topic_name: "/cmd_vel" - ros_type_name: "geometry_msgs/msg/Twist" - gz_type_name: "gz.msgs.Twist" - direction: ROS_TO_GZ diff --git a/nav2_bringup/rviz/nav2_default_view.rviz b/nav2_bringup/rviz/nav2_default_view.rviz index 28e4f10334f..3b64a69f06c 100644 --- a/nav2_bringup/rviz/nav2_default_view.rviz +++ b/nav2_bringup/rviz/nav2_default_view.rviz @@ -562,7 +562,7 @@ Visualization Manager: Value: true Views: Current: - Angle: -1.5708 + Angle: -0.0008007669821381569 Class: rviz_default_plugins/TopDownOrtho Enable Stereo Rendering: Stereo Eye Separation: 0.05999999865889549 @@ -572,10 +572,10 @@ Visualization Manager: Invert Z Axis: false Name: Current View Near Clip Distance: 0.009999999776482582 - Scale: 160 + Scale: 54 Target Frame: Value: TopDownOrtho (rviz_default_plugins) - X: 0 + X: -5.41 Y: 0 Saved: ~ Window Geometry: diff --git a/nav2_bringup/rviz/nav2_namespaced_view.rviz b/nav2_bringup/rviz/nav2_namespaced_view.rviz index e95196a7fba..9f70030775e 100644 --- a/nav2_bringup/rviz/nav2_namespaced_view.rviz +++ b/nav2_bringup/rviz/nav2_namespaced_view.rviz @@ -342,7 +342,7 @@ Visualization Manager: Value: true Views: Current: - Angle: -1.5708 + Angle: -0.0008007669821381569 Class: rviz_default_plugins/TopDownOrtho Enable Stereo Rendering: Stereo Eye Separation: 0.05999999865889549 @@ -352,10 +352,10 @@ Visualization Manager: Invert Z Axis: false Name: Current View Near Clip Distance: 0.009999999776482582 - Scale: 160 + Scale: 54 Target Frame: Value: TopDownOrtho (rviz_default_plugins) - X: 0 + X: -5.41 Y: 0 Saved: ~ Window Geometry: diff --git a/nav2_bringup/urdf/turtlebot3_waffle.urdf b/nav2_bringup/urdf/turtlebot3_waffle.urdf deleted file mode 100644 index f56bd6d479e..00000000000 --- a/nav2_bringup/urdf/turtlebot3_waffle.urdf +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/nav2_bringup/worlds/gz_waffle.sdf b/nav2_bringup/worlds/gz_waffle.sdf deleted file mode 100644 index 283dc4e4a73..00000000000 --- a/nav2_bringup/worlds/gz_waffle.sdf +++ /dev/null @@ -1,490 +0,0 @@ - - - - 0.0 0.0 0.0 0.0 0.0 0.0 - - - - - - - -0.064 0 0.048 0 0 0 - - 0.001 - 0.000 - 0.000 - 0.001 - 0.000 - 0.001 - - 1.0 - - - - -0.064 0 0.048 0 0 0 - - - 0.265 0.265 0.089 - - - - - - -0.064 0 0 0 0 0 - - - model://turtlebot3_common/meshes/waffle_base.dae - 0.001 0.001 0.001 - - - - 1 1 1 - - - - - - - true - 200 - imu - imu_link - - - - - 0.0 - 2e-4 - - - - - 0.0 - 2e-4 - - - - - 0.0 - 2e-4 - - - - - - - 0.0 - 1.7e-2 - - - - - 0.0 - 1.7e-2 - - - - - 0.0 - 1.7e-2 - - - - - - - - - - -0.064 0 0.121 0 0 0 - - 0.001 - 0.000 - 0.000 - 0.001 - 0.000 - 0.001 - - 0.125 - - - - -0.052 0 0.111 0 0 0 - - - 0.0508 - 0.055 - - - - - - -0.064 0 0.121 0 0 0 - - - model://turtlebot3_common/meshes/lds.dae - 0.001 0.001 0.001 - - - - 1 1 1 - - - - - true - true - -0.064 0 0.15 0 0 0 - 5 - scan - base_scan - - - - 360 - 1.000000 - 0.000000 - 6.280000 - - - - 0.00001 - 20.0 - 0.015000 - - - gaussian - 0.0 - 0.01 - - - - - - - - - 0.0 0.144 0.023 -1.57 0 0 - - 0.001 - 0.000 - 0.000 - 0.001 - 0.000 - 0.001 - - 0.1 - - - - 0.0 0.144 0.023 -1.57 0 0 - - - 0.033 - 0.018 - - - - - - 1 - 1 - 0.035 - 0 - 0 0 1 - - - - - 0 - 0.2 - 1e+5 - 1 - 0.01 - 0.001 - - - - - - - 0.0 0.144 0.023 0 0 0 - - - model://turtlebot3_common/meshes/tire.dae - 0.001 0.001 0.001 - - - - 1 1 1 - - - - - - - - 0.0 -0.144 0.023 -1.57 0 0 - - 0.001 - 0.000 - 0.000 - 0.001 - 0.000 - 0.001 - - 0.1 - - - - 0.0 -0.144 0.023 -1.57 0 0 - - - 0.033 - 0.018 - - - - - - 1 - 1 - 0.035 - 0 - 0 0 1 - - - - - 0 - 0.2 - 1e+5 - 1 - 0.01 - 0.001 - - - - - - - 0.0 -0.144 0.023 0 0 0 - - - model://turtlebot3_common/meshes/tire.dae - 0.001 0.001 0.001 - - - - 1 1 1 - - - - - - -0.177 -0.064 -0.004 0 0 0 - - 0.001 - - 0.00001 - 0.000 - 0.000 - 0.00001 - 0.000 - 0.00001 - - - - - - 0.005000 - - - - - - 0 - 0.2 - 1e+5 - 1 - 0.01 - 0.001 - - - - - - - - -0.177 0.064 -0.004 0 0 0 - - 0.001 - - 0.00001 - 0.000 - 0.000 - 0.00001 - 0.000 - 0.00001 - - - - - - 0.005000 - - - - - - 0 - 0.2 - 1e+5 - 1 - 0.01 - 0.001 - - - - - - - - - 0.069 -0.047 0.107 0 0 0 - - 0.001 - 0.000 - 0.000 - 0.001 - 0.000 - 0.001 - - 0.035 - - - 0 0.047 -0.005 0 0 0 - - - 0.008 0.130 0.022 - - - - - 0.069 -0.047 0.107 0 0 0 - - - 1 - 5 - 0.064 -0.047 0.107 0 0 0 - camera_depth_frame - - 1.047 - - 320 - 240 - - - - - - 19.4 - - - - - 0.001 - 5.0 - - - - - - - - base_footprint - base_link - 0.0 0.0 0.010 0 0 0 - - - - base_link - wheel_left_link - 0.0 0.144 0.023 -1.57 0 0 - - 0 0 1 - - - - - base_link - wheel_right_link - 0.0 -0.144 0.023 -1.57 0 0 - - 0 0 1 - - - - - base_link - caster_back_right_link - - - - base_link - caster_back_left_link - - - - base_link - base_scan - -0.064 0 0.121 0 0 0 - - 0 0 1 - - - - - base_link - camera_link - 0.064 -0.065 0.094 0 0 0 - - 0 0 1 - - - - - - wheel_left_joint - wheel_right_joint - 0.287 - 0.033 - 1 - -1 - 2 - -2 - 0.46 - -0.46 - 1.9 - -1.9 - /cmd_vel - /odom - tf - odom - base_footprint - 30 - - - - wheel_left_joint - wheel_right_joint - joint_states - 30 - - - - diff --git a/nav2_bringup/worlds/gz_world_only.sdf.xacro b/nav2_bringup/worlds/gz_world_only.sdf.xacro deleted file mode 100644 index d93c7facf05..00000000000 --- a/nav2_bringup/worlds/gz_world_only.sdf.xacro +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - ogre2 - - - - - - 0 - 0 0 10 0 0 0 - 0.8 0.8 0.8 1 - 0.8 0.8 0.8 1 - - 1000 - 0.9 - 0.01 - 0.001 - - -0.5 0.1 -0.9 - - - 1 - - - - - 0 0 1 - 100 100 - - - 10 - - - - - 0 0 1 - 100 100 - - - - 0.8 0.8 0.8 1 - 0.8 0.8 0.8 1 - 0.8 0.8 0.8 1 - - - - - - - 0 - - - - 0.001 - 1 - 1000.0 - - - - 1 - - model://turtlebot3_world - - - - - diff --git a/nav2_bringup/worlds/waffle.model b/nav2_bringup/worlds/waffle.model deleted file mode 100644 index c0bdcac2e2d..00000000000 --- a/nav2_bringup/worlds/waffle.model +++ /dev/null @@ -1,504 +0,0 @@ - - - - 0.0 0.0 0.0 0.0 0.0 0.0 - - - - - - - -0.064 0 0.048 0 0 0 - - 0.001 - 0.000 - 0.000 - 0.001 - 0.000 - 0.001 - - 1.0 - - - - -0.064 0 0.048 0 0 0 - - - 0.265 0.265 0.089 - - - - - - -0.064 0 0 0 0 0 - - - model://turtlebot3_common/meshes/waffle_base.dae - 0.001 0.001 0.001 - - - - - - - - true - 200 - - - - - 0.0 - 2e-4 - - - - - 0.0 - 2e-4 - - - - - 0.0 - 2e-4 - - - - - - - 0.0 - 1.7e-2 - - - - - 0.0 - 1.7e-2 - - - - - 0.0 - 1.7e-2 - - - - - - false - - - ~/out:=imu - - - - - - - - -0.064 0 0.121 0 0 0 - - 0.001 - 0.000 - 0.000 - 0.001 - 0.000 - 0.001 - - 0.125 - - - - -0.052 0 0.111 0 0 0 - - - 0.0508 - 0.055 - - - - - - -0.064 0 0.121 0 0 0 - - - model://turtlebot3_common/meshes/lds.dae - 0.001 0.001 0.001 - - - - - - true - true - -0.064 0 0.15 0 0 0 - 5 - - - - 360 - 1.000000 - 0.000000 - 6.280000 - - - - 0.00000 - 20.0 - 0.015000 - - - gaussian - 0.0 - 0.01 - - - - - - ~/out:=scan - - sensor_msgs/LaserScan - base_scan - - - - - - - - 0.0 0.144 0.023 -1.57 0 0 - - 0.001 - 0.000 - 0.000 - 0.001 - 0.000 - 0.001 - - 0.1 - - - - 0.0 0.144 0.023 -1.57 0 0 - - - 0.033 - 0.018 - - - - - - - 100000.0 - 100000.0 - 0 0 0 - 0.0 - 0.0 - - - - - 0 - 0.2 - 1e+5 - 1 - 0.01 - 0.001 - - - - - - - 0.0 0.144 0.023 0 0 0 - - - model://turtlebot3_common/meshes/tire.dae - 0.001 0.001 0.001 - - - - - - - - - 0.0 -0.144 0.023 -1.57 0 0 - - 0.001 - 0.000 - 0.000 - 0.001 - 0.000 - 0.001 - - 0.1 - - - - 0.0 -0.144 0.023 -1.57 0 0 - - - 0.033 - 0.018 - - - - - - - 100000.0 - 100000.0 - 0 0 0 - 0.0 - 0.0 - - - - - 0 - 0.2 - 1e+5 - 1 - 0.01 - 0.001 - - - - - - - 0.0 -0.144 0.023 0 0 0 - - - model://turtlebot3_common/meshes/tire.dae - 0.001 0.001 0.001 - - - - - - - -0.177 -0.064 -0.004 0 0 0 - - 0.001 - - 0.00001 - 0.000 - 0.000 - 0.00001 - 0.000 - 0.00001 - - - - - - 0.005000 - - - - - - 0 - 0.2 - 1e+5 - 1 - 0.01 - 0.001 - - - - - - - - -0.177 0.064 -0.004 0 0 0 - - 0.001 - - 0.00001 - 0.000 - 0.000 - 0.00001 - 0.000 - 0.00001 - - - - - - 0.005000 - - - - - - 0 - 0.2 - 1e+5 - 1 - 0.01 - 0.001 - - - - - - - - - 0.069 -0.047 0.107 0 0 0 - - 0.001 - 0.000 - 0.000 - 0.001 - 0.000 - 0.001 - - 0.035 - - - 0 0.047 -0.005 0 0 0 - - - 0.008 0.130 0.022 - - - - - 0.069 -0.047 0.107 0 0 0 - - - 1 - 5 - 0.064 -0.047 0.107 0 0 0 - - - - - - intel_realsense_r200_depth - camera_depth_frame - 0.07 - 0.001 - 5.0 - - - - - 0 0.047 -0.005 0 0 0 - - - 0.008 0.130 0.022 - - - - 0.069 -0.047 0.107 0 0 0 - - - - base_footprint - base_link - 0.0 0.0 0.010 0 0 0 - - - - base_link - wheel_left_link - 0.0 0.144 0.023 -1.57 0 0 - - 0 0 1 - - - - - base_link - wheel_right_link - 0.0 -0.144 0.023 -1.57 0 0 - - 0 0 1 - - - - - base_link - caster_back_right_link - - - - base_link - caster_back_left_link - - - - base_link - base_scan - -0.064 0 0.121 0 0 0 - - 0 0 1 - - - - - base_link - camera_link - 0.064 -0.065 0.094 0 0 0 - - 0 0 1 - - - - - - - - - /tf:=tf - - - 30 - - - wheel_left_joint - wheel_right_joint - - - 0.287 - 0.066 - - - 20 - 1.0 - - cmd_vel - - - true - true - false - - odom - odom - base_footprint - - - - - - - ~/out:=joint_states - - 30 - wheel_left_joint - wheel_right_joint - - - - diff --git a/nav2_bringup/worlds/world_only.model b/nav2_bringup/worlds/world_only.model deleted file mode 100644 index aed412a8d4f..00000000000 --- a/nav2_bringup/worlds/world_only.model +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - model://ground_plane - - - - model://sun - - - - false - - - - - 0 0 10 0 1.570796 0 - orbit - perspective - - - - - 1000.0 - 0.001 - 1 - - - quick - 150 - 0 - 1.400000 - 1 - - - 0.00001 - 0.2 - 2000.000000 - 0.01000 - - - - - - 1 - - model://turtlebot3_world - - - - - diff --git a/tools/planner_benchmarking/planning_benchmark_bringup.py b/tools/planner_benchmarking/planning_benchmark_bringup.py index 506ba544183..09bb1bbe756 100644 --- a/tools/planner_benchmarking/planning_benchmark_bringup.py +++ b/tools/planner_benchmarking/planning_benchmark_bringup.py @@ -26,7 +26,7 @@ def generate_launch_description(): config = os.path.join( get_package_share_directory('nav2_bringup'), 'params', 'nav2_params.yaml' ) - map_file = os.path.join(nav2_bringup_dir, 'maps', 'turtlebot3_world.yaml') + map_file = os.path.join(nav2_bringup_dir, 'maps', 'tb3_sandbox.yaml') lifecycle_nodes = ['map_server', 'planner_server'] return LaunchDescription( diff --git a/tools/underlay.repos b/tools/underlay.repos index a0f6a83ae27..d26b075a3ea 100644 --- a/tools/underlay.repos +++ b/tools/underlay.repos @@ -7,10 +7,6 @@ repositories: # type: git # url: https://github.com/ros/angles.git # version: ros2 - # ros-simulation/gazebo_ros_pkgs: - # type: git - # url: https://github.com/ros-simulation/gazebo_ros_pkgs.git - # version: ros2 # ros-perception/vision_opencv: # type: git # url: https://github.com/ros-perception/vision_opencv.git @@ -35,7 +31,7 @@ repositories: # type: git # url: https://github.com/cra-ros-pkg/robot_localization.git # version: ros2 - # ros2/geometry2: - # type: git - # url: https://github.com/ros2/geometry2.git - # version: rolling + ros-navigation/nav2_minimal_turtlebot_simulation: + type: git + url: https://github.com/ros-navigation/nav2_minimal_turtlebot_simulation.git + version: main