Skip to content
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ ros2 launch clr_deploy clr_sim.launch.py model_env:=true
For hardware we run the UR pendantless, which is a two part launch process:

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

# Start the hardware interfaces for the rail, lift, and ChonkUR.
# On the console machine, launch the UR GUI, which handles most operations that normally occur on the UR pendant
ros2 launch chonkur_deploy chonkur_gui.launch.py

# Back on the controls machine, after reading the UR arm
# Start the hardware interfaces for the rail, lift, and ChonkUR
ros2 launch clr_deploy clr_hw.launch.py
```

Expand All @@ -52,6 +56,7 @@ ros2 launch clr_mujoco_config clr_mujoco.launch.py
# In another shell launch the moveit interface with sim parameters set
ros2 launch clr_moveit_config clr_moveit.launch.py include_mockups_in_description:=true use_sim_time:=true
```

## Citation

This project falls under the purview of the iMETRO project.
Expand Down
4 changes: 2 additions & 2 deletions chonkur/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ For hardware we run the UR pendantless, which is a two part launch process:

```bash
# To launch the hardware robot, first deploy the UR tools to activate the dashboard client
# in its own long-lived shell.
ros2 launch chonkur_deploy ur_tools.launch.py
# in its own long-lived shell on the controls machine.
ros2 launch chonkur_deploy chonkur_comm.launch.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be run on controls or console?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think running hande tool comm would benefit from being on controls but everything else should run on console. I'm going to separate those too out in the launch file and readme then merge this today


# Then start the hardware interface.
ros2 launch chonkur_deploy chonkur_hw.launch.py
Expand Down
14 changes: 14 additions & 0 deletions chonkur/chonkur_deploy/config/drt_ur_gui_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
drt_ur_gui:
ros__parameters:
program: "ext_ctrl.urp"
window.name: "DRT UR Remote Commander: Single Arm Testing Configuration"
window.stylesheet: |
QMainWindow {
background-color: darkgrey;
color: #000000;
}
QPlainTextEdit {
background-color: lightgrey;
color: #000000;
font-size: 8px;
}
110 changes: 110 additions & 0 deletions chonkur/chonkur_deploy/launch/chonkur_comm.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
#!/usr/bin/env python3
#
# Copyright (c) 2025, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administration.
#
# All rights reserved.
#
# This software is licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node


def generate_launch_description():

# Declare arguments
declared_arguments = []
declared_arguments.append(
DeclareLaunchArgument(
"namespace",
default_value="",
description="Namespace for the robot.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"headless_mode",
default_value="true",
description="Enable headless mode for robot control",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"robot_ip",
default_value="192.168.1.102",
description="IP address by which the robot can be reached.",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"hande_dev_name",
default_value="/tmp/ttyUR",
description="File descriptor that will be generated for the tool communication device. "
"The user has be be allowed to write to this location. ",
)
)
declared_arguments.append(
DeclareLaunchArgument(
"tool_tcp_port",
default_value="54321",
description="Remote port that will be used for bridging the tool's serial device.",
)
)

# Initialize Arguments
namespace = LaunchConfiguration("namespace")
headless_mode = LaunchConfiguration("headless_mode")
robot_ip = LaunchConfiguration("robot_ip")
hande_dev_name = LaunchConfiguration("hande_dev_name")
tool_tcp_port = LaunchConfiguration("tool_tcp_port")

robot_state_helper_node = Node(
package="ur_robot_driver",
executable="robot_state_helper",
name="ur_robot_state_helper",
output="both",
parameters=[
{"headless_mode": headless_mode},
{"robot_ip": robot_ip},
],
)

ur_dashboard_client = Node(
package="ur_robot_driver",
executable="dashboard_client",
name="dashboard_client",
output="both",
parameters=[{"robot_ip": robot_ip}],
)

hande_comm_node = Node(
name="ur_tool_communication_hande",
package="ur_robot_driver",
executable="tool_communication.py",
namespace=namespace,
output="both",
parameters=[
{
"robot_ip": robot_ip,
"tcp_port": tool_tcp_port,
"device_name": hande_dev_name,
}
],
)

nodes = [robot_state_helper_node, ur_dashboard_client, hande_comm_node]

return LaunchDescription(declared_arguments + nodes)
57 changes: 57 additions & 0 deletions chonkur/chonkur_deploy/launch/chonkur_gui.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env python3
#
# Copyright (c) 2025, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administration.
#
# All rights reserved.
#
# This software is licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

import os

from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from chonkur_deploy.launch_helpers import include_launch_file
from ament_index_python.packages import get_package_share_directory


def generate_launch_description():

# Declare arguments
declared_arguments = []
declared_arguments.append(
DeclareLaunchArgument(
"namespace",
default_value="",
description="Namespace for the robot.",
)
)

# Initialize Arguments
namespace = LaunchConfiguration("namespace")

gui_config_path = os.path.join(get_package_share_directory("chonkur_deploy"), "config", "drt_ur_gui_config.yaml")

ur_gui = include_launch_file(
package_name="drt_ur_gui",
launch_file="one_arm.launch.py",
launch_arguments={
"ns": namespace,
"config_file_path": gui_config_path,
}.items(),
)

nodes = [ur_gui]

return LaunchDescription(declared_arguments + nodes)
Loading