Skip to content

Commit 9196996

Browse files
committed
mini changes to sensor replay
1 parent 99ec461 commit 9196996

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

dimos/robot/unitree_webrtc/type/test_lidar.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ def test_publish():
4444
topic = Topic(topic="/lidar", lcm_type=PointCloud2)
4545
lidar = SensorReplay("office_lidar", autocast=LidarMessage.from_msg)
4646

47-
for frame in lidar.iterate():
48-
print(frame)
49-
lcm.publish(topic, frame.to_pointcloud2())
50-
time.sleep(0.1)
47+
while True:
48+
for frame in lidar.iterate():
49+
print(frame)
50+
lcm.publish(topic, frame.to_pointcloud2())
51+
time.sleep(0.1)

dimos/utils/testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def load_one(self, name: Union[int, str, Path]) -> Union[T, Any]:
6767
def iterate(self) -> Iterator[Union[T, Any]]:
6868
pattern = os.path.join(self.root_dir, "*")
6969
for file_path in sorted(glob.glob(pattern)):
70-
yield self.load_one(file_path)
70+
yield self.load_one(Path(file_path))
7171

7272
def stream(self, rate_hz: Optional[float] = None) -> Observable[Union[T, Any]]:
7373
if rate_hz is None:

0 commit comments

Comments
 (0)