/** * Terminates module execution and performs cleanup * @return this method cannot fail, so it always returns true */ virtual bool close() { if (m_ptf.isValid()) { m_ptf.close(); } if (m_pmap.isValid()) { m_pmap.close(); } if (m_rosPublisher_occupancyGrid.asPort().isOpen()) { m_rosPublisher_occupancyGrid.interrupt(); m_rosPublisher_occupancyGrid.close(); } if (m_rosPublisher_initial_pose.asPort().isOpen()) { m_rosPublisher_initial_pose.interrupt(); m_rosPublisher_initial_pose.close(); } if (m_rosNode) { delete m_rosNode; m_rosNode = 0; } m_rpcPort.interrupt(); m_rpcPort.close(); return true; }
virtual bool close() { mHandlerPort.interrupt(); mHandlerPort.close(); //mNavThread->shutdown(); mNavThread->stop(); delete mNavThread; mNavThread=NULL; return true; }
virtual bool close() { rpcPort.interrupt(); rpcPort.close(); //gotoThread->shutdown(); gotoThread->stop(); delete gotoThread; gotoThread=NULL; return true; }
/** * Interrupts ports operations * @return this method cannot fail, so it always returns true */ virtual bool interruptModule() { m_rpcPort.interrupt(); return true; }
virtual bool interruptModule() { mHandlerPort.interrupt(); return true; }