gym-carla
gym-carla copied to clipboard
AttributeError: 'LidarDetection' object has no attribute 'x'
Traceback (most recent call last):
File "C:/Users/wxk/Desktop/saccode/carla/test.py", line 55, in
Maybe ur CARLA version like me, is not 0.9.6. u can try add 'location = location.point' before 'point_cloud.append([location.x, location.y, -location.z])' at line 499 in 'carla_env.py'.
This problem is that your CARLA version is not 0.9.6, more like 0.9.8 or 0.9.10.
@xiaowang304 your CARLA version look at not 0.9.6, other version I've solved this problem with this setting: change this line,
point_cloud.append([location.x, location.y, -location.z])
to the line,
point_cloud.append([location.point.x, location.point.y, location.point.z])
at line 499 in 'carla_env.py'.
More precisely, in Carla0.9.14, this should be changed to
point_cloud.append([location.point.y, -location.point.x,-location.point.z])
to ensure that the visualization is correct at the same time
I met the same question too,however it's no use for me when I change the code, and my brand is 0.9.13