Compute the type of connection between the current active waypoint and the multiple waypoints present in list_waypoints. The result is encoded as a list of RoadOption enums. :param list_waypoints: list with the possible target waypoints in case of multiple options :param current_wa
(list_waypoints, current_waypoint)
| 280 | return len(self._waypoints_queue) == 0 and len(self._waypoint_buffer) == 0 |
| 281 | |
| 282 | def _retrieve_options(list_waypoints, current_waypoint): |
| 283 | """ |
| 284 | Compute the type of connection between the current active waypoint and the multiple waypoints present in |
| 285 | list_waypoints. The result is encoded as a list of RoadOption enums. |
| 286 | |
| 287 | :param list_waypoints: list with the possible target waypoints in case of multiple options |
| 288 | :param current_waypoint: current active waypoint |
| 289 | :return: list of RoadOption enums representing the type of connection from the active waypoint to each |
| 290 | candidate in list_waypoints |
| 291 | """ |
| 292 | options = [] |
| 293 | for next_waypoint in list_waypoints: |
| 294 | # this is needed because something we are linking to |
| 295 | # the beggining of an intersection, therefore the |
| 296 | # variation in angle is small |
| 297 | next_next_waypoint = next_waypoint.next(3.0)[0] |
| 298 | link = _compute_connection(current_waypoint, next_next_waypoint) |
| 299 | options.append(link) |
| 300 | |
| 301 | return options |
| 302 | |
| 303 | |
| 304 | def _compute_connection(current_waypoint, next_waypoint, threshold=35): |
no test coverage detected