/** * 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; }
bool close() { cmdPort.close(); return true; }
virtual void threadRelease() override { p.close(); }
virtual bool close() { inport.close(); outport.close(); return true; }