Open krtt opened 2 years ago
We connect them by noting the position of the map signal controllable. We compare the transform data.
From python api quick scripts 27-control-trafficlights.py
# # Get a list of controllable objects
controllables = sim.get_controllables("signal")
print("\n# List of controllable objects in {} scene:".format(lgsvl.wise.DefaultAssets.map_borregasave))
for c in controllables:
print(c)
signal = sim.get_controllable(lgsvl.Vector(15.5, 4.7, -23.9), "signal")
print("\n# Signal of interest:")
print(signal)
Having 70+ map signals in a single map worries me that your map is too large. It's best to take map sections and test very specific use case test for small areas instead of a large map. You can have issues with memory with a large map.
Sim v2021.3 (Linux)
How to find one specific traffic light on a map (we have ~70 in total) if Python API only has the following information (documentation):
For a controllable object of interest, you can get following information:
But if I want to see in VSE where is the traffic light of my interest, then there is only this info per controllable:
{"uid":"310e0042-66ad-4f60-8029-66e6b54d6e47","policy":[],"spawned":false}
How to connect what is what if one has only transform and other only uid? Unity did not help to connect them either. How do you do it?