コード例 #1
0
ファイル: dataset_decomposer.py プロジェクト: valaxkong/bark
 def __setup_agents_track_infos__(self):
     # dictionary mapping first valid timestamp to agnet id
     agents_track_infos = {}
     for agent_id in self._track_dict.keys():
         # TODO: this could be made optional
         first_ts_on_map = self.__find_first_ts_on_map__(agent_id)
         if first_ts_on_map is None:
             print("Agent %d not found on map" % agent_id)
             pass
         else:
             start_offset = first_ts_on_map
             end_offset = self._track_dict[agent_id].time_stamp_ms_last
             new_agent = AgentTrackInfo(filename=self._track_filename,
                                        track_id=agent_id,
                                        start_offset=start_offset,
                                        end_offset=end_offset)
             agents_track_infos[agent_id] = new_agent
     return agents_track_infos