diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f26253..81fde2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ project(aws_robomaker_small_warehouse_world) # Find ament packages and libraries for ament and system dependencies ################################################################################ find_package(ament_cmake REQUIRED) -find_package(gazebo_ros REQUIRED) +find_package(ros_gz_sim REQUIRED) ################################################################################ # Install @@ -21,7 +21,7 @@ install( ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/env-hooks/aws_robomaker_small_warehouse_world.dsv.in") ament_export_dependencies(ament_cmake) -ament_export_dependencies(gazebo_ros) +ament_export_dependencies(ros_gz_sim) ################################################################################ # Macro for ament package diff --git a/launch/small_warehouse.launch.py b/launch/small_warehouse.launch.py index d9e2253..1a8ab3b 100644 --- a/launch/small_warehouse.launch.py +++ b/launch/small_warehouse.launch.py @@ -16,24 +16,18 @@ from ament_index_python.packages import get_package_share_directory -import launch from launch import LaunchDescription -from launch.actions import DeclareLaunchArgument, ExecuteProcess, IncludeLaunchDescription -from launch.conditions import IfCondition -from launch.launch_description_sources import PythonLaunchDescriptionSource -from launch.substitutions import LaunchConfiguration, PythonExpression -from launch_ros.actions import Node +from launch.actions import DeclareLaunchArgument, ExecuteProcess +from launch.substitutions import LaunchConfiguration +from launch.actions import SetEnvironmentVariable def generate_launch_description(): # Get the launch directory aws_small_warehouse_dir = get_package_share_directory('aws_robomaker_small_warehouse_world') - gazebo_ros = get_package_share_directory('gazebo_ros') # Launch configuration variables specific to simulation - use_sim_time = LaunchConfiguration('use_sim_time') - use_simulator = LaunchConfiguration('use_simulator') - headless = LaunchConfiguration('headless') + world = LaunchConfiguration('world') declare_use_sim_time_cmd = DeclareLaunchArgument( @@ -51,17 +45,13 @@ def generate_launch_description(): default_value=os.path.join(aws_small_warehouse_dir, 'worlds', 'small_warehouse', 'small_warehouse.world'), description='Full path to world model file to load') - # Specify the actions - start_gazebo_server_cmd = launch.actions.IncludeLaunchDescription( - launch.launch_description_sources.PythonLaunchDescriptionSource( - os.path.join(gazebo_ros, 'launch', 'gzserver.launch.py')) - ) + model_path = os.path.join(aws_small_warehouse_dir, 'models') + + gazebo_server_cmd_line = [ + 'gz', 'sim', '-r', '-v4', world] - start_gazebo_client_cmd = launch.actions.IncludeLaunchDescription( - launch.launch_description_sources.PythonLaunchDescriptionSource( - os.path.join(gazebo_ros, 'launch', 'gzclient.launch.py')), - condition=IfCondition(PythonExpression(['not ', headless])) - ) + gazebo = ExecuteProcess( + cmd=gazebo_server_cmd_line, output='screen') # Create the launch description and populate ld = LaunchDescription() @@ -70,9 +60,8 @@ def generate_launch_description(): ld.add_action(declare_use_sim_time_cmd) ld.add_action(declare_simulator_cmd) ld.add_action(declare_world_cmd) - + ld.add_action(SetEnvironmentVariable('GZ_SIM_RESOURCE_PATH', model_path)) # Add any conditioned actions - ld.add_action(start_gazebo_server_cmd) - ld.add_action(start_gazebo_client_cmd) + ld.add_action(gazebo) return ld diff --git a/models/aws_robomaker_warehouse_Bucket_01/model.sdf b/models/aws_robomaker_warehouse_Bucket_01/model.sdf index 1a11c29..90b07d4 100644 --- a/models/aws_robomaker_warehouse_Bucket_01/model.sdf +++ b/models/aws_robomaker_warehouse_Bucket_01/model.sdf @@ -21,7 +21,7 @@ - file://models/aws_robomaker_warehouse_Bucket_01/meshes/aws_robomaker_warehouse_Bucket_01_visual.DAE + model://aws_robomaker_warehouse_Bucket_01/meshes/aws_robomaker_warehouse_Bucket_01_visual.DAE 1 @@ -32,7 +32,7 @@ 0 0 0 0 -0 0 - file://models/aws_robomaker_warehouse_Bucket_01/meshes/aws_robomaker_warehouse_Bucket_01_collision.DAE + model://aws_robomaker_warehouse_Bucket_01/meshes/aws_robomaker_warehouse_Bucket_01_collision.DAE 1 1 1 diff --git a/models/aws_robomaker_warehouse_ClutteringA_01/model.sdf b/models/aws_robomaker_warehouse_ClutteringA_01/model.sdf index e0ab80f..629f0fc 100644 --- a/models/aws_robomaker_warehouse_ClutteringA_01/model.sdf +++ b/models/aws_robomaker_warehouse_ClutteringA_01/model.sdf @@ -16,7 +16,7 @@ - file://models/aws_robomaker_warehouse_ClutteringA_01/meshes/aws_robomaker_warehouse_ClutteringA_01_collision.DAE + model://aws_robomaker_warehouse_ClutteringA_01/meshes/aws_robomaker_warehouse_ClutteringA_01_collision.DAE 1 1 1 @@ -44,7 +44,7 @@ - file://models/aws_robomaker_warehouse_ClutteringA_01/meshes/aws_robomaker_warehouse_ClutteringA_01_visual.DAE + model://aws_robomaker_warehouse_ClutteringA_01/meshes/aws_robomaker_warehouse_ClutteringA_01_visual.DAE 1 diff --git a/models/aws_robomaker_warehouse_ClutteringC_01/model.sdf b/models/aws_robomaker_warehouse_ClutteringC_01/model.sdf index 0a1802a..334a416 100644 --- a/models/aws_robomaker_warehouse_ClutteringC_01/model.sdf +++ b/models/aws_robomaker_warehouse_ClutteringC_01/model.sdf @@ -16,7 +16,7 @@ - file://models/aws_robomaker_warehouse_ClutteringC_01/meshes/aws_robomaker_warehouse_ClutteringC_01_collision.DAE + model://aws_robomaker_warehouse_ClutteringC_01/meshes/aws_robomaker_warehouse_ClutteringC_01_collision.DAE 1 1 1 @@ -44,7 +44,7 @@ - file://models/aws_robomaker_warehouse_ClutteringC_01/meshes/aws_robomaker_warehouse_ClutteringC_01_visual.DAE + model://aws_robomaker_warehouse_ClutteringC_01/meshes/aws_robomaker_warehouse_ClutteringC_01_visual.DAE 1 diff --git a/models/aws_robomaker_warehouse_ClutteringD_01/model.sdf b/models/aws_robomaker_warehouse_ClutteringD_01/model.sdf index 31da401..51ac2cd 100644 --- a/models/aws_robomaker_warehouse_ClutteringD_01/model.sdf +++ b/models/aws_robomaker_warehouse_ClutteringD_01/model.sdf @@ -16,7 +16,7 @@ - file://models/aws_robomaker_warehouse_ClutteringD_01/meshes/aws_robomaker_warehouse_ClutteringD_01_collision.DAE + model://aws_robomaker_warehouse_ClutteringD_01/meshes/aws_robomaker_warehouse_ClutteringD_01_collision.DAE 1 1 1 @@ -44,7 +44,7 @@ - file://models/aws_robomaker_warehouse_ClutteringD_01/meshes/aws_robomaker_warehouse_ClutteringD_01_visual.DAE + model://aws_robomaker_warehouse_ClutteringD_01/meshes/aws_robomaker_warehouse_ClutteringD_01_visual.DAE 1 diff --git a/models/aws_robomaker_warehouse_DeskC_01/model.sdf b/models/aws_robomaker_warehouse_DeskC_01/model.sdf index 3fcbd97..0ae3cee 100644 --- a/models/aws_robomaker_warehouse_DeskC_01/model.sdf +++ b/models/aws_robomaker_warehouse_DeskC_01/model.sdf @@ -16,7 +16,7 @@ - file://models/aws_robomaker_warehouse_DeskC_01/meshes/aws_robomaker_warehouse_DeskC_01_collision.DAE + model://aws_robomaker_warehouse_DeskC_01/meshes/aws_robomaker_warehouse_DeskC_01_collision.DAE 1 1 1 @@ -35,7 +35,7 @@ - file://models/aws_robomaker_warehouse_DeskC_01/meshes/aws_robomaker_warehouse_DeskC_01_visual.DAE + model://aws_robomaker_warehouse_DeskC_01/meshes/aws_robomaker_warehouse_DeskC_01_visual.DAE 1 diff --git a/models/aws_robomaker_warehouse_GroundB_01/model.sdf b/models/aws_robomaker_warehouse_GroundB_01/model.sdf index abab8b4..464a37b 100644 --- a/models/aws_robomaker_warehouse_GroundB_01/model.sdf +++ b/models/aws_robomaker_warehouse_GroundB_01/model.sdf @@ -4,19 +4,11 @@ 1000 - - 1200083.33 - 0 - 0 - 8333416.66 - 0 - 2033333.33 - - file://models/aws_robomaker_warehouse_GroundB_01/meshes/aws_robomaker_warehouse_GroundB_01_collision.DAE + model://aws_robomaker_warehouse_GroundB_01/meshes/aws_robomaker_warehouse_GroundB_01_collision.DAE 1 1 1 @@ -35,7 +27,7 @@ - file://models/aws_robomaker_warehouse_GroundB_01/meshes/aws_robomaker_warehouse_GroundB_01_visual.DAE + model://aws_robomaker_warehouse_GroundB_01/meshes/aws_robomaker_warehouse_GroundB_01_visual.DAE 1 diff --git a/models/aws_robomaker_warehouse_Lamp_01/model.sdf b/models/aws_robomaker_warehouse_Lamp_01/model.sdf index 8b636c8..9ef1c09 100644 --- a/models/aws_robomaker_warehouse_Lamp_01/model.sdf +++ b/models/aws_robomaker_warehouse_Lamp_01/model.sdf @@ -16,7 +16,7 @@ - file://models/aws_robomaker_warehouse_Lamp_01/meshes/aws_robomaker_warehouse_Lamp_01_collision.DAE + model://aws_robomaker_warehouse_Lamp_01/meshes/aws_robomaker_warehouse_Lamp_01_collision.DAE 1 1 1 @@ -35,7 +35,7 @@ - file://models/aws_robomaker_warehouse_Lamp_01/meshes/aws_robomaker_warehouse_Lamp_01_visual.DAE + model://aws_robomaker_warehouse_Lamp_01/meshes/aws_robomaker_warehouse_Lamp_01_visual.DAE 1 diff --git a/models/aws_robomaker_warehouse_PalletJackB_01/model.sdf b/models/aws_robomaker_warehouse_PalletJackB_01/model.sdf index b6568b1..72547b0 100644 --- a/models/aws_robomaker_warehouse_PalletJackB_01/model.sdf +++ b/models/aws_robomaker_warehouse_PalletJackB_01/model.sdf @@ -16,7 +16,7 @@ - file://models/aws_robomaker_warehouse_PalletJackB_01/meshes/aws_robomaker_warehouse_PalletJackB_01_collision.DAE + model://aws_robomaker_warehouse_PalletJackB_01/meshes/aws_robomaker_warehouse_PalletJackB_01_collision.DAE 1 1 1 @@ -35,7 +35,7 @@ - file://models/aws_robomaker_warehouse_PalletJackB_01/meshes/aws_robomaker_warehouse_PalletJackB_01_visual.DAE + model://aws_robomaker_warehouse_PalletJackB_01/meshes/aws_robomaker_warehouse_PalletJackB_01_visual.DAE 1 diff --git a/models/aws_robomaker_warehouse_RoofB_01/model.sdf b/models/aws_robomaker_warehouse_RoofB_01/model.sdf index 11f8fb6..6fcdd82 100644 --- a/models/aws_robomaker_warehouse_RoofB_01/model.sdf +++ b/models/aws_robomaker_warehouse_RoofB_01/model.sdf @@ -1,23 +1,15 @@ - + 1000 0 0 0 0 0 0 - - 834024.533 - 0 - 0 - 459441.200 - 0 - 1302083.333 - - file://models/aws_robomaker_warehouse_RoofB_01/meshes/aws_robomaker_warehouse_RoofB_01_collision.DAE + model://aws_robomaker_warehouse_RoofB_01/meshes/aws_robomaker_warehouse_RoofB_01_collision.DAE 1 1 1 @@ -45,7 +37,7 @@ - file://models/aws_robomaker_warehouse_RoofB_01/meshes/aws_robomaker_warehouse_RoofB_01_visual.DAE + model://aws_robomaker_warehouse_RoofB_01/meshes/aws_robomaker_warehouse_RoofB_01_visual.DAE 3 diff --git a/models/aws_robomaker_warehouse_ShelfD_01/model.sdf b/models/aws_robomaker_warehouse_ShelfD_01/model.sdf index 3b4f0ed..17c326e 100644 --- a/models/aws_robomaker_warehouse_ShelfD_01/model.sdf +++ b/models/aws_robomaker_warehouse_ShelfD_01/model.sdf @@ -16,7 +16,7 @@ - file://models/aws_robomaker_warehouse_ShelfD_01/meshes/aws_robomaker_warehouse_ShelfD_01_collision.DAE + model://aws_robomaker_warehouse_ShelfD_01/meshes/aws_robomaker_warehouse_ShelfD_01_collision.DAE 1 1 1 @@ -35,7 +35,7 @@ - file://models/aws_robomaker_warehouse_ShelfD_01/meshes/aws_robomaker_warehouse_ShelfD_01_visual.DAE + model://aws_robomaker_warehouse_ShelfD_01/meshes/aws_robomaker_warehouse_ShelfD_01_visual.DAE 1 diff --git a/models/aws_robomaker_warehouse_ShelfE_01/model.sdf b/models/aws_robomaker_warehouse_ShelfE_01/model.sdf index 5c043ec..d615c9e 100644 --- a/models/aws_robomaker_warehouse_ShelfE_01/model.sdf +++ b/models/aws_robomaker_warehouse_ShelfE_01/model.sdf @@ -16,7 +16,7 @@ - file://models/aws_robomaker_warehouse_ShelfE_01/meshes/aws_robomaker_warehouse_ShelfE_01_collision.DAE + model://aws_robomaker_warehouse_ShelfE_01/meshes/aws_robomaker_warehouse_ShelfE_01_collision.DAE 1 1 1 @@ -35,7 +35,7 @@ - file://models/aws_robomaker_warehouse_ShelfE_01/meshes/aws_robomaker_warehouse_ShelfE_01_visual.DAE + model://aws_robomaker_warehouse_ShelfE_01/meshes/aws_robomaker_warehouse_ShelfE_01_visual.DAE 1 diff --git a/models/aws_robomaker_warehouse_ShelfF_01/model.sdf b/models/aws_robomaker_warehouse_ShelfF_01/model.sdf index c140f01..bcc9aef 100644 --- a/models/aws_robomaker_warehouse_ShelfF_01/model.sdf +++ b/models/aws_robomaker_warehouse_ShelfF_01/model.sdf @@ -16,7 +16,7 @@ - file://models/aws_robomaker_warehouse_ShelfF_01/meshes/aws_robomaker_warehouse_ShelfF_01_collision.DAE + model://aws_robomaker_warehouse_ShelfF_01/meshes/aws_robomaker_warehouse_ShelfF_01_collision.DAE 1 1 1 @@ -35,7 +35,7 @@ - file://models/aws_robomaker_warehouse_ShelfF_01/meshes/aws_robomaker_warehouse_ShelfF_01_visual.DAE + model://aws_robomaker_warehouse_ShelfF_01/meshes/aws_robomaker_warehouse_ShelfF_01_visual.DAE 1 diff --git a/models/aws_robomaker_warehouse_TrashCanC_01/model.sdf b/models/aws_robomaker_warehouse_TrashCanC_01/model.sdf index c5915e1..483c066 100644 --- a/models/aws_robomaker_warehouse_TrashCanC_01/model.sdf +++ b/models/aws_robomaker_warehouse_TrashCanC_01/model.sdf @@ -16,7 +16,7 @@ - file://models/aws_robomaker_warehouse_TrashCanC_01/meshes/aws_robomaker_warehouse_TrashCanC_01_collision.DAE + model://aws_robomaker_warehouse_TrashCanC_01/meshes/aws_robomaker_warehouse_TrashCanC_01_collision.DAE 1 1 1 @@ -35,7 +35,7 @@ - file://models/aws_robomaker_warehouse_TrashCanC_01/meshes/aws_robomaker_warehouse_TrashCanC_01_visual.DAE + model://aws_robomaker_warehouse_TrashCanC_01/meshes/aws_robomaker_warehouse_TrashCanC_01_visual.DAE 1 diff --git a/models/aws_robomaker_warehouse_WallB_01/model.sdf b/models/aws_robomaker_warehouse_WallB_01/model.sdf index e1695f3..66af32f 100644 --- a/models/aws_robomaker_warehouse_WallB_01/model.sdf +++ b/models/aws_robomaker_warehouse_WallB_01/model.sdf @@ -16,7 +16,7 @@ - file://models/aws_robomaker_warehouse_WallB_01/meshes/aws_robomaker_warehouse_WallB_01_collision.DAE + model://aws_robomaker_warehouse_WallB_01/meshes/aws_robomaker_warehouse_WallB_01_collision.DAE 1 1 1 @@ -35,7 +35,7 @@ - file://models/aws_robomaker_warehouse_WallB_01/meshes/aws_robomaker_warehouse_WallB_01_visual.DAE + model://aws_robomaker_warehouse_WallB_01/meshes/aws_robomaker_warehouse_WallB_01_visual.DAE 2 diff --git a/package.xml b/package.xml index 8ce31c0..27ffd33 100644 --- a/package.xml +++ b/package.xml @@ -11,12 +11,9 @@ ament_cmake - gazebo_ros - gazebo - gazebo_plugins + ros_gz_sim ament_cmake - diff --git a/worlds/no_roof_small_warehouse/no_roof_small_warehouse.world b/worlds/no_roof_small_warehouse/no_roof_small_warehouse.world index 91fece4..a805568 100644 --- a/worlds/no_roof_small_warehouse/no_roof_small_warehouse.world +++ b/worlds/no_roof_small_warehouse/no_roof_small_warehouse.world @@ -4,18 +4,39 @@ 0 0 -9.8 - 0.001 - 1 + 0.005 + 1.0 1000 + + + + + + + + ogre2 + + + - + --> @@ -94,6 +115,8 @@ -0.061684 -6.6493 0 0 0 0 + + model://aws_robomaker_warehouse_GroundB_01 diff --git a/worlds/small_warehouse/small_warehouse.world b/worlds/small_warehouse/small_warehouse.world index cb845fd..1a1c29b 100644 --- a/worlds/small_warehouse/small_warehouse.world +++ b/worlds/small_warehouse/small_warehouse.world @@ -4,11 +4,33 @@ 0 0 -9.8 - 0.001 - 1 + 0.005 + 1.0 1000 + + + + + + + + ogre2 + + + +