add launch arguments for gazebo
Added gazebo gui argument and arguments to start without controllers
This commit is contained in:
parent
ed6d163e5b
commit
dc628f1387
2 changed files with 134 additions and 169 deletions
|
@ -1,4 +1,4 @@
|
|||
from launch import LaunchDescription
|
||||
from launch import LaunchDescription, condition
|
||||
from launch.actions import (
|
||||
DeclareLaunchArgument,
|
||||
IncludeLaunchDescription,
|
||||
|
@ -141,6 +141,16 @@ def generate_launch_description():
|
|||
default_value="gazebo",
|
||||
description="Choose your harware_interface")
|
||||
)
|
||||
declared_arguments.append(
|
||||
DeclareLaunchArgument("launch_controllers",
|
||||
default_value="true",
|
||||
description="Launch controllers?")
|
||||
)
|
||||
declared_arguments.append(
|
||||
DeclareLaunchArgument("gazebo_gui",
|
||||
default_value="false",
|
||||
description="Launch gazebo with gui?")
|
||||
)
|
||||
# Initialize Arguments
|
||||
rbs_robot_type = LaunchConfiguration("rbs_robot_type")
|
||||
# General arguments
|
||||
|
@ -163,7 +173,8 @@ def generate_launch_description():
|
|||
sim_gazebo = LaunchConfiguration("sim_gazebo")
|
||||
hardware = LaunchConfiguration("hardware")
|
||||
env_manager = LaunchConfiguration("env_manager")
|
||||
|
||||
launch_controllers = LaunchConfiguration("launch_controllers")
|
||||
gazebo_gui = LaunchConfiguration("gazebo_gui")
|
||||
|
||||
initial_joint_controllers_file_path = PathJoinSubstitution(
|
||||
[FindPackageShare(description_package), "config", controllers_file]
|
||||
|
@ -241,7 +252,8 @@ def generate_launch_description():
|
|||
'initial_joint_controller': initial_joint_controller,
|
||||
'controllers_file': controllers_file,
|
||||
"cartesian_controllers": cartesian_controllers
|
||||
}.items())
|
||||
}.items(),
|
||||
condition=IfCondition(launch_controllers))
|
||||
|
||||
simulation = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource([
|
||||
|
@ -253,8 +265,10 @@ def generate_launch_description():
|
|||
]),
|
||||
launch_arguments={
|
||||
'sim_gazebo': sim_gazebo,
|
||||
'gazebo_gui': gazebo_gui,
|
||||
'rbs_robot_type': rbs_robot_type,
|
||||
'env_manager': env_manager
|
||||
'env_manager': env_manager,
|
||||
'debugger': "false"
|
||||
}.items(),
|
||||
condition=IfCondition(launch_simulation))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue