Skip to content

Commit

Permalink
Fix: wrong initial transform when using request_new_batch_actors (#1068
Browse files Browse the repository at this point in the history
…) (#1075)

See: #1068

Co-authored-by: Daraan <[email protected]>
  • Loading branch information
glopezdiest and Daraan committed Apr 26, 2024
1 parent 2c9ea92 commit 382fb79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions srunner/scenariomanager/carla_data_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,11 +860,11 @@ def request_new_batch_actors(model, amount, spawn_points, autopilot=False,
SetAutopilot(FutureActor, autopilot, CarlaDataProvider._traffic_manager_port)))

actors = CarlaDataProvider.handle_actor_batch(batch, tick)
for actor in actors:
for actor, command in zip(actors, batch):
if actor is None:
continue
CarlaDataProvider._carla_actor_pool[actor.id] = actor
CarlaDataProvider.register_actor(actor, spawn_point)
CarlaDataProvider.register_actor(actor, command.transform)

return actors

Expand Down

0 comments on commit 382fb79

Please sign in to comment.