(
ax,
center,
heading,
width,
length,
steer=0.0,
color="pink",
fill=True,
wheel=True,
**kwargs,
)
| 265 | |
| 266 | |
| 267 | def plot_sdc( |
| 268 | ax, |
| 269 | center, |
| 270 | heading, |
| 271 | width, |
| 272 | length, |
| 273 | steer=0.0, |
| 274 | color="pink", |
| 275 | fill=True, |
| 276 | wheel=True, |
| 277 | **kwargs, |
| 278 | ): |
| 279 | vec_heading = np.array([np.cos(heading), np.sin(heading)]) |
| 280 | vec_tan = np.array([np.sin(heading), -np.cos(heading)]) |
| 281 | |
| 282 | front_left_wheel = center + 1.419 * vec_heading + 0.35 * width * vec_tan |
| 283 | front_right_wheel = center + 1.419 * vec_heading - 0.35 * width * vec_tan |
| 284 | wheel_heading = heading + steer |
| 285 | wheel_size = (0.8, 0.3) |
| 286 | |
| 287 | plot_box( |
| 288 | ax, center, heading, color=color, fill=fill, bbox_size=(length, width), **kwargs |
| 289 | ) |
| 290 | |
| 291 | if wheel: |
| 292 | plot_box( |
| 293 | ax, |
| 294 | front_left_wheel, |
| 295 | wheel_heading, |
| 296 | color="k", |
| 297 | fill=True, |
| 298 | bbox_size=wheel_size, |
| 299 | **kwargs, |
| 300 | ) |
| 301 | plot_box( |
| 302 | ax, |
| 303 | front_right_wheel, |
| 304 | wheel_heading, |
| 305 | color="k", |
| 306 | fill=True, |
| 307 | bbox_size=wheel_size, |
| 308 | **kwargs, |
| 309 | ) |
| 310 | |
| 311 | |
| 312 | def plot_lane_area(ax, left_bound, right_bound, fc="silver", alpha=1.0, ec=None): |
nothing calls this directly
no test coverage detected