Skip to content

Commit

Permalink
Uncommented everything in the laptop launch file
Browse files Browse the repository at this point in the history
  • Loading branch information
Isopod00 committed May 14, 2024
1 parent 03d3980 commit 3772c97
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions src/gstreamer/launch/laptop_launch.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3772c97

Please sign in to comment.