Skip to content
Merged
Changes from all commits
Commits
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
11 changes: 10 additions & 1 deletion dimos/robot/unitree/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,16 @@ def stop_movement(self) -> None:
if self.stop_timer:
self.stop_timer.cancel()
self.stop_timer = None
self._publish_movement(0, 0, 0)

async def async_stop() -> None:
self._publish_movement(0, 0, 0)

if not self.loop.is_running():
return
try:
asyncio.run_coroutine_threadsafe(async_stop(), self.loop).result(timeout=1.0)
except Exception as e:
logger.warning("Failed to publish stop twist: %s", e)
Comment thread
ruthwikdasyam marked this conversation as resolved.

def disconnect(self) -> None:
"""Disconnect from the robot and clean up resources."""
Expand Down
Loading