How to know when a tick is tickPeriodically() ? Is there a function like .available() for RX ticks

Hello,

I am trying to determine when the tickPeriodically() tick is called versus the other ticks being called (incomming messages). is there a way to do this?

Thank you!

Hi FedoraLabs - what exactly are you looking for? How to configure the json file?

https://docs.nvidia.com/isaac/isaac/doc/engine/components.html?highlight=tick

Tick periodically vs. Tick on message?

A codelet can be configured to tick either periodically or on incoming message. In most cases ticking on incoming messages creates the cleaner data driven graph. In case you have to use tickPeriodically because you need to do work periodically an occasionally also process incoming messages you can use processAllNewMessages to check for new messages during your tick.

Thank you, this may serve a better option. Where is processAllNewMessages described in the documentation? Upon a quick look we didn’t find it.

Also with this method, for example if my tick runs at 1hz, but other components are sending it messages at 10hz, which message do I receive when calling processAllNewMessages? Do I receive that oldest message first or the newest message and the old messages are discarded? Is there queuing/buffering in the messaging system? This point should probably be added to the documentation as well.

Thanks!

1 Like

Yes, we have not added these more rare features to the doc as the API is not final yet. For the meantime you can look at engine/alice/hooks/message_hook.hpp, Line 196+

As a brief: N latest messages are stored (default N = 10), with normal “tickOnMessage” you access the latest, with processAllNewMessages you get all of the N last messages which you have not yet processed in a previous tick, oldest first