Strange behavior of the carla spectator #9293
gunki-geek
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I implemented this simple code to test the spectator. However the spectator view is not aligned with the vehicle view. The car is looking forward while the spectator is looking backward.
`import carla
import math
import time
client = carla.Client('localhost', 2000)
client.set_timeout(10.0)
world = client.get_world()
blueprint_library = world.get_blueprint_library()
vehicle_bp = blueprint_library.filter('vehicle')[0]
spawn_point = world.get_map().get_spawn_points()[0]
vehicle = world.spawn_actor(vehicle_bp, spawn_point)
car_transform = vehicle.get_transform()
spectator = world.get_spectator()
while(True):
spectator.set_transform(car_transform)`
I am using carla 0.9.16
Beta Was this translation helpful? Give feedback.
All reactions