Ejemplo n.º 1
0
    def send_close_command(self):
        reply = pb.EnvActMsg()
        reply.stopSimReq = True

        replyMsg = reply.SerializeToString()
        self.socket.send(replyMsg)
        self.newStateRx = False
        return True
Ejemplo n.º 2
0
    def send_actions(self, actions):
        reply = pb.EnvActMsg()

        actionMsg = self._pack_data(actions, self._action_space)
        reply.actData.CopyFrom(actionMsg)

        reply.stopSimReq = False
        if self.forceEnvStop:
            reply.stopSimReq = True

        replyMsg = reply.SerializeToString()
        self.socket.send(replyMsg)
        self.newStateRx = False
        return True