src.Record package¶
Submodules¶
src.Record.frame module¶
-
class
src.Record.frame.
Frame
[source]¶ Bases:
object
-
delete_by_id
(id: int)[source]¶ - Parameters
id – the id of the vehicle that you want to delete
- Returns
no return
-
deleteat
(entity_index: int)[source]¶ - Parameters
entity_index – the index of the vehicle that we want to delete
- Returns
no return
-
src.Record.record module¶
-
class
src.Record.record.
ListRecord
(timestep: float, frames: list, states: list, defs: dict)[source]¶ Bases:
object
-
n_objects_in_frame
(frame_index: int)[source]¶ - Parameters
frame_index – the index of the frame
- Returns
the length of the frame given the index
-
property
nframes
¶ - Returns
the number of all the frames
-
property
nids
¶ - Returns
the number of all the vehicles
-
property
nstates
¶ - Returns
the number of all the states
-
-
class
src.Record.record.
RecordState
(state: src.Basic.Vehicle.VehicleState, id: int)[source]¶ Bases:
object
used to record the information of a state
-
class
src.Record.record.
SceneRecord
[source]¶ Bases:
object
-
property
capacity
¶ - Returns
capacity of the SceneRecord object
-
init
(capacity: int, timestep: float, frame_capacity: int = 100)[source]¶ Initializing the SceneRecord object :param capacity: the capacity of the object :param timestep: timestep indicator :param frame_capacity: the capacity of a single frame :return:
-
property
-
src.Record.record.
frame_inbounds
(rec: src.Record.record.ListRecord, frame_index: int)[source]¶ check if the index is in bound :param rec: ListRecord :param frame_index: index of the frame to be checked :return: false if out of bound true otherwise
-
src.Record.record.
get_def
(rec: src.Record.record.ListRecord, id: int)[source]¶ get the vehicle definition given a query id :param rec: ListRecord object :param id: query id :return: the vehicle definition for the query id
-
src.Record.record.
get_elapsed_time_3
(rec: src.Record.record.SceneRecord, pastframe_farthest_back: int, pastframe_most_recent: int)[source]¶
-
src.Record.record.
get_scene
(frame: src.Record.frame.Frame, rec: src.Record.record.ListRecord, frame_index: int)[source]¶ get the scene given a query frame index :param frame: the buffer for the frame :param rec: the ListRecord object :param frame_index: the frame index :return: the frame for the query index
-
src.Record.record.
get_vehicle
(rec: src.Record.record.ListRecord, stateindex: int)[source]¶ get vehicle state given a state index :param rec: ListRecord object :param stateindex: query state index :return: the vehicle state for the query state index
-
src.Record.record.
pastframe_inbounds
(rec: src.Record.record.SceneRecord, pastframe: int)[source]¶ check if the query pastframe is out of bound :param rec: SceneRecord :param pastframe: the query pastframe number :return: false if out of bound true otherwise