PythonAPI: allow finding single actor by id

This commit is contained in:
nsubiron 2019-06-13 12:19:10 +02:00
parent 9b7159cdbc
commit 84d4b7c5b9
2 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,7 @@
- `apply_settings(world_settings)`
- `get_weather()`
- `set_weather(weather_parameters)`
- `get_actor(actor_id) -> carla.Actor`
- `get_actors(actor_ids=None) -> carla.ActorList`
- `spawn_actor(blueprint, transform, attach_to=None)`
- `try_spawn_actor(blueprint, transform, attach_to=None, attachment_type=carla.AttachmentType.Rigid)`

View File

@ -135,6 +135,7 @@ void export_world() {
.def("apply_settings", &cc::World::ApplySettings)
.def("get_weather", CONST_CALL_WITHOUT_GIL(cc::World, GetWeather))
.def("set_weather", &cc::World::SetWeather)
.def("get_actor", CONST_CALL_WITHOUT_GIL_1(cc::World, GetActor, carla::ActorId), (arg("actor_id")))
.def("get_actors", CONST_CALL_WITHOUT_GIL(cc::World, GetActors))
.def("get_actors", &GetActorsById, (arg("actor_ids")))
.def("spawn_actor", SPAWN_ACTOR_WITHOUT_GIL(SpawnActor))