-
Notifications
You must be signed in to change notification settings - Fork 1
Add ur gui #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add ur gui #21
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
766636c
added chonkur_comm.launch.py to launch ur gui along with the contents…
mtobia-nasa b1ea4ff
cleaning up
mtobia-nasa 7525567
Merge branch 'humble-devel' into add-ur-gui
mtobia-nasa b3dc9b8
readme changes, chonkur_comm.launch.py replacing ur_tools.launch.py
mtobia-nasa 4ff7c47
formatting
mtobia-nasa 65d72cd
Address PR feedback, no more script interface
eholum-nasa 42b3aec
Specify where to launch ur comms run for the hand-e node
eholum-nasa ed8f1a6
Merge branch 'humble-devel' into add-ur-gui
eholum-nasa d56ce44
removed gui from chonkur_comm and gave it a separate launch so it can…
mtobia-nasa c5e07a4
format
mtobia-nasa ed9fe7f
more format
mtobia-nasa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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