reinforcement-learning icon indicating copy to clipboard operation
reinforcement-learning copied to clipboard

AttributeError: 'NoneType' object has no attribute 'x'

Open histfuture opened this issue 6 years ago • 1 comments

Hey , I run the RL benchmark with

python run_RL.py --corl-2017

In which my python environment is set by

conda create -n carla_rl python=3.6 chainer=1.24.0 cached-property=1.4.2 pillow=5.1.0 opencv=3.3.1 h5py=2.7.1

An error occurs with

Traceback (most recent call last):
  File "run_RL.py", line 89, in <module>
    args.host, args.port)
  File "/home/ng/Projects/CARLA_0.8.2/PythonClient/carla/driving_benchmark/driving_benchmark.py", line 294, in run_driving_benchmark
    benchmark_summary = benchmark.benchmark_agent(experiment_suite, agent, client)
  File "/home/ng/Projects/CARLA_0.8.2/PythonClient/carla/driving_benchmark/driving_benchmark.py", line 121, in benchmark_agent
    self._get_shortest_path(positions[start_index], positions[end_index]))
  File "/home/ng/Projects/CARLA_0.8.2/PythonClient/carla/driving_benchmark/driving_benchmark.py", line 182, in _get_shortest_path
    end_point.orientation.x, end_point.orientation.y, end_point.orientation.z])
  File "/home/ng/Projects/CARLA_0.8.2/PythonClient/carla/planner/planner.py", line 114, in get_shortest_path_distance
    track_target, target_ori)
  File "/home/ng/Projects/CARLA_0.8.2/PythonClient/carla/planner/city_track.py", line 91, in compute_route
    route = a_star.solve()
  File "/home/ng/Projects/CARLA_0.8.2/PythonClient/carla/planner/astar.py", line 142, in solve
    return self.get_path()
  File "/home/ng/Projects/CARLA_0.8.2/PythonClient/carla/planner/astar.py", line 111, in get_path
    path.append((cell.x, cell.y))
AttributeError: 'NoneType' object has no attribute 'x'

Any ideas?

histfuture avatar May 07 '18 02:05 histfuture

I know it's been a while since this issue has been opened but maybe this may help others facing same issue ...

Maybe you've run the server in another town then Town01 which is by default used by the client ? Client and server should run same version of carla and in the same Town (01 or 02). I had this same error when I ran carla server chosing Town02 and forgot to precise it in carla client options.

Hope this helps!

d34dl0ckk avatar Dec 12 '19 13:12 d34dl0ckk