Hi,
is there possible to see the definition of all the python API functions? In order to use these API functions, I need to know more about how it works internally and what is the return value. So can somebody tell me how to see that?
Thank you very much!
Carla_home/PythonAPI/agents
Hey Zwbai ,
About the "python API functions" , I didn't find anywhere proper definitions . As far I understand in Carla_home/PythonAPI/agents you will find some python classes build on the API . So I guess at the moment we have to learn it by trying and reading what has been already done :)
Most of the Python API methods are actually implemented in C++ in LibCarla/source/carla/client, then exposed to Python using the bindings in PythonAPI/carla/source/libcarla.
Thank you very much @nsubiron , here comes to my next question: can I modify the python API and rebuild them? I mean if I want to modify some API can I just change the code in LibCarla/source/carla/client and PythonAPI/carla/source/libcarla and then rebuild them? Thanks a lot! :D
@zwbai of course, run make PythonAPI in the root folder to rebuild the Python module.
@nsubiron thanks a lot, maybe I have too many questions. but I really want to know how to get the light information of a certain traffic light even when the light is green. the vehicle.get_traffic_light_state() will only return the light information when the vehicle.is_at_traffic_light() is activated, which is not activated when the light is green. similar question with issue#1799, but I really want to know that it is important for my project now. Thank you very much!
@zwbai commented in #1799.
@nsubiron Thank you very much! Maybe some question in the future and this issue is closed now.
Most helpful comment
Most of the Python API methods are actually implemented in C++ in LibCarla/source/carla/client, then exposed to Python using the bindings in PythonAPI/carla/source/libcarla.