(self, walkers_list)
| 315 | return None |
| 316 | |
| 317 | def _is_walker_hazard(self, walkers_list): |
| 318 | z = self._vehicle.get_location().z |
| 319 | p1 = _numpy(self._vehicle.get_location()) |
| 320 | v1 = 10.0 * _orientation(self._vehicle.get_transform().rotation.yaw) |
| 321 | |
| 322 | for walker in walkers_list: |
| 323 | v2_hat = _orientation(walker.get_transform().rotation.yaw) |
| 324 | s2 = np.linalg.norm(_numpy(walker.get_velocity())) |
| 325 | |
| 326 | if s2 < 0.05: |
| 327 | v2_hat *= s2 |
| 328 | |
| 329 | p2 = -3.0 * v2_hat + _numpy(walker.get_location()) |
| 330 | v2 = 8.0 * v2_hat |
| 331 | |
| 332 | collides, collision_point = get_collision(p1, v1, p2, v2) |
| 333 | |
| 334 | if collides: |
| 335 | return walker |
| 336 | |
| 337 | return None |
| 338 | |
| 339 | def _is_vehicle_hazard(self, vehicle_list): |
| 340 | z = self._vehicle.get_location().z |
no test coverage detected