pyCarDisplay.sensors package

Submodules

pyCarDisplay.sensors.image_processing_api module

class pyCarDisplay.sensors.image_processing_api.ImageProcessing(car_images_path: str, image_extension='png')[source]

Bases: object

synch_objDet_depDet_data(depth_image)[source]

Takes in object locations in a snapshot and the depth image to return depth heatmap of the objects.

Args:

param1: list of the object locations found in object detection machine learning model. param2: image returned from depth detection machine learning model.

Returns:

list of cropped images at the location of the object detection and the depth rendering of the depth detection model.

take_picture(frame: int)[source]

pyCarDisplay.sensors.imu_api module

This file simulates an IMU sensor. Data must be loaded from kitti_data_loader_api.py and passed to this module.

class pyCarDisplay.sensors.imu_api.IMU(data, verbose=True, R_covariance=0.1, random_state=42)[source]

Bases: object

Initilie the IMU sensor.

datapd.DataFrame

Pandas DataFrame of IMU data.

verbosebool, optional

Verbosity flag. The default is True.

R_covariancefloat, optional

Covariance for the random error. The default is 0.1.

random_statebool, optional

random seed. The default is 42.

None.

get_R()[source]

Returns the error covariance.

float

Error covariance.

get_avail_data()[source]

Returns the available IMU features, i.e. column names.

list

names of the IMU columns.

get_column(name: str)[source]

Returns all the frame data for one column.

namestr

column name.

pd.DataFrame

one column from the dataframe.

get_params()[source]

Returns the object variables.

dict

self variables.

read_sensor(name=None, add_noise=True, advance_frame=True)[source]

Simulates reading one IMU sensor data and increments the frame.

namestr, optional

Specify to read specific IMU data. The default is None.

add_noisebool, optional

If True, error is added to the data. The default is True.

advance_framebool, optional

If True, frame is advanced to the next one. The default is True.

dict

{"data": data, "noise": noise, "true": data-noise}.

set_frame(frame: int)[source]

manually set the frame,

frameint

frame number.

None.

pyCarDisplay.sensors.kalman_filter_api module

Kalman filter definition to smooth out noise in sensor readings

class pyCarDisplay.sensors.kalman_filter_api.KalmanFilter(P=1, H=1, F=1, Q=0.1)[source]

Bases: object

Initialize the Kalman filter data

P : covariance of the observation noise H : observation model F : state-transition model Q : covariance of the process noise

Predict(acceleration, speed_previous, delta_time)[source]

Initialize the Kalman filter data

Pint

covariance of the observation noise

Hint

observation model

Fint

state-transition model

Qfloat

covariance of the process noise

None

Update(speed_data_from_sensor, R, speed_predict)[source]

Update kalman filter variables and dat**apoint

speed_data_from_sensorfloat

sensor data read

Rfloat

covariance

speed_predictfloat

predicted datapoint

speed_fused : data point thathas been filtered

Module contents