From 3772c970098f517cb6497e4849625b304097b093 Mon Sep 17 00:00:00 2001 From: Anthony Brogni Date: Tue, 14 May 2024 15:44:51 -0400 Subject: [PATCH] Uncommented everything in the laptop launch file --- src/gstreamer/launch/laptop_launch.py | 58 +++++++++++++-------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/gstreamer/launch/laptop_launch.py b/src/gstreamer/launch/laptop_launch.py index 7ef2e840..9ae2afc7 100644 --- a/src/gstreamer/launch/laptop_launch.py +++ b/src/gstreamer/launch/laptop_launch.py @@ -1,46 +1,46 @@ -# import os +import os from launch import LaunchDescription -# from launch_ros.actions import Node +from launch_ros.actions import Node from launch.actions import ExecuteProcess -# from launch.conditions import IfCondition -# from launch.actions import DeclareLaunchArgument -# from launch.substitutions import LaunchConfiguration, PathJoinSubstitution +from launch.conditions import IfCondition +from launch.actions import DeclareLaunchArgument +from launch.substitutions import LaunchConfiguration, PathJoinSubstitution -# Launches the joystick node and the gstreamer camera client on the operator laptop +# Launches the joystick node and rviz and the gstreamer camera client on the operator laptop def generate_launch_description(): ld = LaunchDescription() - # bringup_dir = os.path.join("config", "rviz") + bringup_dir = os.path.join("config", "rviz") - # # Config - # config_name = LaunchConfiguration("config_name", default="zed_example.rviz") - # config_path = PathJoinSubstitution([bringup_dir, config_name]) - # global_frame = LaunchConfiguration("global_frame", default="map") + # Config + config_name = LaunchConfiguration("config_name", default="zed_example.rviz") + config_path = PathJoinSubstitution([bringup_dir, config_name]) + global_frame = LaunchConfiguration("global_frame", default="map") - # run_rviz_arg = DeclareLaunchArgument("run_rviz_client", default_value="True", description="Whether to start RVIZ") + run_rviz_arg = DeclareLaunchArgument("run_rviz_client", default_value="True", description="Whether to start RVIZ") - # joystick_node = Node( - # package="joy", - # executable="joy_node", - # parameters=["config/joy_node.yaml"], - # ) + joystick_node = Node( + package="joy", + executable="joy_node", + parameters=["config/joy_node.yaml"], + ) start_gStreamer_client = ExecuteProcess( cmd=["rqt", "--force-discover", "--standalone", "CameraClient"], shell=True, output="screen" ) - # rviz_node = Node( - # package="rviz2", - # executable="rviz2", - # name="rviz2", - # output="screen", - # arguments=["-d", config_path, "-f", global_frame], - # condition=IfCondition(LaunchConfiguration("run_rviz_client")), - # ) - - # ld.add_action(run_rviz_arg) - # ld.add_action(joystick_node) # TODO: The joystick node currently does not work inside the container + rviz_node = Node( + package="rviz2", + executable="rviz2", + name="rviz2", + output="screen", + arguments=["-d", config_path, "-f", global_frame], + condition=IfCondition(LaunchConfiguration("run_rviz_client")), + ) + + ld.add_action(run_rviz_arg) + ld.add_action(joystick_node) # TODO: The joystick node currently does not work inside the container! ld.add_action(start_gStreamer_client) - # ld.add_action(rviz_node) + ld.add_action(rviz_node) return ld