Skip to content

Commit d56ce44

Browse files
mtobia-nasaCHONKUR
authored andcommitted
removed gui from chonkur_comm and gave it a separate launch so it can be ran on the console machine
1 parent ed8f1a6 commit d56ce44

File tree

3 files changed

+65
-14
lines changed

3 files changed

+65
-14
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ ros2 launch clr_deploy clr_sim.launch.py model_env:=true
2525
For hardware we run the UR pendantless, which is a two part launch process:
2626

2727
```bash
28-
# To launch the hardware robot, first deploy the UR tools to activate the dashboard client
28+
# To launch the hardware robot, first deploy chonkur communications to activate the dashboard client
2929
# in its own long-lived shell on the controls machine.
3030
ros2 launch chonkur_deploy chonkur_comm.launch.py
3131

32-
# Start the hardware interfaces for the rail, lift, and ChonkUR.
32+
# On the console machine, launch the UR GUI, which handles most operations that normally occur on the UR pendant
33+
ros2 launch chonkur_deploy chonkur_gui.launch.py
34+
35+
# Back on the controls machine, after reading the UR arm
36+
# Start the hardware interfaces for the rail, lift, and ChonkUR
3337
ros2 launch clr_deploy clr_hw.launch.py
3438
```
3539

chonkur/chonkur_deploy/launch/chonkur_comm.launch.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,6 @@ def generate_launch_description():
109109
],
110110
)
111111

112-
gui_config_path = os.path.join(get_package_share_directory("chonkur_deploy"), "config", "drt_ur_gui_config.yaml")
113-
114-
ur_gui = include_launch_file(
115-
package_name="drt_ur_gui",
116-
launch_file="one_arm.launch.py",
117-
launch_arguments={
118-
"ns": namespace,
119-
"config_file_path": gui_config_path,
120-
}.items(),
121-
)
122-
123-
nodes = [robot_state_helper_node, ur_dashboard_client, hande_comm_node, ur_gui]
112+
nodes = [robot_state_helper_node, ur_dashboard_client, hande_comm_node]
124113

125114
return LaunchDescription(declared_arguments + nodes)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/usr/bin/env python3
2+
#
3+
# Copyright (c) 2025, United States Government, as represented by the
4+
# Administrator of the National Aeronautics and Space Administration.
5+
#
6+
# All rights reserved.
7+
#
8+
# This software is licensed under the Apache License, Version 2.0
9+
# (the "License"); you may not use this file except in compliance with the
10+
# License. You may obtain a copy of the License at
11+
#
12+
# http://www.apache.org/licenses/LICENSE-2.0
13+
#
14+
# Unless required by applicable law or agreed to in writing, software
15+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17+
# License for the specific language governing permissions and limitations
18+
# under the License.
19+
20+
import os
21+
22+
from launch import LaunchDescription
23+
from launch.actions import DeclareLaunchArgument
24+
from launch.substitutions import LaunchConfiguration
25+
from launch_ros.actions import Node
26+
from chonkur_deploy.launch_helpers import include_launch_file
27+
from ament_index_python.packages import get_package_share_directory
28+
29+
30+
def generate_launch_description():
31+
32+
# Declare arguments
33+
declared_arguments = []
34+
declared_arguments.append(
35+
DeclareLaunchArgument(
36+
"namespace",
37+
default_value="",
38+
description="Namespace for the robot.",
39+
)
40+
)
41+
42+
# Initialize Arguments
43+
namespace = LaunchConfiguration("namespace")
44+
45+
gui_config_path = os.path.join(get_package_share_directory("chonkur_deploy"), "config", "drt_ur_gui_config.yaml")
46+
47+
ur_gui = include_launch_file(
48+
package_name="drt_ur_gui",
49+
launch_file="one_arm.launch.py",
50+
launch_arguments={
51+
"ns": namespace,
52+
"config_file_path": gui_config_path,
53+
}.items(),
54+
)
55+
56+
nodes = [ur_gui]
57+
58+
return LaunchDescription(declared_arguments + nodes)

0 commit comments

Comments
 (0)