Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions examples/dave_demos/launch/dave_object.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription, OpaqueFunction
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.conditions import IfCondition
from launch_ros.substitutions import FindPackageShare


Expand Down Expand Up @@ -33,7 +32,10 @@ def launch_setup(context, *args, **kwargs):
else:
gz_args = [world_name]

if headless.perform(context) == "true":
run_server_only = (
headless.perform(context).lower() == "true" or gui.perform(context).lower() == "false"
)
if run_server_only:
gz_args.append(" -s")
if paused.perform(context) == "false":
gz_args.append(" -r")
Expand All @@ -56,7 +58,6 @@ def launch_setup(context, *args, **kwargs):
launch_arguments=[
("gz_args", gz_args),
],
condition=IfCondition(gui),
)

object_launch = IncludeLaunchDescription(
Expand Down Expand Up @@ -99,7 +100,7 @@ def generate_launch_description():
DeclareLaunchArgument(
"gui",
default_value="true",
description="Flag to enable the gazebo gui",
description="Show the Gazebo graphical client; false runs server-only",
),
DeclareLaunchArgument(
"use_sim_time",
Expand All @@ -114,7 +115,7 @@ def generate_launch_description():
DeclareLaunchArgument(
"headless",
default_value="false",
description="Flag to enable the gazebo headless mode",
description="Run Gazebo server-only without the graphical client",
),
DeclareLaunchArgument(
"verbose",
Expand Down
11 changes: 6 additions & 5 deletions examples/dave_demos/launch/dave_robot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
IncludeLaunchDescription,
OpaqueFunction,
)
from launch.conditions import IfCondition
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
from launch_ros.substitutions import FindPackageShare
Expand Down Expand Up @@ -48,7 +47,10 @@ def launch_setup(context, *args, **kwargs):

zoom_camera_value = "true" if selected_world_name == "dave_ocean_waves" else "false"

if headless.perform(context) == "true":
run_server_only = (
headless.perform(context).lower() == "true" or gui.perform(context).lower() == "false"
)
if run_server_only:
gz_args.append(" -s")
if paused.perform(context) == "false":
gz_args.append(" -r")
Expand All @@ -72,7 +74,6 @@ def launch_setup(context, *args, **kwargs):
launch_arguments=[
("gz_args", gz_args),
],
condition=IfCondition(gui),
)

# Include the second launch file with model name
Expand Down Expand Up @@ -129,7 +130,7 @@ def generate_launch_description():
DeclareLaunchArgument(
"gui",
default_value="true",
description="Flag to enable the gazebo gui",
description="Show the Gazebo graphical client; false runs server-only",
),
DeclareLaunchArgument(
"use_sim_time",
Expand All @@ -144,7 +145,7 @@ def generate_launch_description():
DeclareLaunchArgument(
"headless",
default_value="false",
description="Flag to enable the gazebo headless mode",
description="Run Gazebo server-only without the graphical client",
),
DeclareLaunchArgument(
"verbose",
Expand Down
11 changes: 6 additions & 5 deletions examples/dave_demos/launch/dave_sensor.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription, OpaqueFunction
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.conditions import IfCondition
from launch_ros.substitutions import FindPackageShare


Expand Down Expand Up @@ -33,7 +32,10 @@ def launch_setup(context, *args, **kwargs):
else:
gz_args = [world_name]

if headless.perform(context) == "true":
run_server_only = (
headless.perform(context).lower() == "true" or gui.perform(context).lower() == "false"
)
if run_server_only:
gz_args.append(" -s")
if paused.perform(context) == "false":
gz_args.append(" -r")
Expand All @@ -55,7 +57,6 @@ def launch_setup(context, *args, **kwargs):
launch_arguments=[
("gz_args", gz_args),
],
condition=IfCondition(gui),
)

sensor_launch = IncludeLaunchDescription(
Expand Down Expand Up @@ -98,7 +99,7 @@ def generate_launch_description():
DeclareLaunchArgument(
"gui",
default_value="true",
description="Flag to enable the gazebo gui",
description="Show the Gazebo graphical client; false runs server-only",
),
DeclareLaunchArgument(
"use_sim_time",
Expand All @@ -113,7 +114,7 @@ def generate_launch_description():
DeclareLaunchArgument(
"headless",
default_value="false",
description="Flag to enable the gazebo headless mode",
description="Run Gazebo server-only without the graphical client",
),
DeclareLaunchArgument(
"verbosity_level",
Expand Down
7 changes: 1 addition & 6 deletions models/dave_object_models/launch/upload_object.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def validate_description(context, *args, **kwargs):


def generate_launch_description():
gui = LaunchConfiguration("gui")
use_sim_time = LaunchConfiguration("use_sim_time")
namespace = LaunchConfiguration("namespace")
x = LaunchConfiguration("x")
Expand Down Expand Up @@ -140,7 +139,6 @@ def generate_launch_description():
yaw,
],
output="both",
condition=IfCondition(gui),
parameters=[{"use_sim_time": use_sim_time}],
)

Expand All @@ -152,9 +150,6 @@ def generate_launch_description():
)
]

validate_object_description = OpaqueFunction(
function=validate_description,
condition=IfCondition(gui),
)
validate_object_description = OpaqueFunction(function=validate_description)

return LaunchDescription(args + [validate_object_description] + nodes + event_handlers)
2 changes: 0 additions & 2 deletions models/dave_sensor_models/launch/upload_sensor.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def launch_setup(context, *args, **kwargs):


def generate_launch_description():
gui = LaunchConfiguration("gui")
use_sim_time = LaunchConfiguration("use_sim_time")
namespace = LaunchConfiguration("namespace")
x = LaunchConfiguration("x")
Expand Down Expand Up @@ -152,7 +151,6 @@ def generate_launch_description():
yaw,
],
output="both",
condition=IfCondition(gui),
parameters=[{"use_sim_time": use_sim_time}],
)

Expand Down
Loading