mtk_group fellas, have you already rummaged through these forums what others made before? I found this project quite interesting, maybe you’ll find there something of your interest as well.
Threading in Python with Panda is a bit problematic. Assuming the get_mesg() call isn’t likely to block for many milliseconds at a time, you can use threading, but you have to (a) use the direct.stdpy.threading module instead of Python’s threading module, and (b) call Thread.considerYield() within your while loop to allow other threads to run.
However, if it is true that get_mesg() isn’t likely to block for a long time, then Thomas’ suggestion is better: just use a task, instead of threading. It’s just better.
On the other hand, if get_mesg() might block for a long time, you have a problem. Neither Panda (in its default configuration) nor Python (in any configuration) support true multiprocessing, so your blocking call may block all of your Python threads. You’d have to wrap this call within a C++ block that either spawned and completely managed the thread itself, or that at least managed the Python GIL while the get_mesg() call was made.
yet another possibility is to set up 2 python applications communicating with each other using sockets. i successfully used that technique while doing facetracking in combination with panda. both python apps are handled independently by the OS. it’s a bit of a dirty heck but worked for me.