Skip to content

Handle keyboard teleop without an interactive TTY - #68

Open
yeseorizi wants to merge 1 commit into
IOES-Lab:ros2from
yeseorizi:fix/keyboard-non-tty-20260910
Open

Handle keyboard teleop without an interactive TTY#68
yeseorizi wants to merge 1 commit into
IOES-Lab:ros2from
yeseorizi:fix/keyboard-non-tty-20260910

Conversation

@yeseorizi

Copy link
Copy Markdown
Collaborator

Summary

Allow the keyboard teleoperation node to run safely when no interactive TTY is available.

Problem

In Docker, CI, and other non-interactive launches, both stdin and /dev/tty may be unavailable. The fallback error path called the deprecated logger method warn, causing an additional AttributeError and terminating the node.

The node also printed the normal keyboard-ready message even when keyboard input had been disabled.

Changes

  • Use logger.warning() for the no-TTY diagnostic.
  • Keep the ROS node alive while disabling keyboard input when no TTY exists.
  • Print separate ready and disabled status messages.
  • Handle ROS shutdown exceptions so signal-driven termination is clean.

Validation

Rebased onto ros2 after PR #65 and rebuilt dave_robot_models in an ARM64 Lyrical / Jetty container.

In a non-TTY Docker run:

process_alive_after_4s=true
exception_free=true

The node logged that keyboard teleoperation was disabled, produced no Traceback or AttributeError during the observation period, and terminated cleanly on SIGINT.

pre-commit run --all-files also passed.

Signed-off-by: yeseorizi <172019512+yeseorizi@users.noreply.github.com>
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.

1 participant