Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Record video in separate VIDEO_STREAM. LogWriter has to have locks now (but time is recorded before lock acquisition*) and the video data (from simulator) are packed by zlib. Traveling 1m with recording without video was 158kB, with uncompressed video 4.2MB and with zlib packed video 2.2MB. This packing could/should be feature of the logger, maybe - but then there need for some flags per stream ... not this project, maybe "later".
p.s. there were actually only 3 images in that 1m navigation ... and I did not try to visualize them yet
(*) this is maybe mistake, because then the order of stored messages does not guarantee order by time - I will add fixup
The idiom you are looking for is iterator + for loop
while True: try: data = log.read(VIDEO_STREAM) except LogEnd: break
It is usually written like this:
for _, _, data in log.read(VIDEO_STREAM): pass