rotate a given point by a given angle
(point, radians)
| 112 | Calculates the yaw of the waypoint that represents the trigger volume of the traffic light |
| 113 | """ |
| 114 | def rotate_point(point, radians): |
| 115 | """ |
| 116 | rotate a given point by a given angle |
| 117 | """ |
| 118 | rotated_x = math.cos(radians) * point.x - math.sin(radians) * point.y |
| 119 | rotated_y = math.sin(radians) * point.x - math.cos(radians) * point.y |
| 120 | |
| 121 | return carla.Vector3D(rotated_x, rotated_y, point.z) |
| 122 | |
| 123 | base_transform = traffic_light.get_transform() |
| 124 | base_rot = base_transform.rotation.yaw |
nothing calls this directly
no outgoing calls
no test coverage detected