class to represent AI controlled dynamic objects.
The simulator only keeps track of the nearest 20 dynamic objects and packs them into the Daq in a haphazard fashion. Daq._process_dynobjs and DynObj.process sort out this data and create a DynObj instance for each dynamic object recorded during the drive.
Attributes
| hcsmType | int | don’t know what this is |
| colorIndex | int | the color of the vehicle |
| solId | int | vehicle type |
| cvedId | int | id unique to drive |
| name | string | name defined in Isat “Ado...” |
| interpolated | bool (int) | whether the data was interpolated |
| frames | np.ndarray | |
| heading | Element | global heading in rads (rotated 90 degrees, need to fix.) |
| speed | Element | vehicle speed in mph |
| roll | Element | roll |
| pitch | Element | pitch |
| pos | Element | global x, y, z coordinates in feet |
| distance | Element | distance traveled since intialized |
| relative_distance | Element | headway distance |
| relative_distance_err | float | error in relative distance estimate (assuming you know apriori the dynamic object travels the same path as the OwnVehicle) |
Methods
| process(cvedId, frame_indices, row_indices, daq) | unpacks data Daq instance |
| write_hd5(self[, filename=None][, root=None]) | writes DynObj to hdf5. |
| read_hd5(self[, filename=None][, root=None]) | reads a DynObj from a hdf5 file |
unpacks data from the SCC_DynObj* Elements
| Parameters : | cvedId : int
frame_indices : array_like
row_indices : array_like
daq : Daq
|
|---|
Notes
This should really be a private method.
writes DynObj to hdf5.
| Parameters : | filename : string
root : h5py.File
|
|---|
reads a DynObj from a hdf5 file.
| Parameters : | filename : string
root : h5py.File
|
|---|
provides dicionary-esque access to the Element Attributes
provides dicionary-esque access to the Element Attributes
provides dicionary-esque access to the Element Attributes