Skip to content

Added freedrive button to drt ur gui - #6

Merged
alvu-nasa merged 35 commits into
humble-develfrom
freedrive-button
Jun 29, 2026
Merged

alvu-nasa merged 35 commits into
humble-develfrom
freedrive-button

Conversation

@alvu-nasa

Copy link
Copy Markdown
Contributor

Freedrive button architecture:
To enable freedrive:

  • Check if the controller manager and switch controller are available
  • Get the list of all controllers
  • Filter the list to only include active, non-whitelisted controllers
  • Store this list as "active controllers"
  • De-activate the active controllers
  • Activate freedrive mode
  • Publish a True message for freedrive mode at 2Hz to keep the controller on

To disable freedrive:

  • De-activate freedrive mode and kill the keepalive publisher
  • Using the list of "active controllers" obtained above, activate this list of controllers

Tested on CLR hardware, both standalone and during MoveIt demonstrations

alvu-nasa and others added 23 commits June 8, 2026 14:32
…tton to send URScripts over the Primary Interface, a text box for to send multi-line URScripts, and ip address assigning for the robot. Have not tested this on the robot and have not tested beyond mock pinging.
…o commit on the computer downstairs so i am making a big commit here
…returnign current controllers for get active controllers
…ake it more readable. also streamlined the switch controllers method
… idea is to pull it out and then call switch controllers

@scastro-nasa scastro-nasa left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good -- only minor style comments, really.

Also make sure you run the formatter with pre-commit run -a to fix those failures

Comment thread drt_ur_gui/node.py Resolved
Comment thread drt_ur_gui/node.py Resolved
Comment thread drt_ur_gui/node.py Resolved
Comment thread drt_ur_gui/node.py Resolved
Comment thread drt_ur_gui/node.py Resolved
Comment thread drt_ur_gui/node.py Resolved
Comment thread ui/drt_ur.ui Resolved
Comment thread freedrive_URScript Resolved
Comment thread drt_ur_gui/node.py Resolved
Comment thread freedrive_URScript Resolved

@ndunkelb-nasa ndunkelb-nasa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

General comments, mostly just on style, but the overall structure is good!

Comment thread drt_ur_gui/node.py Resolved
Comment thread drt_ur_gui/node.py Resolved
Comment thread drt_ur_gui/node.py Resolved
Comment thread drt_ur_gui/node.py Resolved
Comment thread drt_ur_gui/node.py Resolved
Comment thread drt_ur_gui/node.py Resolved
Comment thread drt_ur_gui/node.py Resolved
Comment thread drt_ur_gui/node.py Resolved
Comment thread drt_ur_gui/node.py Resolved

@scastro-nasa scastro-nasa left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM from a code standpoint -- assuming it still works let's go!

Comment thread drt_ur_gui/node.py Resolved
Comment thread config/two_arm_left.yaml
Comment on lines +4 to +8
freedrive_mode_controller_name: "left_"
robot.name: "UR"
arm.name: "Left Arm"
program: "ext_ctrl.urp"
script_command_topic: "/script_command"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why does two_arm_left.yaml have the extra line for script_command_topic but the right config doesn't? Just missed it?

Comment thread drt_ur_gui/node.py
)
self.freedrive_active = False
self.active_controllers = []
self.freedrive_controllers = f"{self.freedrive_mode_controller_name}freedrive_mode_controller"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

also nitpick on the config stuff -- it may be a little confusing to have the freedrive mode controller name just be a prefix.

If you call the variable self.freedrive_mode_controller_prefix} then it will read

 f"{self.freedrive_mode_controller_prefix}freedrive_mode_controller"

@alvu-nasa
alvu-nasa merged commit 40a53a2 into humble-devel Jun 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants