Carla: how to see the definition of the Python API functions

Created on 21 Jun 2019  路  8Comments  路  Source: carla-simulator/carla

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!

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.

All 8 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robertnishihara picture robertnishihara  路  4Comments

phzeller picture phzeller  路  3Comments

AftermathK picture AftermathK  路  3Comments

chankim picture chankim  路  3Comments

metaluga145 picture metaluga145  路  4Comments