lgsvl / simulator

A ROS/ROS2 Multi-robot Simulator for Autonomous Vehicles
Other
2.26k stars 778 forks source link

Can't run any PythonAPI quickstart examples that use raycast. #422

Closed benjamin-muhari closed 4 years ago

benjamin-muhari commented 4 years ago

I get the following error whenever i run any of the examples which include sim.raycast():

File "C:\Users\Beni\Anaconda3\lib\site-packages\lgsvl-0.0.0-py3.7.egg\lgsvl\simulator.py", line 216, in raycast if hit[0] is None:

TypeError: 'NoneType' object is not subscriptable


LGSVL version: 2019.09. PythonApi version: lgsvl.0.0.0

I'm running the simulator from the windows executable (not building from Unity). My pyApi version looks weird, but other examples not using raycast work correctly.

hadiTab commented 4 years ago

@mmarco9771 It seems like you have cloned the latest python API from master. If that is the case, master includes changes that were not part of the 2019.09 release (which your binary build is from). Please download and use the version of the pythonAPI for the release (you can find them here).

Yes, we should fix the versioning of the PythonAPI in the setup.py file as well. Thanks for the catch.

benjamin-muhari commented 4 years ago

Thanks for the quick response, cloning from master was indeed the source of the problem.