From 32639f59a366226e8a7bb2b61a863b40c754a690 Mon Sep 17 00:00:00 2001 From: stash Date: Thu, 17 Jul 2025 22:36:54 -0700 Subject: [PATCH] Added working runfile to Unitreego2Light class --- .../multiprocess/unitree_go2.py | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/dimos/robot/unitree_webrtc/multiprocess/unitree_go2.py b/dimos/robot/unitree_webrtc/multiprocess/unitree_go2.py index 9e82d52c9d..762f9395d4 100644 --- a/dimos/robot/unitree_webrtc/multiprocess/unitree_go2.py +++ b/dimos/robot/unitree_webrtc/multiprocess/unitree_go2.py @@ -373,9 +373,25 @@ def subscribe(observer, scheduler=None): ) +async def run_light_robot(): + """Run the lightweight robot without GPU modules.""" + ip = os.getenv("ROBOT_IP") + + robot = UnitreeGo2Light(ip) + + await robot.start() + + pose = robot.get_pose() + print(f"Robot position: {pose['position']}") + print(f"Robot rotation: {pose['rotation']}") + robot.explore() + # Keep the program running + while True: + await asyncio.sleep(1) + + if __name__ == "__main__": import os - robot = UnitreeGo2Light(os.getenv("ROBOT_IP")) - asyncio.run(robot.start()) - # asyncio.run(run("192.168.9.140")) + print("Running UnitreeGo2Light...") + asyncio.run(run_light_robot())