Few questions regarding async and threading behaviours in rmf_demos_panel (#351)

Posted by @sauk2:

I have been working with the rmf_demos_panel package for sometime now and I have a few questions regarding the AsyncRmfMsgObserver class and its methods, specifically the __check_future and __internal_spin functions.

Is there any particular reason why an asyncio event loop is not being used to create the task?

It would probably eliminate the need to continuously check the future in a separate while loop and setting the future to done would simultaneously terminate the event loop and the websocket server.

Another question pertaining to the same package, why is there a separate spin_thread created in simple_api_server.py that doesn’t seem to be doing anything other then sleep every 0.2s?


Edited by @sauk2 at 2023-05-17T12:52:09Z

Posted by @Yadunund:

Your logical concerns are probably valid. However, we no longer maintain or recommend using rmf_demos_panel. It was meant to be an interim solution until rmf-web was ready.
So I’d encourage you to switch to rmf-web and if you have similar questions regarding it’s implementation it might be worth discussing as we could change things there. I don’t see us spending any effort in fixing things in the rmf_demos_panel.

Posted by @sauk2:

Thank you for your response.
I was just looking for a lightweight system to get task and fleet state updates from RMF, hence rmf_demos_panel.

I will try looking into rmf-web to see if it fits my use-case. It would be a great help if you could point me to the place where rmf-web connects to the broadcast client to get all this information.