def handle_relative_move(self, direction, dist, jump):

        speed = 1
        pos = self.pos_to_dict()
        desired_yaw = direction

        if desired_yaw > 180:
            while desired_yaw > 180:
                desired_yaw -= 360
        elif desired_yaw < -180:
            while desired_yaw < -180:
                desired_yaw += 360

        frames = phy.get_movement_frames(pos, direction, dist, speed, jump)

        # print "dx,dy,dz", dx, dy, dz
        for frame in frames:
            msg = movement_msg()
            msg.x = frame['x']
            msg.y = frame['y']
            msg.z = frame['z']
            msg.pitch = frame['pitch']
            msg.yaw = frame['yaw']
            msg.jump = jump
            # print "rel_move_msg", msg
            self.pub_move.publish(msg)
        return True
    def handle_move(self, x, z, jump):

        speed = 1
        pos = self.pos_to_dict()
        direction = self.get_desired_yaw(pos['x'], pos['z'], x, z)
        dist = sqrt((x - pos['x'])**2 + (z - pos['z'])**2)
        frames = phy.get_movement_frames(pos, direction, dist, speed, jump)

        for frame in frames:
            msg = movement_msg()
            msg.x = frame['x']
            msg.y = frame['y']
            msg.z = frame['z']
            msg.pitch = frame['pitch']
            msg.yaw = frame['yaw']
            msg.jump = jump
            # print "abs_move_msg", msg
            self.pub_move.publish(msg)
        return True