Skip to content

feat: add Doom-style teleop control module (#1401)#1552

Closed
christiefhyang wants to merge 6 commits intomainfrom
christie/feat-doom-control
Closed

feat: add Doom-style teleop control module (#1401)#1552
christiefhyang wants to merge 6 commits intomainfrom
christie/feat-doom-control

Conversation

@christiefhyang
Copy link
Member

@christiefhyang christiefhyang commented Mar 14, 2026

This PR introduces a Doom-style teleoperation module that allows control of robots using a keyboard and mouse, modeled after first-person shooter (FPS) controls. The DoomTeleop module provides continuous velocity control via the /cmd_vel interface and optional pose control via the /goal_pose and /cancel_goal interfaces. It is robot-agnostic and can be integrated into any robot system that uses these standard interfaces.

Details:

  • Keyboard Control (Velocity):
    • The module maps keyboard inputs to robot movements using Twist messages:
    • W/S: Move forward/backward.
    • A/D: Turn left/right.
    • Space: Emergency stop (sets cmd_vel to zero).
    • It publishes velocity commands on the /cmd_vel topic, making it compatible with any robot that supports this interface.

  • Mouse Control (Yaw and Pose):
    • Mouse motion controls yaw (rotation around the vertical axis) based on horizontal movement.
    • Right-click sends a small forward goal pose (PoseStamped).
    • Middle-click rotates the robot in place using a discrete pose goal, if goal topics (goal_pose, cancel_goal) are set.

  • Discrete Pose Control:
    • The module also allows pose control using the PoseStamped message:
    • goal_pose: Sends discrete goal poses for navigation.
    • cancel_goal: Cancels ongoing goals with a Bool message (triggered by the Space key).

  • Robot-Agnostic Design:
    • The module is robot-agnostic and works with any robot that supports the ROS navigation interfaces like /cmd_vel, /goal_pose, and /cancel_goal.
    • It simply publishes Twist, PoseStamped, and Bool messages to existing transport topics and doesn’t introduce new control interfaces.

  • Threading for Asynchronous Input Handling:
    • The teleoperation input handling (keyboard and mouse events) runs in a separate thread using threading.Event and pygame for event management, allowing non-blocking, responsive input during operation.

Breaking Changes

None. This PR introduces a new module that integrates with existing interfaces without modifying or breaking any existing control paths.

How to Test

 #In a supported Linux/WSL environment, run:
   uv sync --extra dev --extra cpu --extra sim
   uv run dimos --simulation run doom-teleop

• Test the Keyboard Teleoperation:
• W/S: Move forward/backward.
• A/D: Turn left/right.
• Space: Emergency stop (sets cmd_vel to zero).
• Test the Mouse Control:
• Mouse motion: Rotate the robot based on horizontal mouse movement.
• Right-click: Send a small forward goal pose (goal_pose).
• Middle-click: Rotate in place using a discrete goal if goal topics are available.
• Test Pose Control:
• Space: Cancel the current goal pose.
• Ensure the robot responds to pose commands and navigates correctly to the set goals.

Contributor License Agreement

  • I have read and approved the CLA.

Dreamsorcerer and others added 6 commits March 13, 2026 01:02
* Reapply "Module config adjustments (#1413)" (#1417)

This reverts commit 3df8857.

* Fixes

* Move global_config

* Why did this not commit?

* Default

* Fix

* Fix

* Fix

* Docs

* tentative fix for timeout error

* Fix

* Use create_autospec

* TemporalMemory fix

* Forbid extra

* Fix

---------

Co-authored-by: Sam Bull <Sam.B@snowfalltravel.com>
Co-authored-by: Paul Nechifor <paul@nechifor.net>
* fix(imports): remove dunder init

* fix import
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.

3 participants