Setup: Robot that runs on C++ and an RL training-algo in python. Robot loop runs at 1kHz (can go higher).
Goal: To send the robot-state information to the RL training online and send the control inputs back to the robot.
Is there a best-way to achieve communication to and fro between C++ and Python processes (without having to use Robot-Operating-System)?
Thank you
Personally I would do the same as @tdelaney and @cdhowie already mentioned: using IPC socket communication. However, I think it would be overkill to use zeromq or external library to do so, since using only Python standard libraries should be fine and equally easy. Depending of your application, using shared memory could be way more efficient, but it is harder to setup and have limitations (the two processes must run of the same machine, among others). There is already many posts about this topic. This post is very close to what you are trying to achieve and the answers are very detailed.