Example #1
0
    /**
    * 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;
    }
Example #2
0
    virtual bool close()
    {
        mHandlerPort.interrupt();
        mHandlerPort.close();

        //mNavThread->shutdown();
        mNavThread->stop();
        delete mNavThread;
        mNavThread=NULL;

        return true;
    }
Example #3
0
    virtual bool close()
    {
        rpcPort.interrupt();
        rpcPort.close();

        //gotoThread->shutdown();
        gotoThread->stop();
        delete gotoThread;
        gotoThread=NULL;

        return true;
    }
Example #4
0
 bool close()
 {
     cmdPort.close(); 
     return true;
 }
Example #5
0
 virtual void threadRelease() override
 {
     p.close();
 }
Example #6
0
 virtual bool close()
 {
     inport.close();
     outport.close();
     return true;
 }