Function to publish cmdvel.

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)