MCPcopy Index your code
hub / github.com/AtsushiSakai/PythonRobotics / plot_car

Function plot_car

PathPlanning/HybridAStar/car.py:70–84  ·  view source on GitHub ↗
(x, y, yaw)

Source from the content-addressed store, hash-verified

68
69
70def plot_car(x, y, yaw):
71 car_color = '-k'
72 c, s = cos(yaw), sin(yaw)
73
74 car_outline_x, car_outline_y = [], []
75 for rx, ry in zip(VRX, VRY):
76 tx = c * rx - s * ry + x
77 ty = s * rx + c * ry + y
78 car_outline_x.append(tx)
79 car_outline_y.append(ty)
80
81 arrow_x, arrow_y, arrow_yaw = c * 1.5 + x, s * 1.5 + y, yaw
82 plot_arrow(arrow_x, arrow_y, arrow_yaw)
83
84 plt.plot(car_outline_x, car_outline_y, car_color)
85
86
87def pi_2_pi(angle):

Callers 2

mainFunction · 0.90
car.pyFile · 0.70

Calls 2

plot_arrowFunction · 0.70
plotMethod · 0.45

Tested by

no test coverage detected