Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c04454d
initial commit
ruthwikdasyam Feb 14, 2026
d2a9b64
Feat: Added add/sub operations
ruthwikdasyam Feb 16, 2026
71c43dc
Feat: Added phone_teleop blueprints
ruthwikdasyam Feb 16, 2026
42b5833
Feat/Misc - phoneteleop with go2, renamed files
ruthwikdasyam Feb 16, 2026
f2a482d
CI code cleanup
ruthwikdasyam Feb 16, 2026
f9d3ac7
Misc: Added imports, formatting
ruthwikdasyam Feb 17, 2026
440ab9b
Fix: pre-commit errors
ruthwikdasyam Feb 17, 2026
f66333e
Feat: launch deno server with teleop module
ruthwikdasyam Feb 17, 2026
80bfe41
Feat: 50hz fixed, new port 8444
ruthwikdasyam Feb 17, 2026
a804625
Fix: button margin auto
ruthwikdasyam Feb 17, 2026
4ed86f8
Feat: server stop with timeout and kill
ruthwikdasyam Feb 17, 2026
91bfaf5
Fix: pre-commit errors
ruthwikdasyam Feb 17, 2026
b4b3e5f
Merge branch 'dev' into ruthwik_iphone_teleop
ruthwikdasyam Feb 17, 2026
5164357
blueprints update
ruthwikdasyam Feb 17, 2026
beb8fd1
Fix: mypy errors
ruthwikdasyam Feb 17, 2026
df08e54
Fix: if doesnt die - check - greptile issue
ruthwikdasyam Feb 17, 2026
be33ee4
Merge branch 'dev' into ruthwik_iphone_teleop
ruthwikdasyam Feb 17, 2026
0c66ae5
changed 'hold_to_teleop' button position + topic names
ruthwikdasyam Feb 17, 2026
4c9ffe5
Misc: transports autoconnect (matching names)
ruthwikdasyam Feb 17, 2026
db9ec28
Misc: remove redundant docstrings and logging
ruthwikdasyam Feb 17, 2026
7642d09
Fix: Module works for any robot that takes twist input
ruthwikdasyam Feb 18, 2026
f2613da
Fix: add threading
ruthwikdasyam Feb 18, 2026
1b5aaee
Fix: pre-commit errors
ruthwikdasyam Feb 18, 2026
068b47a
Fix: updated to single subclass
ruthwikdasyam Feb 18, 2026
f0c5e7a
Fix: blueprints order
ruthwikdasyam Feb 18, 2026
94c198a
Fix: mypy errors
ruthwikdasyam Feb 18, 2026
e859187
Feat: deno check
ruthwikdasyam Feb 18, 2026
4fc9ff9
Fix: remove base protocol
ruthwikdasyam Feb 18, 2026
ec4eb16
Feat: no protocol, no rpc calls, comments updated
ruthwikdasyam Feb 18, 2026
2e8576e
Misc: comments
ruthwikdasyam Feb 18, 2026
c6f57ab
Misc: comments + html button status fix
ruthwikdasyam Feb 18, 2026
9c1b68b
Fix: rpc to start/stop
ruthwikdasyam Feb 18, 2026
5909831
Merge branch 'dev' into ruthwik_iphone_teleop
ruthwikdasyam Feb 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions dimos/msgs/geometry_msgs/Twist.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,24 @@ def is_zero(self) -> bool:
"""Check if this is a zero twist (no linear or angular velocity)."""
return self.linear.is_zero() and self.angular.is_zero()

def __sub__(self, other: Twist) -> Twist:
"""Component-wise subtraction: self - other."""
if not isinstance(other, Twist):
return NotImplemented
return Twist(
linear=self.linear - other.linear,
angular=self.angular - other.angular,
)

def __add__(self, other: Twist) -> Twist:
"""Component-wise addition: self + other."""
if not isinstance(other, Twist):
return NotImplemented
return Twist(
linear=self.linear + other.linear,
angular=self.angular + other.angular,
)

def __bool__(self) -> bool:
"""Boolean conversion for Twist.

Expand Down
14 changes: 9 additions & 5 deletions dimos/robot/all_blueprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
# Run `pytest dimos/robot/test_all_blueprints_generation.py` to regenerate.

all_blueprints = {
"arm-teleop": "dimos.teleop.blueprints:arm_teleop",
"arm-teleop-dual": "dimos.teleop.blueprints:arm_teleop_dual",
"arm-teleop-piper": "dimos.teleop.blueprints:arm_teleop_piper",
"arm-teleop-visualizing": "dimos.teleop.blueprints:arm_teleop_visualizing",
"arm-teleop-xarm6": "dimos.teleop.blueprints:arm_teleop_xarm6",
"arm-teleop": "dimos.teleop.quest.blueprints:arm_teleop",
"arm-teleop-dual": "dimos.teleop.quest.blueprints:arm_teleop_dual",
"arm-teleop-piper": "dimos.teleop.quest.blueprints:arm_teleop_piper",
"arm-teleop-visualizing": "dimos.teleop.quest.blueprints:arm_teleop_visualizing",
"arm-teleop-xarm6": "dimos.teleop.quest.blueprints:arm_teleop_xarm6",
"coordinator-basic": "dimos.control.blueprints:coordinator_basic",
"coordinator-cartesian-ik-mock": "dimos.control.blueprints:coordinator_cartesian_ik_mock",
"coordinator-cartesian-ik-piper": "dimos.control.blueprints:coordinator_cartesian_ik_piper",
Expand All @@ -47,6 +47,8 @@
"demo-osm": "dimos.mapping.osm.demo_osm:demo_osm",
"demo-skill": "dimos.agents.skills.demo_skill:demo_skill",
"dual-xarm6-planner": "dimos.manipulation.manipulation_blueprints:dual_xarm6_planner",
"phone-go2-teleop": "dimos.teleop.phone.blueprints:phone_go2_teleop",
"simple-phone-teleop": "dimos.teleop.phone.blueprints:simple_phone_teleop",
"uintree-g1-primitive-no-nav": "dimos.robot.unitree.g1.blueprints.primitive.uintree_g1_primitive_no_nav:uintree_g1_primitive_no_nav",
"unitree-g1": "dimos.robot.unitree.g1.blueprints.perceptive.unitree_g1:unitree_g1",
"unitree-g1-agentic": "dimos.robot.unitree.g1.blueprints.agentic.unitree_g1_agentic:unitree_g1_agentic",
Expand Down Expand Up @@ -107,11 +109,13 @@
"osm_skill": "dimos.agents.skills.osm",
"person_follow_skill": "dimos.agents.skills.person_follow",
"person_tracker_module": "dimos.perception.detection.person_tracker",
"phone_teleop_module": "dimos.teleop.phone.phone_teleop_module",
"quest_teleop_module": "dimos.teleop.quest.quest_teleop_module",
"realsense_camera": "dimos.hardware.sensors.camera.realsense.camera",
"replanning_a_star_planner": "dimos.navigation.replanning_a_star.module",
"rerun_bridge": "dimos.visualization.rerun.bridge",
"ros_nav": "dimos.navigation.rosnav",
"simple_phone_teleop_module": "dimos.teleop.phone.phone_extensions",
"simulation": "dimos.simulation.manipulators.sim_module",
"spatial_memory": "dimos.perception.spatial_perception",
"speak_skill": "dimos.agents.skills.speak_skill",
Expand Down
9 changes: 7 additions & 2 deletions dimos/teleop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,20 @@ Adds Rerun visualization for debugging. Extends ArmTeleopModule (toggle engage).

```
teleop/
├── base/
│ └── teleop_protocol.py # TeleopProtocol interface
├── quest/
│ ├── quest_teleop_module.py # Base Quest teleop module
│ ├── quest_extensions.py # ArmTeleop, TwistTeleop, VisualizingTeleop
│ ├── quest_types.py # QuestControllerState, Buttons
│ └── web/ # Deno bridge + WebXR client
│ ├── teleop_server.ts
│ └── static/index.html
├── phone/
│ ├── phone_teleop_module.py # Base Phone teleop module
│ ├── phone_extensions.py # SimplePhoneTeleop
│ ├── blueprints.py # Pre-wired configurations
│ └── web/ # Deno bridge + mobile web app
│ ├── teleop_server.ts
│ └── static/index.html
├── utils/
│ ├── teleop_transforms.py # WebXR → robot frame math
│ └── teleop_visualization.py # Rerun visualization helpers
Expand Down
4 changes: 0 additions & 4 deletions dimos/teleop/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,3 @@
# limitations under the License.

"""Teleoperation modules for DimOS."""

from dimos.teleop.base import TeleopProtocol

__all__ = ["TeleopProtocol"]
58 changes: 0 additions & 58 deletions dimos/teleop/base/teleop_protocol.py

This file was deleted.

70 changes: 70 additions & 0 deletions dimos/teleop/phone/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Phone Teleop

Teleoperation via smartphone motion sensors. Tilt to drive.

## Architecture

```
Phone Browser (DeviceOrientation + DeviceMotion)
|
| TwistStamped + Bool via WebSocket
v
Deno Bridge (teleop_server.ts)
|
| LCM topics
v
PhoneTeleopModule
| Orientation delta from home pose
| Gains -> velocity commands
v
TwistStamped / Twist outputs
```

## Modules

### PhoneTeleopModule
Base module. Receives raw sensor data and button state. On engage (button hold), captures home orientation and publishes deltas as TwistStamped. Launches the Deno bridge server automatically.

### SimplePhoneTeleop
Filters to mobile-base axes (linear.x, linear.y, angular.z) and publishes as `Twist` on `cmd_vel` for direct autoconnect wiring with any module that has `cmd_vel: In[Twist]`.

## Subclassing

Override these methods:

| Method | Purpose |
|--------|---------|
| `_handle_engage()` | Customize engage/disengage logic |
| `_should_publish()` | Add conditions for when to publish |
| `_publish_msg()` | Change output format |

**Do not acquire `self._lock` in overrides.** The control loop already holds it.

## LCM Topics

| Topic | Type | Description |
|-------|------|-------------|
| `/phone_sensors` | TwistStamped | linear=(roll,pitch,yaw) deg, angular=(gyro) deg/s |
| `/phone_button` | Bool | Teleop engage button (1=held) |
| `/teleop/twist` | TwistStamped | Output velocity command |

## Running

```bash
dimos run phone-go2-teleop # Go2
dimos run simple-phone-teleop # Generic ground robot
```

Server starts on port `8444`. Open `https://<host-ip>:8444` on phone, accept the self-signed certificate, allow sensor permissions, connect, hold button to drive.

## File Structure

```
phone/
├── phone_teleop_module.py # Base phone teleop module
├── phone_extensions.py # SimplePhoneTeleop
├── blueprints.py # Pre-wired configurations
└── web/
├── teleop_server.ts # Deno WSS-to-LCM bridge
└── static/index.html # Mobile web app
```
20 changes: 17 additions & 3 deletions dimos/teleop/base/__init__.py → dimos/teleop/phone/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Teleoperation protocol."""
"""Phone teleoperation module for DimOS."""

from dimos.teleop.base.teleop_protocol import TeleopProtocol
from dimos.teleop.phone.phone_extensions import (
SimplePhoneTeleop,
simple_phone_teleop_module,
)
from dimos.teleop.phone.phone_teleop_module import (
PhoneTeleopConfig,
PhoneTeleopModule,
phone_teleop_module,
)

__all__ = ["TeleopProtocol"]
__all__ = [
"PhoneTeleopConfig",
"PhoneTeleopModule",
"SimplePhoneTeleop",
"phone_teleop_module",
"simple_phone_teleop_module",
]
32 changes: 32 additions & 0 deletions dimos/teleop/phone/blueprints.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env python3
# Copyright 2025-2026 Dimensional Inc.
#
# 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 dimos.core.blueprints import autoconnect
from dimos.robot.unitree.go2.blueprints.basic.unitree_go2_basic import unitree_go2_basic
from dimos.teleop.phone.phone_extensions import simple_phone_teleop_module

# Simple phone teleop (mobile base axis filtering + cmd_vel output)
simple_phone_teleop = autoconnect(
Copy link
Contributor

Choose a reason for hiding this comment

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

nice

simple_phone_teleop_module(),
)

# Phone teleop wired to Unitree Go2
phone_go2_teleop = autoconnect(
simple_phone_teleop_module(),
unitree_go2_basic,
)


__all__ = ["phone_go2_teleop", "simple_phone_teleop"]
51 changes: 51 additions & 0 deletions dimos/teleop/phone/phone_extensions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env python3
# Copyright 2025-2026 Dimensional Inc.
#
# 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.

"""Phone teleop module extensions.

Available subclasses:
- SimplePhoneTeleop: Filters to ground robot axes and outputs cmd_vel: Out[Twist]
"""

from dimos.core import Out
from dimos.msgs.geometry_msgs import Twist, TwistStamped, Vector3
from dimos.teleop.phone.phone_teleop_module import PhoneTeleopModule


class SimplePhoneTeleop(PhoneTeleopModule):
"""Phone teleop for ground robots.

Filters the raw 6-axis twist to mobile base axes (linear.x, linear.y, angular.z)
and publishes as Twist on cmd_vel for direct autoconnect wiring with any
module that has cmd_vel: In[Twist].
"""

cmd_vel: Out[Twist]

def _publish_msg(self, output_msg: TwistStamped) -> None:
self.cmd_vel.publish(
Twist(
linear=Vector3(x=output_msg.linear.x, y=output_msg.linear.y, z=0.0),
angular=Vector3(x=0.0, y=0.0, z=output_msg.linear.z),
)
)


simple_phone_teleop_module = SimplePhoneTeleop.blueprint

__all__ = [
"SimplePhoneTeleop",
"simple_phone_teleop_module",
]
Loading
Loading