Open ZiyuZ opened 1 month ago
CARLA version: 0.9.15 Platform/OS: Python Code Problem you have experienced: Incorrect Vector Rotation Calculation
I found an issue in the carla/agents/tools/misc.py file regarding the calculation of rotated vectors. The relevant code is as follows:
carla/agents/tools/misc.py
rotated_x = math.cos(radians) * x - math.sin(radians) * y rotated_y = math.sin(radians) * x - math.cos(radians) * y
The calculation for rotated_y should be rotated_y = math.sin(radians) * x + math.cos(radians) * y
rotated_y
rotated_y = math.sin(radians) * x + math.cos(radians) * y
btw, in Line 60
point = rotate_point(carla.Vector3D(0, 0, area_ext.z), math.radians(base_rot))
This seems to do nothing because both x and y are 0.
CARLA version: 0.9.15 Platform/OS: Python Code Problem you have experienced: Incorrect Vector Rotation Calculation
I found an issue in the
carla/agents/tools/misc.py
file regarding the calculation of rotated vectors. The relevant code is as follows:The calculation for
rotated_y
should berotated_y = math.sin(radians) * x + math.cos(radians) * y