简体   繁体   English

在 Carla 模拟器中制造一些交通危险

[英]Making some traffic hazard in Carla simulator

In Carla simulator I can make some traffic using generate_traffic.py But I want to make some cars or pedestrians ignoring traffic lights.在 Carla 模拟器中,我可以使用 generate_traffic.py 进行一些交通,但我想让一些汽车或行人忽略交通信号灯。 In this case what code should I change?在这种情况下,我应该更改什么代码?

If you are using any class derived from BasicAgent (PythonAPI\carla\agents\navigation\basic_agent.py) to control the generated actors, then you can pass ignore_traffic_lights = True to opt_dict constructor parameter.如果您使用从BasicAgent (PythonAPI\carla\agents\navigation\basic_agent.py)派生的任何 class 来控制生成的 actor,那么您可以将ignore_traffic_lights = True传递给opt_dict构造函数参数。 Also, you can alter the following function of BasicAgent in order to customize the actors affected by traffic lights.此外,您可以更改 BasicAgent 的以下BasicAgent以自定义受红绿灯影响的参与者。

def _affected_by_traffic_light(self, lights_list=None, max_distance=None):

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python如何与Carla模拟器建立数据通信? - How to establish data communication between Python and the Carla simulator? Carla 模拟器中的 XMLSchemaChildrenValidationError (Python 3.7) - XMLSchemaChildrenValidationError in Carla simulator (Python 3.7) 如何在 google colab 中安装 carla 模拟器 - how to install carla simulator in google colab 是否可以在 Google Linux VM 实例中运行 Carla 模拟器 - Is it possible to run Carla simulator in Google Linux VM instance 如何理解 carla 模拟器中的模拟时间和时间步长 - How to understand simulation time and time step in carla simulator CARLA/UE4 中的随机图像翻转 - Random image flipping in CARLA/UE4 CARLA rgb摄像头传感器的output格式是什么 - What is the output format of CARLA rgb camera sensor 在 Windows 10 上重建 Carla(驾驶模拟器)时出现 libintl3.dll 错误 - libintl3.dll error while rebuilding Carla ( a driving Simulator ) on Windows 10 Carla 模拟器依赖于虚幻引擎? 有没有其他开源实时 3D 创建平台可用? - Carla simulator dependent on Unreal engine? Any alternative open source real-time 3D creation platform are available? 如何改变卡拉 map 道路坡度 - how to change carla map road slope
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM