def take_action(i, idx, name):
    if (type(name) is int):
        self.env.env.sims[idx].makeAction(name, 0, 0)
    else:
        self.env.env.sims[idx].makeAction(*self.env_actions[name])
    state = self.env.env.sims[idx].getState()
    if (traj is not None):
        traj[i]['path'].append((state.location.viewpointId, state.heading, state.elevation))
def take_action(i, idx, name):
    if (type(name) is int):
        self.env.env.sims[idx].makeAction(name, 0, 0)
    else:
        self.env.env.sims[idx].makeAction(*self.env_actions[name])
    state = self.env.env.sims[idx].getState()
    if (traj is not None):
        traj[i]['path'].append((state.location.viewpointId, state.heading, state.elevation))