def addRemoveHumans(tf, humans, env, base_frame='/map', kin_frame='/head/skel_depth_frame', **kw_args): """ Add or remove humans in the simulated environment on the basis of the information coming from the kinect @param tf tf @param humans vector of the humans that are loaded into the simualted environment @base_frame reference frame of the environment @kin_frame frame respect to all the tf coming from the kinect are publisched """ all_human_ids = utils.humanList(tf) utils.removeHumans(all_human_ids, humans, env) # adding for id in all_human_ids: found = False for human in humans: if human.id == 'user_' + id: found = True break if not found: humans.append(Orhuman('user_' + id, env, base_frame='/map', kin_frame='/head/skel_depth_frame'))
def addRemoveHumans(tf, humans, env, enable_legs=True, segway_sim=True, base_frame='/map', kin_frame='/head/skel_depth_frame2'): """ Add or remove humans in the simulated environment on the basis of the information coming from the kinect @param tf tf @param humans vector of the humans that are loaded into the simualted environment @enable_legs True if the human legs have to be tracked and updated in the simualted env @segway_sim True if the roboto localization is off @base_frame reference frame of the environment @kin_frame frame respect to all the tf coming from the kinect are publisched """ all_human_ids = utils.humanList(tf) utils.removeHumans(all_human_ids, humans, env) # adding for id in all_human_ids: found = False for human in humans: if human.id == 'user_' + id: found = True break if not found: humans.append(Orhuman('user_' + id, env, enable_legs=enable_legs, segway_sim=segway_sim, base_frame=base_frame, kin_frame=kin_frame))