'Based on the node orientation returns X, and Y axis. Used to sample the
map in egocentric coordinate frame.'

def get_loc_axis(self, node, delta_theta, perturb=None):

    if (type(node) == tuple):
        node = np.array([node])
    if (perturb is None):
        perturb = np.zeros((node.shape[0], 4))
    xyt = self.to_actual_xyt_vec(node)
    x = (xyt[:, [0]] + perturb[:, [0]])
    y = (xyt[:, [1]] + perturb[:, [1]])
    t = (xyt[:, [2]] + perturb[:, [2]])
    theta = (t * delta_theta)
    loc = np.concatenate((x, y), axis=1)
    x_axis = np.concatenate((np.cos(theta), np.sin(theta)), axis=1)
    y_axis = np.concatenate((np.cos((theta + (np.pi / 2.0))), np.sin((theta + (np.pi / 2.0)))), axis=1)
    y_axis[np.where((perturb[:, 3] > 0))[0], :] *= (-1.0)
    return (loc, x_axis, y_axis, theta)
