def publish (self):
        '''
        Function to publish cmdvel. 
        '''
        self.lock.acquire()
        tw = cmdvel2Twist(self.vel)
        self.lock.release()
        if (self.jdrc.getState() == "flying"):
            self.pub.publish(tw)
def publish ( self ) : self . lock . acquire ( ) tw = cmdvel2Twist ( self . vel ) self . lock . release ( ) if ( self . jdrc . getState ( ) == "flying" ) : self . pub . publish ( tw )
Function to publish cmdvel.