The original design for the API that interfaced with Gazebo and the PGPE algorithm was in the form of multiple function calls. After looking into the way that gazebo and it's plugins functioned, we decided that creating individual functions would not be possible. Gazebo operates its plugins using a set of callback functions. These functions are called by the internal mechanisms that simulate and animate the robot, and therefore are not accesible to other processes that may wish to run them.

In order to fix this issue, we have decided to use a socket based interface that will poll in each of the callback functions, waiting for a message from the PGPE algorithm along with input serialized in some format. This input will then be deserialized in the callback functions and acted upon. After the necessary actions are done, the output will be serialized and sent to the socket, then deserialized at the algorithm's end. Then, the callback function terminates, and a new cycle starts.

Next Post Previous Post