rosh topics.foo[0] not working as expected in a loop
I've noticed a little oddity with how topics work in rosh. To be specific, I would expect the following two snippets to yield the same results:
for topics.foo[:]:
print foo
while ok():
print topics.foo[0]
The first one does a good job printing all messages received on /foo, but the second only seems to get every other, even if the messages are being published very slowly.
For what I'm doing, using the first one would be awkward - I have a for loop which loops over some data, and at each iteration, I need the latest message on some topic, and that message won't show up until after some of my loop body has finished.
Does anyone have ideas on what's going on? (also, now that @kwc isn't at WG anymore, is anyone maintaining rosh?)
Unfortunately it sounds like rosh is more or less orphaned now: https://code.ros.org/trac/ros/ticket/3954
That's too bad. If you're up for working together, I would be open to becoming a maintainer for rosh and making sure it gets the care it deserves.