(self, pos, theta, target)
| 117 | self._affected_by_stop = False # if the ego vehicle is influenced by a stop sign |
| 118 | |
| 119 | def _get_angle_to(self, pos, theta, target): |
| 120 | R = np.array([ |
| 121 | [np.cos(theta), -np.sin(theta)], |
| 122 | [np.sin(theta), np.cos(theta)], |
| 123 | ]) |
| 124 | |
| 125 | aim = R.T.dot(target - pos) |
| 126 | angle = -np.degrees(np.arctan2(-aim[1], aim[0])) |
| 127 | angle = 0.0 if np.isnan(angle) else angle |
| 128 | |
| 129 | return angle |
| 130 | |
| 131 | def _get_control(self, target, far_target, tick_data): |
| 132 | pos = self._get_position(tick_data) |