add humble-navigation2
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
# Copyright (c) 2021 Samsung Research America
|
||||
# Copyright (c) 2022 Joshua Wallace
|
||||
#
|
||||
# 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 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
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
warehouse_dir = get_package_share_directory('aws_robomaker_small_warehouse_world')
|
||||
nav2_bringup_dir = get_package_share_directory('nav2_bringup')
|
||||
python_commander_dir = get_package_share_directory('nav2_simple_commander')
|
||||
|
||||
map_yaml_file = os.path.join(warehouse_dir, 'maps', '005', 'map.yaml')
|
||||
world = os.path.join(python_commander_dir, 'warehouse.world')
|
||||
|
||||
# Launch configuration variables
|
||||
use_rviz = LaunchConfiguration('use_rviz')
|
||||
headless = LaunchConfiguration('headless')
|
||||
|
||||
# Declare the launch arguments
|
||||
declare_use_rviz_cmd = DeclareLaunchArgument(
|
||||
'use_rviz',
|
||||
default_value='True',
|
||||
description='Whether to start RVIZ')
|
||||
|
||||
declare_simulator_cmd = DeclareLaunchArgument(
|
||||
'headless',
|
||||
default_value='False',
|
||||
description='Whether to execute gzclient)')
|
||||
|
||||
# start the simulation
|
||||
start_gazebo_server_cmd = ExecuteProcess(
|
||||
cmd=['gzserver', '-s', 'libgazebo_ros_factory.so', world],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
start_gazebo_client_cmd = ExecuteProcess(
|
||||
condition=IfCondition(PythonExpression(['not ', headless])),
|
||||
cmd=['gzclient'],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
urdf = os.path.join(nav2_bringup_dir, 'urdf', 'turtlebot3_waffle.urdf')
|
||||
start_robot_state_publisher_cmd = Node(
|
||||
package='robot_state_publisher',
|
||||
executable='robot_state_publisher',
|
||||
name='robot_state_publisher',
|
||||
output='screen',
|
||||
arguments=[urdf])
|
||||
|
||||
# start the visualization
|
||||
rviz_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'rviz_launch.py')),
|
||||
condition=IfCondition(use_rviz),
|
||||
launch_arguments={'namespace': '',
|
||||
'use_namespace': 'False'}.items())
|
||||
|
||||
# start navigation
|
||||
bringup_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'bringup_launch.py')),
|
||||
launch_arguments={'map': map_yaml_file}.items())
|
||||
|
||||
# start the demo autonomy task
|
||||
demo_cmd = Node(
|
||||
package='nav2_simple_commander',
|
||||
executable='example_assisted_teleop',
|
||||
emulate_tty=True,
|
||||
output='screen')
|
||||
|
||||
ld = LaunchDescription()
|
||||
ld.add_action(declare_use_rviz_cmd)
|
||||
ld.add_action(declare_simulator_cmd)
|
||||
ld.add_action(start_gazebo_server_cmd)
|
||||
ld.add_action(start_gazebo_client_cmd)
|
||||
ld.add_action(start_robot_state_publisher_cmd)
|
||||
ld.add_action(rviz_cmd)
|
||||
ld.add_action(bringup_cmd)
|
||||
ld.add_action(demo_cmd)
|
||||
return ld
|
||||
@@ -0,0 +1,98 @@
|
||||
# Copyright (c) 2021 Samsung Research America
|
||||
#
|
||||
# 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 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
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
warehouse_dir = get_package_share_directory('aws_robomaker_small_warehouse_world')
|
||||
nav2_bringup_dir = get_package_share_directory('nav2_bringup')
|
||||
python_commander_dir = get_package_share_directory('nav2_simple_commander')
|
||||
|
||||
map_yaml_file = os.path.join(warehouse_dir, 'maps', '005', 'map.yaml')
|
||||
world = os.path.join(python_commander_dir, 'warehouse.world')
|
||||
|
||||
# Launch configuration variables
|
||||
use_rviz = LaunchConfiguration('use_rviz')
|
||||
headless = LaunchConfiguration('headless')
|
||||
|
||||
# Declare the launch arguments
|
||||
declare_use_rviz_cmd = DeclareLaunchArgument(
|
||||
'use_rviz',
|
||||
default_value='True',
|
||||
description='Whether to start RVIZ')
|
||||
|
||||
declare_simulator_cmd = DeclareLaunchArgument(
|
||||
'headless',
|
||||
default_value='False',
|
||||
description='Whether to execute gzclient)')
|
||||
|
||||
# start the simulation
|
||||
start_gazebo_server_cmd = ExecuteProcess(
|
||||
cmd=['gzserver', '-s', 'libgazebo_ros_factory.so', world],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
start_gazebo_client_cmd = ExecuteProcess(
|
||||
condition=IfCondition(PythonExpression(['not ', headless])),
|
||||
cmd=['gzclient'],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
urdf = os.path.join(nav2_bringup_dir, 'urdf', 'turtlebot3_waffle.urdf')
|
||||
start_robot_state_publisher_cmd = Node(
|
||||
package='robot_state_publisher',
|
||||
executable='robot_state_publisher',
|
||||
name='robot_state_publisher',
|
||||
output='screen',
|
||||
arguments=[urdf])
|
||||
|
||||
# start the visualization
|
||||
rviz_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'rviz_launch.py')),
|
||||
condition=IfCondition(use_rviz),
|
||||
launch_arguments={'namespace': '',
|
||||
'use_namespace': 'False'}.items())
|
||||
|
||||
# start navigation
|
||||
bringup_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'bringup_launch.py')),
|
||||
launch_arguments={'map': map_yaml_file}.items())
|
||||
|
||||
# start the demo autonomy task
|
||||
demo_cmd = Node(
|
||||
package='nav2_simple_commander',
|
||||
executable='example_follow_path',
|
||||
emulate_tty=True,
|
||||
output='screen')
|
||||
|
||||
ld = LaunchDescription()
|
||||
ld.add_action(declare_use_rviz_cmd)
|
||||
ld.add_action(declare_simulator_cmd)
|
||||
ld.add_action(start_gazebo_server_cmd)
|
||||
ld.add_action(start_gazebo_client_cmd)
|
||||
ld.add_action(start_robot_state_publisher_cmd)
|
||||
ld.add_action(rviz_cmd)
|
||||
ld.add_action(bringup_cmd)
|
||||
ld.add_action(demo_cmd)
|
||||
return ld
|
||||
@@ -0,0 +1,98 @@
|
||||
# Copyright (c) 2021 Samsung Research America
|
||||
#
|
||||
# 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 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
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
warehouse_dir = get_package_share_directory('aws_robomaker_small_warehouse_world')
|
||||
nav2_bringup_dir = get_package_share_directory('nav2_bringup')
|
||||
python_commander_dir = get_package_share_directory('nav2_simple_commander')
|
||||
|
||||
map_yaml_file = os.path.join(warehouse_dir, 'maps', '005', 'map.yaml')
|
||||
world = os.path.join(python_commander_dir, 'warehouse.world')
|
||||
|
||||
# Launch configuration variables
|
||||
use_rviz = LaunchConfiguration('use_rviz')
|
||||
headless = LaunchConfiguration('headless')
|
||||
|
||||
# Declare the launch arguments
|
||||
declare_use_rviz_cmd = DeclareLaunchArgument(
|
||||
'use_rviz',
|
||||
default_value='True',
|
||||
description='Whether to start RVIZ')
|
||||
|
||||
declare_simulator_cmd = DeclareLaunchArgument(
|
||||
'headless',
|
||||
default_value='False',
|
||||
description='Whether to execute gzclient)')
|
||||
|
||||
# start the simulation
|
||||
start_gazebo_server_cmd = ExecuteProcess(
|
||||
cmd=['gzserver', '-s', 'libgazebo_ros_factory.so', world],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
start_gazebo_client_cmd = ExecuteProcess(
|
||||
condition=IfCondition(PythonExpression(['not ', headless])),
|
||||
cmd=['gzclient'],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
urdf = os.path.join(nav2_bringup_dir, 'urdf', 'turtlebot3_waffle.urdf')
|
||||
start_robot_state_publisher_cmd = Node(
|
||||
package='robot_state_publisher',
|
||||
executable='robot_state_publisher',
|
||||
name='robot_state_publisher',
|
||||
output='screen',
|
||||
arguments=[urdf])
|
||||
|
||||
# start the visualization
|
||||
rviz_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'rviz_launch.py')),
|
||||
condition=IfCondition(use_rviz),
|
||||
launch_arguments={'namespace': '',
|
||||
'use_namespace': 'False'}.items())
|
||||
|
||||
# start navigation
|
||||
bringup_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'bringup_launch.py')),
|
||||
launch_arguments={'map': map_yaml_file}.items())
|
||||
|
||||
# start the demo autonomy task
|
||||
demo_cmd = Node(
|
||||
package='nav2_simple_commander',
|
||||
executable='demo_inspection',
|
||||
emulate_tty=True,
|
||||
output='screen')
|
||||
|
||||
ld = LaunchDescription()
|
||||
ld.add_action(declare_use_rviz_cmd)
|
||||
ld.add_action(declare_simulator_cmd)
|
||||
ld.add_action(start_gazebo_server_cmd)
|
||||
ld.add_action(start_gazebo_client_cmd)
|
||||
ld.add_action(start_robot_state_publisher_cmd)
|
||||
ld.add_action(rviz_cmd)
|
||||
ld.add_action(bringup_cmd)
|
||||
ld.add_action(demo_cmd)
|
||||
return ld
|
||||
@@ -0,0 +1,98 @@
|
||||
# Copyright (c) 2021 Samsung Research America
|
||||
#
|
||||
# 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 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
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
warehouse_dir = get_package_share_directory('aws_robomaker_small_warehouse_world')
|
||||
nav2_bringup_dir = get_package_share_directory('nav2_bringup')
|
||||
python_commander_dir = get_package_share_directory('nav2_simple_commander')
|
||||
|
||||
map_yaml_file = os.path.join(warehouse_dir, 'maps', '005', 'map.yaml')
|
||||
world = os.path.join(python_commander_dir, 'warehouse.world')
|
||||
|
||||
# Launch configuration variables
|
||||
use_rviz = LaunchConfiguration('use_rviz')
|
||||
headless = LaunchConfiguration('headless')
|
||||
|
||||
# Declare the launch arguments
|
||||
declare_use_rviz_cmd = DeclareLaunchArgument(
|
||||
'use_rviz',
|
||||
default_value='True',
|
||||
description='Whether to start RVIZ')
|
||||
|
||||
declare_simulator_cmd = DeclareLaunchArgument(
|
||||
'headless',
|
||||
default_value='False',
|
||||
description='Whether to execute gzclient)')
|
||||
|
||||
# start the simulation
|
||||
start_gazebo_server_cmd = ExecuteProcess(
|
||||
cmd=['gzserver', '-s', 'libgazebo_ros_factory.so', world],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
start_gazebo_client_cmd = ExecuteProcess(
|
||||
condition=IfCondition(PythonExpression(['not ', headless])),
|
||||
cmd=['gzclient'],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
urdf = os.path.join(nav2_bringup_dir, 'urdf', 'turtlebot3_waffle.urdf')
|
||||
start_robot_state_publisher_cmd = Node(
|
||||
package='robot_state_publisher',
|
||||
executable='robot_state_publisher',
|
||||
name='robot_state_publisher',
|
||||
output='screen',
|
||||
arguments=[urdf])
|
||||
|
||||
# start the visualization
|
||||
rviz_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'rviz_launch.py')),
|
||||
condition=IfCondition(use_rviz),
|
||||
launch_arguments={'namespace': '',
|
||||
'use_namespace': 'False'}.items())
|
||||
|
||||
# start navigation
|
||||
bringup_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'bringup_launch.py')),
|
||||
launch_arguments={'map': map_yaml_file}.items())
|
||||
|
||||
# start the demo autonomy task
|
||||
demo_cmd = Node(
|
||||
package='nav2_simple_commander',
|
||||
executable='example_nav_through_poses',
|
||||
emulate_tty=True,
|
||||
output='screen')
|
||||
|
||||
ld = LaunchDescription()
|
||||
ld.add_action(declare_use_rviz_cmd)
|
||||
ld.add_action(declare_simulator_cmd)
|
||||
ld.add_action(start_gazebo_server_cmd)
|
||||
ld.add_action(start_gazebo_client_cmd)
|
||||
ld.add_action(start_robot_state_publisher_cmd)
|
||||
ld.add_action(rviz_cmd)
|
||||
ld.add_action(bringup_cmd)
|
||||
ld.add_action(demo_cmd)
|
||||
return ld
|
||||
@@ -0,0 +1,98 @@
|
||||
# Copyright (c) 2021 Samsung Research America
|
||||
#
|
||||
# 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 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
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
warehouse_dir = get_package_share_directory('aws_robomaker_small_warehouse_world')
|
||||
nav2_bringup_dir = get_package_share_directory('nav2_bringup')
|
||||
python_commander_dir = get_package_share_directory('nav2_simple_commander')
|
||||
|
||||
map_yaml_file = os.path.join(warehouse_dir, 'maps', '005', 'map.yaml')
|
||||
world = os.path.join(python_commander_dir, 'warehouse.world')
|
||||
|
||||
# Launch configuration variables
|
||||
use_rviz = LaunchConfiguration('use_rviz')
|
||||
headless = LaunchConfiguration('headless')
|
||||
|
||||
# Declare the launch arguments
|
||||
declare_use_rviz_cmd = DeclareLaunchArgument(
|
||||
'use_rviz',
|
||||
default_value='True',
|
||||
description='Whether to start RVIZ')
|
||||
|
||||
declare_simulator_cmd = DeclareLaunchArgument(
|
||||
'headless',
|
||||
default_value='False',
|
||||
description='Whether to execute gzclient)')
|
||||
|
||||
# start the simulation
|
||||
start_gazebo_server_cmd = ExecuteProcess(
|
||||
cmd=['gzserver', '-s', 'libgazebo_ros_factory.so', world],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
start_gazebo_client_cmd = ExecuteProcess(
|
||||
condition=IfCondition(PythonExpression(['not ', headless])),
|
||||
cmd=['gzclient'],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
urdf = os.path.join(nav2_bringup_dir, 'urdf', 'turtlebot3_waffle.urdf')
|
||||
start_robot_state_publisher_cmd = Node(
|
||||
package='robot_state_publisher',
|
||||
executable='robot_state_publisher',
|
||||
name='robot_state_publisher',
|
||||
output='screen',
|
||||
arguments=[urdf])
|
||||
|
||||
# start the visualization
|
||||
rviz_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'rviz_launch.py')),
|
||||
condition=IfCondition(use_rviz),
|
||||
launch_arguments={'namespace': '',
|
||||
'use_namespace': 'False'}.items())
|
||||
|
||||
# start navigation
|
||||
bringup_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'bringup_launch.py')),
|
||||
launch_arguments={'map': map_yaml_file}.items())
|
||||
|
||||
# start the demo autonomy task
|
||||
demo_cmd = Node(
|
||||
package='nav2_simple_commander',
|
||||
executable='example_nav_to_pose',
|
||||
emulate_tty=True,
|
||||
output='screen')
|
||||
|
||||
ld = LaunchDescription()
|
||||
ld.add_action(declare_use_rviz_cmd)
|
||||
ld.add_action(declare_simulator_cmd)
|
||||
ld.add_action(start_gazebo_server_cmd)
|
||||
ld.add_action(start_gazebo_client_cmd)
|
||||
ld.add_action(start_robot_state_publisher_cmd)
|
||||
ld.add_action(rviz_cmd)
|
||||
ld.add_action(bringup_cmd)
|
||||
ld.add_action(demo_cmd)
|
||||
return ld
|
||||
@@ -0,0 +1,98 @@
|
||||
# Copyright (c) 2021 Samsung Research America
|
||||
#
|
||||
# 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 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
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
warehouse_dir = get_package_share_directory('aws_robomaker_small_warehouse_world')
|
||||
nav2_bringup_dir = get_package_share_directory('nav2_bringup')
|
||||
python_commander_dir = get_package_share_directory('nav2_simple_commander')
|
||||
|
||||
map_yaml_file = os.path.join(warehouse_dir, 'maps', '005', 'map.yaml')
|
||||
world = os.path.join(python_commander_dir, 'warehouse.world')
|
||||
|
||||
# Launch configuration variables
|
||||
use_rviz = LaunchConfiguration('use_rviz')
|
||||
headless = LaunchConfiguration('headless')
|
||||
|
||||
# Declare the launch arguments
|
||||
declare_use_rviz_cmd = DeclareLaunchArgument(
|
||||
'use_rviz',
|
||||
default_value='True',
|
||||
description='Whether to start RVIZ')
|
||||
|
||||
declare_simulator_cmd = DeclareLaunchArgument(
|
||||
'headless',
|
||||
default_value='False',
|
||||
description='Whether to execute gzclient)')
|
||||
|
||||
# start the simulation
|
||||
start_gazebo_server_cmd = ExecuteProcess(
|
||||
cmd=['gzserver', '-s', 'libgazebo_ros_factory.so', world],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
start_gazebo_client_cmd = ExecuteProcess(
|
||||
condition=IfCondition(PythonExpression(['not ', headless])),
|
||||
cmd=['gzclient'],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
urdf = os.path.join(nav2_bringup_dir, 'urdf', 'turtlebot3_waffle.urdf')
|
||||
start_robot_state_publisher_cmd = Node(
|
||||
package='robot_state_publisher',
|
||||
executable='robot_state_publisher',
|
||||
name='robot_state_publisher',
|
||||
output='screen',
|
||||
arguments=[urdf])
|
||||
|
||||
# start the visualization
|
||||
rviz_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'rviz_launch.py')),
|
||||
condition=IfCondition(use_rviz),
|
||||
launch_arguments={'namespace': '',
|
||||
'use_namespace': 'False'}.items())
|
||||
|
||||
# start navigation
|
||||
bringup_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'bringup_launch.py')),
|
||||
launch_arguments={'map': map_yaml_file}.items())
|
||||
|
||||
# start the demo autonomy task
|
||||
demo_cmd = Node(
|
||||
package='nav2_simple_commander',
|
||||
executable='demo_picking',
|
||||
emulate_tty=True,
|
||||
output='screen')
|
||||
|
||||
ld = LaunchDescription()
|
||||
ld.add_action(declare_use_rviz_cmd)
|
||||
ld.add_action(declare_simulator_cmd)
|
||||
ld.add_action(start_gazebo_server_cmd)
|
||||
ld.add_action(start_gazebo_client_cmd)
|
||||
ld.add_action(start_robot_state_publisher_cmd)
|
||||
ld.add_action(rviz_cmd)
|
||||
ld.add_action(bringup_cmd)
|
||||
ld.add_action(demo_cmd)
|
||||
return ld
|
||||
@@ -0,0 +1,98 @@
|
||||
# Copyright (c) 2021 Samsung Research America
|
||||
#
|
||||
# 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 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
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
warehouse_dir = get_package_share_directory('aws_robomaker_small_warehouse_world')
|
||||
nav2_bringup_dir = get_package_share_directory('nav2_bringup')
|
||||
python_commander_dir = get_package_share_directory('nav2_simple_commander')
|
||||
|
||||
map_yaml_file = os.path.join(warehouse_dir, 'maps', '005', 'map.yaml')
|
||||
world = os.path.join(python_commander_dir, 'warehouse.world')
|
||||
|
||||
# Launch configuration variables
|
||||
use_rviz = LaunchConfiguration('use_rviz')
|
||||
headless = LaunchConfiguration('headless')
|
||||
|
||||
# Declare the launch arguments
|
||||
declare_use_rviz_cmd = DeclareLaunchArgument(
|
||||
'use_rviz',
|
||||
default_value='True',
|
||||
description='Whether to start RVIZ')
|
||||
|
||||
declare_simulator_cmd = DeclareLaunchArgument(
|
||||
'headless',
|
||||
default_value='False',
|
||||
description='Whether to execute gzclient)')
|
||||
|
||||
# start the simulation
|
||||
start_gazebo_server_cmd = ExecuteProcess(
|
||||
cmd=['gzserver', '-s', 'libgazebo_ros_factory.so', world],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
start_gazebo_client_cmd = ExecuteProcess(
|
||||
condition=IfCondition(PythonExpression(['not ', headless])),
|
||||
cmd=['gzclient'],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
urdf = os.path.join(nav2_bringup_dir, 'urdf', 'turtlebot3_waffle.urdf')
|
||||
start_robot_state_publisher_cmd = Node(
|
||||
package='robot_state_publisher',
|
||||
executable='robot_state_publisher',
|
||||
name='robot_state_publisher',
|
||||
output='screen',
|
||||
arguments=[urdf])
|
||||
|
||||
# start the visualization
|
||||
rviz_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'rviz_launch.py')),
|
||||
condition=IfCondition(use_rviz),
|
||||
launch_arguments={'namespace': '',
|
||||
'use_namespace': 'False'}.items())
|
||||
|
||||
# start navigation
|
||||
bringup_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'bringup_launch.py')),
|
||||
launch_arguments={'map': map_yaml_file}.items())
|
||||
|
||||
# start the demo autonomy task
|
||||
demo_cmd = Node(
|
||||
package='nav2_simple_commander',
|
||||
executable='demo_recoveries',
|
||||
emulate_tty=True,
|
||||
output='screen')
|
||||
|
||||
ld = LaunchDescription()
|
||||
ld.add_action(declare_use_rviz_cmd)
|
||||
ld.add_action(declare_simulator_cmd)
|
||||
ld.add_action(start_gazebo_server_cmd)
|
||||
ld.add_action(start_gazebo_client_cmd)
|
||||
ld.add_action(start_robot_state_publisher_cmd)
|
||||
ld.add_action(rviz_cmd)
|
||||
ld.add_action(bringup_cmd)
|
||||
ld.add_action(demo_cmd)
|
||||
return ld
|
||||
@@ -0,0 +1,98 @@
|
||||
# Copyright (c) 2021 Samsung Research America
|
||||
#
|
||||
# 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 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
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
warehouse_dir = get_package_share_directory('aws_robomaker_small_warehouse_world')
|
||||
nav2_bringup_dir = get_package_share_directory('nav2_bringup')
|
||||
python_commander_dir = get_package_share_directory('nav2_simple_commander')
|
||||
|
||||
map_yaml_file = os.path.join(warehouse_dir, 'maps', '005', 'map.yaml')
|
||||
world = os.path.join(python_commander_dir, 'warehouse.world')
|
||||
|
||||
# Launch configuration variables
|
||||
use_rviz = LaunchConfiguration('use_rviz')
|
||||
headless = LaunchConfiguration('headless')
|
||||
|
||||
# Declare the launch arguments
|
||||
declare_use_rviz_cmd = DeclareLaunchArgument(
|
||||
'use_rviz',
|
||||
default_value='True',
|
||||
description='Whether to start RVIZ')
|
||||
|
||||
declare_simulator_cmd = DeclareLaunchArgument(
|
||||
'headless',
|
||||
default_value='False',
|
||||
description='Whether to execute gzclient)')
|
||||
|
||||
# start the simulation
|
||||
start_gazebo_server_cmd = ExecuteProcess(
|
||||
cmd=['gzserver', '-s', 'libgazebo_ros_factory.so', world],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
start_gazebo_client_cmd = ExecuteProcess(
|
||||
condition=IfCondition(PythonExpression(['not ', headless])),
|
||||
cmd=['gzclient'],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
urdf = os.path.join(nav2_bringup_dir, 'urdf', 'turtlebot3_waffle.urdf')
|
||||
start_robot_state_publisher_cmd = Node(
|
||||
package='robot_state_publisher',
|
||||
executable='robot_state_publisher',
|
||||
name='robot_state_publisher',
|
||||
output='screen',
|
||||
arguments=[urdf])
|
||||
|
||||
# start the visualization
|
||||
rviz_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'rviz_launch.py')),
|
||||
condition=IfCondition(use_rviz),
|
||||
launch_arguments={'namespace': '',
|
||||
'use_namespace': 'False'}.items())
|
||||
|
||||
# start navigation
|
||||
bringup_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'bringup_launch.py')),
|
||||
launch_arguments={'map': map_yaml_file}.items())
|
||||
|
||||
# start the demo autonomy task
|
||||
demo_cmd = Node(
|
||||
package='nav2_simple_commander',
|
||||
executable='demo_security',
|
||||
emulate_tty=True,
|
||||
output='screen')
|
||||
|
||||
ld = LaunchDescription()
|
||||
ld.add_action(declare_use_rviz_cmd)
|
||||
ld.add_action(declare_simulator_cmd)
|
||||
ld.add_action(start_gazebo_server_cmd)
|
||||
ld.add_action(start_gazebo_client_cmd)
|
||||
ld.add_action(start_robot_state_publisher_cmd)
|
||||
ld.add_action(rviz_cmd)
|
||||
ld.add_action(bringup_cmd)
|
||||
ld.add_action(demo_cmd)
|
||||
return ld
|
||||
@@ -0,0 +1,683 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<sdf version="1.6">
|
||||
<world name="default">
|
||||
|
||||
<gravity>0 0 -9.8</gravity>
|
||||
<physics default="0" name="default_physics" type="ode">
|
||||
<max_step_size>0.001</max_step_size>
|
||||
<real_time_factor>1</real_time_factor>
|
||||
<real_time_update_rate>1000</real_time_update_rate>
|
||||
</physics>
|
||||
|
||||
|
||||
<!--model name="aws_robomaker_warehouse_RoofB_01_001">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_RoofB_01</uri>
|
||||
</include>
|
||||
<pose frame="">0.0 0.0 0 0 0 0</pose>
|
||||
</model-->
|
||||
|
||||
<model name="aws_robomaker_warehouse_ShelfF_01_001">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ShelfF_01</uri>
|
||||
</include>
|
||||
<pose frame="">-5.795143 -0.956635 0 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_WallB_01_001">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_WallB_01</uri>
|
||||
</include>
|
||||
<pose frame="">0.0 0.0 0 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_ShelfE_01_001">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ShelfE_01</uri>
|
||||
</include>
|
||||
<pose frame="">4.73156 0.57943 0 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_ShelfE_01_002">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ShelfE_01</uri>
|
||||
</include>
|
||||
<pose frame="">4.73156 -4.827049 0 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_ShelfE_01_003">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ShelfE_01</uri>
|
||||
</include>
|
||||
<pose frame="">4.73156 -8.6651 0 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_ShelfD_01_001">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ShelfD_01</uri>
|
||||
</include>
|
||||
<pose frame="">4.73156 -1.242668 0 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_ShelfD_01_002">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ShelfD_01</uri>
|
||||
</include>
|
||||
<pose frame="">4.73156 -3.038551 0 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_ShelfD_01_003">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ShelfD_01</uri>
|
||||
</include>
|
||||
<pose frame="">4.73156 -6.750542 0 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
<!--model name="aws_robomaker_warehouse_DeskC_01_001">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_DeskC_01</uri>
|
||||
</include>
|
||||
<pose frame="">-0.061684 6.135864 0 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_DeskC_01_002">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_DeskC_01</uri>
|
||||
</include>
|
||||
<pose frame="">-0.061684 3.039 0 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_DeskC_01_003">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_DeskC_01</uri>
|
||||
</include>
|
||||
<pose frame="">-0.061684 -6.6493 0 0 0 0</pose>
|
||||
</model-->
|
||||
|
||||
<model name="aws_robomaker_warehouse_GroundB_01_001">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_GroundB_01</uri>
|
||||
</include>
|
||||
<pose frame="">0.0 0.0 -0.090092 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_Lamp_01_005">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_Lamp_01</uri>
|
||||
</include>
|
||||
<pose frame="">0 0 -4 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
|
||||
|
||||
<model name="aws_robomaker_warehouse_Bucket_01_020">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_Bucket_01</uri>
|
||||
</include>
|
||||
<pose frame="">0.433449 9.631706 0 0 0 -1.563161</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_Bucket_01_021">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_Bucket_01</uri>
|
||||
</include>
|
||||
<pose frame="">-1.8321 -6.3752 0 0 0 -1.563161</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_Bucket_01_022">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_Bucket_01</uri>
|
||||
</include>
|
||||
<pose frame="">0.433449 8.59 0 0 0 -1.563161</pose>
|
||||
</model>
|
||||
|
||||
<model name='aws_robomaker_warehouse_ClutteringA_01_016'>
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ClutteringA_01</uri>
|
||||
</include>
|
||||
<pose frame=''>5.708138 8.616844 -0.017477 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
<model name='aws_robomaker_warehouse_ClutteringA_01_017'>
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ClutteringA_01</uri>
|
||||
</include>
|
||||
<pose frame=''>3.408638 8.616844 -0.017477 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
<model name='aws_robomaker_warehouse_ClutteringA_01_018'>
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ClutteringA_01</uri>
|
||||
</include>
|
||||
<pose frame=''>-1.491287 5.222435 -0.017477 0 0 -1.583185</pose>
|
||||
</model>
|
||||
|
||||
|
||||
<model name="aws_robomaker_warehouse_ClutteringC_01_027">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ClutteringC_01</uri>
|
||||
</include>
|
||||
<pose frame="">3.324959 3.822449 -0.012064 0 0 1.563871</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_ClutteringC_01_028">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ClutteringC_01</uri>
|
||||
</include>
|
||||
<pose frame="">5.54171 3.816475 -0.015663 0 0 -1.583191</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_ClutteringC_01_029">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ClutteringC_01</uri>
|
||||
</include>
|
||||
<pose frame="">5.384239 6.137154 0 0 0 3.150000</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_ClutteringC_01_030">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ClutteringC_01</uri>
|
||||
</include>
|
||||
<pose frame="">3.236 6.137154 0 0 0 3.150000</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_ClutteringC_01_031">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ClutteringC_01</uri>
|
||||
</include>
|
||||
<pose frame="">-1.573677 2.301994 -0.015663 0 0 -3.133191</pose>
|
||||
</model>
|
||||
|
||||
<model name="aws_robomaker_warehouse_ClutteringC_01_032">
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ClutteringC_01</uri>
|
||||
</include>
|
||||
<pose frame="">-1.2196 9.407 -0.015663 0 0 1.563871</pose>
|
||||
</model>
|
||||
|
||||
<model name='aws_robomaker_warehouse_ClutteringD_01_005'>
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_ClutteringD_01</uri>
|
||||
</include>
|
||||
<pose frame=''>-1.634682 -7.811813 -0.319559 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
<model name='aws_robomaker_warehouse_TrashCanC_01_002'>
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_TrashCanC_01</uri>
|
||||
</include>
|
||||
<pose frame=''>-1.592441 7.715420 0 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
|
||||
<model name='aws_robomaker_warehouse_PalletJackB_01_001'>
|
||||
<include>
|
||||
<uri>model://aws_robomaker_warehouse_PalletJackB_01</uri>
|
||||
</include>
|
||||
<pose frame=''>-0.276098 -9.481944 0.023266 0 0 0</pose>
|
||||
</model>
|
||||
|
||||
|
||||
<light name="Warehouse_CeilingLight_003" type="point">
|
||||
<pose frame="">0 0 9 0 0 0</pose>
|
||||
<diffuse>0.5 0.5 0.5 1</diffuse>
|
||||
<specular>0.2 0.2 0.2 1</specular>
|
||||
<attenuation>
|
||||
<range>80</range>
|
||||
<constant>0.3</constant>
|
||||
<linear>0.01</linear>
|
||||
<quadratic>0.001</quadratic>
|
||||
</attenuation>
|
||||
<cast_shadows>1</cast_shadows>
|
||||
<direction>0.1 0.1 -1</direction>
|
||||
</light>
|
||||
|
||||
<gui fullscreen='0'>
|
||||
<camera name='user_camera'>
|
||||
<pose frame=''>-4.70385 10.895 16.2659 -0 0.921795 -1.12701</pose>
|
||||
<view_controller>orbit</view_controller>
|
||||
<projection_type>perspective</projection_type>
|
||||
</camera>
|
||||
</gui>
|
||||
|
||||
<model name="turtlebot3_waffle">
|
||||
<pose>3.45 2.15 0.01 0.0 0.0 3.14</pose>
|
||||
|
||||
<link name="base_footprint"/>
|
||||
|
||||
<link name="base_link">
|
||||
|
||||
<inertial>
|
||||
<pose>-0.064 0 0.048 0 0 0</pose>
|
||||
<inertia>
|
||||
<ixx>0.001</ixx>
|
||||
<ixy>0.000</ixy>
|
||||
<ixz>0.000</ixz>
|
||||
<iyy>0.001</iyy>
|
||||
<iyz>0.000</iyz>
|
||||
<izz>0.001</izz>
|
||||
</inertia>
|
||||
<mass>1.0</mass>
|
||||
</inertial>
|
||||
|
||||
<collision name="base_collision">
|
||||
<pose>-0.064 0 0.048 0 0 0</pose>
|
||||
<geometry>
|
||||
<box>
|
||||
<size>0.265 0.265 0.089</size>
|
||||
</box>
|
||||
</geometry>
|
||||
</collision>
|
||||
|
||||
<visual name="base_visual">
|
||||
<pose>-0.064 0 0 0 0 0</pose>
|
||||
<geometry>
|
||||
<mesh>
|
||||
<uri>model://turtlebot3_common/meshes/waffle_base.dae</uri>
|
||||
<scale>0.001 0.001 0.001</scale>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</visual>
|
||||
</link>
|
||||
|
||||
<link name="imu_link">
|
||||
<sensor name="tb3_imu" type="imu">
|
||||
<always_on>true</always_on>
|
||||
<update_rate>200</update_rate>
|
||||
<imu>
|
||||
<angular_velocity>
|
||||
<x>
|
||||
<noise type="gaussian">
|
||||
<mean>0.0</mean>
|
||||
<stddev>2e-4</stddev>
|
||||
</noise>
|
||||
</x>
|
||||
<y>
|
||||
<noise type="gaussian">
|
||||
<mean>0.0</mean>
|
||||
<stddev>2e-4</stddev>
|
||||
</noise>
|
||||
</y>
|
||||
<z>
|
||||
<noise type="gaussian">
|
||||
<mean>0.0</mean>
|
||||
<stddev>2e-4</stddev>
|
||||
</noise>
|
||||
</z>
|
||||
</angular_velocity>
|
||||
<linear_acceleration>
|
||||
<x>
|
||||
<noise type="gaussian">
|
||||
<mean>0.0</mean>
|
||||
<stddev>1.7e-2</stddev>
|
||||
</noise>
|
||||
</x>
|
||||
<y>
|
||||
<noise type="gaussian">
|
||||
<mean>0.0</mean>
|
||||
<stddev>1.7e-2</stddev>
|
||||
</noise>
|
||||
</y>
|
||||
<z>
|
||||
<noise type="gaussian">
|
||||
<mean>0.0</mean>
|
||||
<stddev>1.7e-2</stddev>
|
||||
</noise>
|
||||
</z>
|
||||
</linear_acceleration>
|
||||
</imu>
|
||||
<plugin name="turtlebot3_imu" filename="libgazebo_ros_imu_sensor.so">
|
||||
<initial_orientation_as_reference>false</initial_orientation_as_reference>
|
||||
<ros>
|
||||
<!-- <namespace>/tb3</namespace> -->
|
||||
<remapping>~/out:=imu</remapping>
|
||||
</ros>
|
||||
</plugin>
|
||||
</sensor>
|
||||
</link>
|
||||
|
||||
<link name="base_scan">
|
||||
<inertial>
|
||||
<pose>-0.052 0 0.111 0 0 0</pose>
|
||||
<inertia>
|
||||
<ixx>0.001</ixx>
|
||||
<ixy>0.000</ixy>
|
||||
<ixz>0.000</ixz>
|
||||
<iyy>0.001</iyy>
|
||||
<iyz>0.000</iyz>
|
||||
<izz>0.001</izz>
|
||||
</inertia>
|
||||
<mass>0.125</mass>
|
||||
</inertial>
|
||||
|
||||
<collision name="lidar_sensor_collision">
|
||||
<pose>-0.052 0 0.111 0 0 0</pose>
|
||||
<geometry>
|
||||
<cylinder>
|
||||
<radius>0.0508</radius>
|
||||
<length>0.055</length>
|
||||
</cylinder>
|
||||
</geometry>
|
||||
</collision>
|
||||
|
||||
<visual name="lidar_sensor_visual">
|
||||
<pose>-0.064 0 0.121 0 0 0</pose>
|
||||
<geometry>
|
||||
<mesh>
|
||||
<uri>model://turtlebot3_common/meshes/lds.dae</uri>
|
||||
<scale>0.001 0.001 0.001</scale>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</visual>
|
||||
|
||||
<sensor name="hls_lfcd_lds" type="ray">
|
||||
<always_on>true</always_on>
|
||||
<visualize>true</visualize>
|
||||
<pose>-0.064 0 0.121 0 0 0</pose>
|
||||
<update_rate>5</update_rate>
|
||||
<ray>
|
||||
<scan>
|
||||
<horizontal>
|
||||
<samples>360</samples>
|
||||
<resolution>1.000000</resolution>
|
||||
<min_angle>0.000000</min_angle>
|
||||
<max_angle>6.280000</max_angle>
|
||||
</horizontal>
|
||||
</scan>
|
||||
<range>
|
||||
<min>0.120000</min>
|
||||
<max>3.5</max>
|
||||
<resolution>0.015000</resolution>
|
||||
</range>
|
||||
<noise>
|
||||
<type>gaussian</type>
|
||||
<mean>0.0</mean>
|
||||
<stddev>0.01</stddev>
|
||||
</noise>
|
||||
</ray>
|
||||
<plugin name="turtlebot3_laserscan" filename="libgazebo_ros_ray_sensor.so">
|
||||
<ros>
|
||||
<!-- <namespace>/tb3</namespace> -->
|
||||
<remapping>~/out:=scan</remapping>
|
||||
</ros>
|
||||
<output_type>sensor_msgs/LaserScan</output_type>
|
||||
<frame_name>base_scan</frame_name>
|
||||
</plugin>
|
||||
</sensor>
|
||||
</link>
|
||||
|
||||
<link name="wheel_left_link">
|
||||
|
||||
<inertial>
|
||||
<pose>0.0 0.144 0.023 -1.57 0 0</pose>
|
||||
<inertia>
|
||||
<ixx>0.001</ixx>
|
||||
<ixy>0.000</ixy>
|
||||
<ixz>0.000</ixz>
|
||||
<iyy>0.001</iyy>
|
||||
<iyz>0.000</iyz>
|
||||
<izz>0.001</izz>
|
||||
</inertia>
|
||||
<mass>0.1</mass>
|
||||
</inertial>
|
||||
|
||||
<collision name="wheel_left_collision">
|
||||
<pose>0.0 0.144 0.023 -1.57 0 0</pose>
|
||||
<geometry>
|
||||
<cylinder>
|
||||
<radius>0.033</radius>
|
||||
<length>0.018</length>
|
||||
</cylinder>
|
||||
</geometry>
|
||||
<surface>
|
||||
<!-- This friction pamareter don't contain reliable data!! -->
|
||||
<friction>
|
||||
<ode>
|
||||
<mu>100000.0</mu>
|
||||
<mu2>100000.0</mu2>
|
||||
<fdir1>0 0 0</fdir1>
|
||||
<slip1>0.0</slip1>
|
||||
<slip2>0.0</slip2>
|
||||
</ode>
|
||||
</friction>
|
||||
<contact>
|
||||
<ode>
|
||||
<soft_cfm>0</soft_cfm>
|
||||
<soft_erp>0.2</soft_erp>
|
||||
<kp>1e+5</kp>
|
||||
<kd>1</kd>
|
||||
<max_vel>0.01</max_vel>
|
||||
<min_depth>0.001</min_depth>
|
||||
</ode>
|
||||
</contact>
|
||||
</surface>
|
||||
</collision>
|
||||
|
||||
<visual name="wheel_left_visual">
|
||||
<pose>0.0 0.144 0.023 0 0 0</pose>
|
||||
<geometry>
|
||||
<mesh>
|
||||
<uri>model://turtlebot3_common/meshes/tire.dae</uri>
|
||||
<scale>0.001 0.001 0.001</scale>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</visual>
|
||||
</link>
|
||||
|
||||
<link name="wheel_right_link">
|
||||
|
||||
<inertial>
|
||||
<pose>0.0 -0.144 0.023 -1.57 0 0</pose>
|
||||
<inertia>
|
||||
<ixx>0.001</ixx>
|
||||
<ixy>0.000</ixy>
|
||||
<ixz>0.000</ixz>
|
||||
<iyy>0.001</iyy>
|
||||
<iyz>0.000</iyz>
|
||||
<izz>0.001</izz>
|
||||
</inertia>
|
||||
<mass>0.1</mass>
|
||||
</inertial>
|
||||
|
||||
<collision name="wheel_right_collision">
|
||||
<pose>0.0 -0.144 0.023 -1.57 0 0</pose>
|
||||
<geometry>
|
||||
<cylinder>
|
||||
<radius>0.033</radius>
|
||||
<length>0.018</length>
|
||||
</cylinder>
|
||||
</geometry>
|
||||
<surface>
|
||||
<!-- This friction pamareter don't contain reliable data!! -->
|
||||
<friction>
|
||||
<ode>
|
||||
<mu>100000.0</mu>
|
||||
<mu2>100000.0</mu2>
|
||||
<fdir1>0 0 0</fdir1>
|
||||
<slip1>0.0</slip1>
|
||||
<slip2>0.0</slip2>
|
||||
</ode>
|
||||
</friction>
|
||||
<contact>
|
||||
<ode>
|
||||
<soft_cfm>0</soft_cfm>
|
||||
<soft_erp>0.2</soft_erp>
|
||||
<kp>1e+5</kp>
|
||||
<kd>1</kd>
|
||||
<max_vel>0.01</max_vel>
|
||||
<min_depth>0.001</min_depth>
|
||||
</ode>
|
||||
</contact>
|
||||
</surface>
|
||||
</collision>
|
||||
|
||||
<visual name="wheel_right_visual">
|
||||
<pose>0.0 -0.144 0.023 0 0 0</pose>
|
||||
<geometry>
|
||||
<mesh>
|
||||
<uri>model://turtlebot3_common/meshes/tire.dae</uri>
|
||||
<scale>0.001 0.001 0.001</scale>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</visual>
|
||||
</link>
|
||||
|
||||
<link name='caster_back_right_link'>
|
||||
<pose>-0.177 -0.064 -0.004 0 0 0</pose>
|
||||
<inertial>
|
||||
<mass>0.001</mass>
|
||||
<inertia>
|
||||
<ixx>0.00001</ixx>
|
||||
<ixy>0.000</ixy>
|
||||
<ixz>0.000</ixz>
|
||||
<iyy>0.00001</iyy>
|
||||
<iyz>0.000</iyz>
|
||||
<izz>0.00001</izz>
|
||||
</inertia>
|
||||
</inertial>
|
||||
<collision name='collision'>
|
||||
<geometry>
|
||||
<sphere>
|
||||
<radius>0.005000</radius>
|
||||
</sphere>
|
||||
</geometry>
|
||||
<surface>
|
||||
<contact>
|
||||
<ode>
|
||||
<soft_cfm>0</soft_cfm>
|
||||
<soft_erp>0.2</soft_erp>
|
||||
<kp>1e+5</kp>
|
||||
<kd>1</kd>
|
||||
<max_vel>0.01</max_vel>
|
||||
<min_depth>0.001</min_depth>
|
||||
</ode>
|
||||
</contact>
|
||||
</surface>
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<link name='caster_back_left_link'>
|
||||
<pose>-0.177 0.064 -0.004 0 0 0</pose>
|
||||
<inertial>
|
||||
<mass>0.001</mass>
|
||||
<inertia>
|
||||
<ixx>0.00001</ixx>
|
||||
<ixy>0.000</ixy>
|
||||
<ixz>0.000</ixz>
|
||||
<iyy>0.00001</iyy>
|
||||
<iyz>0.000</iyz>
|
||||
<izz>0.00001</izz>
|
||||
</inertia>
|
||||
</inertial>
|
||||
<collision name='collision'>
|
||||
<geometry>
|
||||
<sphere>
|
||||
<radius>0.005000</radius>
|
||||
</sphere>
|
||||
</geometry>
|
||||
<surface>
|
||||
<contact>
|
||||
<ode>
|
||||
<soft_cfm>0</soft_cfm>
|
||||
<soft_erp>0.2</soft_erp>
|
||||
<kp>1e+5</kp>
|
||||
<kd>1</kd>
|
||||
<max_vel>0.01</max_vel>
|
||||
<min_depth>0.001</min_depth>
|
||||
</ode>
|
||||
</contact>
|
||||
</surface>
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<joint name="base_joint" type="fixed">
|
||||
<parent>base_footprint</parent>
|
||||
<child>base_link</child>
|
||||
<pose>0.0 0.0 0.010 0 0 0</pose>
|
||||
</joint>
|
||||
|
||||
<joint name="wheel_left_joint" type="revolute">
|
||||
<parent>base_link</parent>
|
||||
<child>wheel_left_link</child>
|
||||
<pose>0.0 0.144 0.023 -1.57 0 0</pose>
|
||||
<axis>
|
||||
<xyz>0 0 1</xyz>
|
||||
</axis>
|
||||
</joint>
|
||||
|
||||
<joint name="wheel_right_joint" type="revolute">
|
||||
<parent>base_link</parent>
|
||||
<child>wheel_right_link</child>
|
||||
<pose>0.0 -0.144 0.023 -1.57 0 0</pose>
|
||||
<axis>
|
||||
<xyz>0 0 1</xyz>
|
||||
</axis>
|
||||
</joint>
|
||||
|
||||
<joint name='caster_back_right_joint' type='ball'>
|
||||
<parent>base_link</parent>
|
||||
<child>caster_back_right_link</child>
|
||||
</joint>
|
||||
|
||||
<joint name='caster_back_left_joint' type='ball'>
|
||||
<parent>base_link</parent>
|
||||
<child>caster_back_left_link</child>
|
||||
</joint>
|
||||
|
||||
<joint name="lidar_joint" type="fixed">
|
||||
<parent>base_link</parent>
|
||||
<child>base_scan</child>
|
||||
<pose>-0.064 0 0.121 0 0 0</pose>
|
||||
<axis>
|
||||
<xyz>0 0 1</xyz>
|
||||
</axis>
|
||||
</joint>
|
||||
|
||||
<plugin name="turtlebot3_diff_drive" filename="libgazebo_ros_diff_drive.so">
|
||||
|
||||
<ros>
|
||||
<!-- <namespace>/tb3</namespace> -->
|
||||
<remapping>/tf:=tf</remapping>
|
||||
</ros>
|
||||
|
||||
<update_rate>30</update_rate>
|
||||
|
||||
<!-- wheels -->
|
||||
<left_joint>wheel_left_joint</left_joint>
|
||||
<right_joint>wheel_right_joint</right_joint>
|
||||
|
||||
<!-- kinematics -->
|
||||
<wheel_separation>0.287</wheel_separation>
|
||||
<wheel_diameter>0.066</wheel_diameter>
|
||||
|
||||
<!-- limits -->
|
||||
<max_wheel_torque>20</max_wheel_torque>
|
||||
<max_wheel_acceleration>1.0</max_wheel_acceleration>
|
||||
|
||||
<command_topic>cmd_vel</command_topic>
|
||||
|
||||
<!-- output -->
|
||||
<publish_odom>true</publish_odom>
|
||||
<publish_odom_tf>true</publish_odom_tf>
|
||||
<publish_wheel_tf>false</publish_wheel_tf>
|
||||
|
||||
<odometry_topic>odom</odometry_topic>
|
||||
<odometry_frame>odom</odometry_frame>
|
||||
<robot_base_frame>base_footprint</robot_base_frame>
|
||||
|
||||
</plugin>
|
||||
|
||||
<plugin name="turtlebot3_joint_state" filename="libgazebo_ros_joint_state_publisher.so">
|
||||
<ros>
|
||||
<!-- <namespace>/tb3</namespace> -->
|
||||
<remapping>~/out:=joint_states</remapping>
|
||||
</ros>
|
||||
<update_rate>30</update_rate>
|
||||
<joint_name>wheel_left_joint</joint_name>
|
||||
<joint_name>wheel_right_joint</joint_name>
|
||||
</plugin>
|
||||
|
||||
</model>
|
||||
|
||||
</world>
|
||||
</sdf>
|
||||
@@ -0,0 +1,98 @@
|
||||
# Copyright (c) 2021 Samsung Research America
|
||||
#
|
||||
# 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 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
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
warehouse_dir = get_package_share_directory('aws_robomaker_small_warehouse_world')
|
||||
nav2_bringup_dir = get_package_share_directory('nav2_bringup')
|
||||
python_commander_dir = get_package_share_directory('nav2_simple_commander')
|
||||
|
||||
map_yaml_file = os.path.join(warehouse_dir, 'maps', '005', 'map.yaml')
|
||||
world = os.path.join(python_commander_dir, 'warehouse.world')
|
||||
|
||||
# Launch configuration variables
|
||||
use_rviz = LaunchConfiguration('use_rviz')
|
||||
headless = LaunchConfiguration('headless')
|
||||
|
||||
# Declare the launch arguments
|
||||
declare_use_rviz_cmd = DeclareLaunchArgument(
|
||||
'use_rviz',
|
||||
default_value='True',
|
||||
description='Whether to start RVIZ')
|
||||
|
||||
declare_simulator_cmd = DeclareLaunchArgument(
|
||||
'headless',
|
||||
default_value='False',
|
||||
description='Whether to execute gzclient)')
|
||||
|
||||
# start the simulation
|
||||
start_gazebo_server_cmd = ExecuteProcess(
|
||||
cmd=['gzserver', '-s', 'libgazebo_ros_factory.so', world],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
start_gazebo_client_cmd = ExecuteProcess(
|
||||
condition=IfCondition(PythonExpression(['not ', headless])),
|
||||
cmd=['gzclient'],
|
||||
cwd=[warehouse_dir], output='screen')
|
||||
|
||||
urdf = os.path.join(nav2_bringup_dir, 'urdf', 'turtlebot3_waffle.urdf')
|
||||
start_robot_state_publisher_cmd = Node(
|
||||
package='robot_state_publisher',
|
||||
executable='robot_state_publisher',
|
||||
name='robot_state_publisher',
|
||||
output='screen',
|
||||
arguments=[urdf])
|
||||
|
||||
# start the visualization
|
||||
rviz_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'rviz_launch.py')),
|
||||
condition=IfCondition(use_rviz),
|
||||
launch_arguments={'namespace': '',
|
||||
'use_namespace': 'False'}.items())
|
||||
|
||||
# start navigation
|
||||
bringup_cmd = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(nav2_bringup_dir, 'launch', 'bringup_launch.py')),
|
||||
launch_arguments={'map': map_yaml_file}.items())
|
||||
|
||||
# start the demo autonomy task
|
||||
demo_cmd = Node(
|
||||
package='nav2_simple_commander',
|
||||
executable='example_waypoint_follower',
|
||||
emulate_tty=True,
|
||||
output='screen')
|
||||
|
||||
ld = LaunchDescription()
|
||||
ld.add_action(declare_use_rviz_cmd)
|
||||
ld.add_action(declare_simulator_cmd)
|
||||
ld.add_action(start_gazebo_server_cmd)
|
||||
ld.add_action(start_gazebo_client_cmd)
|
||||
ld.add_action(start_robot_state_publisher_cmd)
|
||||
ld.add_action(rviz_cmd)
|
||||
ld.add_action(bringup_cmd)
|
||||
ld.add_action(demo_cmd)
|
||||
return ld
|
||||
Reference in New Issue
Block a user