This method creates a list of waypoints from agent's position to destination location based on the route returned by the global router
(self, location)
| 45 | self._grp = None |
| 46 | |
| 47 | def set_destination(self, location): |
| 48 | """ |
| 49 | This method creates a list of waypoints from agent's position to destination location |
| 50 | based on the route returned by the global router |
| 51 | """ |
| 52 | |
| 53 | start_waypoint = self._map.get_waypoint(self._vehicle.get_location()) |
| 54 | end_waypoint = self._map.get_waypoint( |
| 55 | carla.Location(location[0], location[1], location[2])) |
| 56 | |
| 57 | route_trace = self._trace_route(start_waypoint, end_waypoint) |
| 58 | |
| 59 | self._local_planner.set_global_plan(route_trace) |
| 60 | |
| 61 | def _trace_route(self, start_waypoint, end_waypoint): |
| 62 | """ |
no test coverage detected