- python 3
- yaml
- opencv
- matplotlib
Testing Environment(macOS)
- python 3.6
- yaml 0.1.7
- Opencv 3.4.2
- Enter the project folder
- Open command line,and type in following command( just as an example):
python track_line_generator.py --tread 1.832 --wheelbase 2.871 --front_wheel_to_head_d 0.89 --head_height 0.68 --camera_yaml_path your_yaml_file_path --video_path your_video_path
Or you could type in python track_line_generator.py -h
for help:
usage: track_line_generator.py [-h] -t -w -f -e -c -v
optional arguments:
-h, --help show this help message and exit
-t, --tread car width (meters)
-w, --wheelbase distance between the front and rear axles of a vehicle
-f, --front_wheel_to_head_d
distance between front wheel center and car head
-e, --head_height
z position of the point in the car head
-c, --camera_yaml_path
yaml file path for camera configuration
-v, --video_path video path
from track_line_generator.py import NewTrackLineGenerator
base_param = BaseParam(tread, wheelbase, head_height, front_wheel_to_head_d, param_yaml_path)
track_line_generator = NewTrackLineGenerator(base_param)
left_line,right_line = track_line_generator.add_track_line(steer_angle)
Sample results cannot be displayed due to data privacy.
Deficiencies
-
trajectory equation
-
Curve left:
$\left.x^{2}+(y+wheelbase * \cot (\phi)\right)^{2}=r_{L}^{2}$ Curve Right:$x^{2}+(y+wheelbase * \cot (\phi))^{2}=r_{R}^{2}$ -
$r_{L}^{2} = \left(wheelbase * \cot (\phi)+\frac{tread}{2}\right)^{2}+(wheelbase + front_wheel_to_head )^{2}$ $r_{R}^{2} = \left(wheelbase * \cot (\phi)-\frac{tread}{2}\right)^{2}+(wheelbase + front_wheel_to_head )^{2}$
-
-
transform matrix is estimated without considering distortion
$\mathcal{D}$ -
$X_{w}, Y_{w}, Z_{w}$ is the coordinates of track point in the real world (under vehicle coordinate system). -
$u,v$ is the coordinates of pixel point corresponding to$X_{w}, Y_{w}, Z_{w}$ .
-
Bugs
- The current change matrix is fixed. However, translation vector should be different with the one obtained afther calibration, and we doesn't know the plane's position when calibration.