@@ -770,7 +770,7 @@ Y 像素坐标。
770
770
- ` thickness ` (_ float<small > - 米</small >_ ) - 线的密度。
771
771
- ` arrow_size ` (_ float<small > - 米</small >_ ) - 箭头尖端的大小。
772
772
- ` color ` (_ [ carla.Color] ( #carla.Color ) _ ) - 用于为对象着色的 RGB 代码。默认为红色。
773
- - ` life_time ` (_ float<small > - seconds </small >_ ) - 形状的生命周期。默认情况下它只持续一帧。将其设置<code >0</code >为永久形状。
773
+ - ` life_time ` (_ float<small > - 秒 </small >_ ) - 形状的生命周期。默认情况下它只持续一帧。将其设置<code >0</code >为永久形状。
774
774
- <a name =" carla.DebugHelper.draw_box " ></a >** <font color =" #7fb800 " >draw_box</font >** (<font color =" #00a6ed " >** self** </font >, <font color =" #00a6ed " >** box** </font >, <font color =" #00a6ed " >** rotation** </font >, <font color =" #00a6ed " >** thickness** =0.1</font >, <font color =" #00a6ed " >** color** =(255,0,0)</font >, <font color =" #00a6ed " >** life_time** =-1.0</font >)<button class =" SnipetButton " id =" carla.DebugHelper.draw_box-snipet_button " >snippet &rarr ; </button >
775
775
绘制一个框,通常用于对象碰撞体。
776
776
- ** 参数:**
@@ -825,15 +825,15 @@ Y 像素坐标。
825
825
- ` location ` (_ [ carla.Location] ( #carla.Location ) <small > - 米</small >_ ) - 在坐标系中点以将对象居中。
826
826
- ` size ` (_ float<small > - 米</small >_ ) - 点的密度。
827
827
- ` color ` (_ [ carla.Color] ( #carla.Color ) _ ) - 用于为对象着色的 RGB 代码。默认为红色。
828
- - ` life_time ` (_ float<small > - seconds </small >_ ) - 形状的生命周期。默认情况下它只持续一帧。将其设置<code >0</code >为永久形状。
828
+ - ` life_time ` (_ float<small > - 秒 </small >_ ) - 形状的生命周期。默认情况下它只持续一帧。将其设置<code >0</code >为永久形状。
829
829
- <a name =" carla.DebugHelper.draw_string " ></a >** <font color =" #7fb800 " >draw_string</font >** (<font color =" #00a6ed " >** self** </font >, <font color =" #00a6ed " >** location** </font >, <font color =" #00a6ed " >** text** </font >, <font color =" #00a6ed " >** draw_shadow** =False</font >, <font color =" #00a6ed " >** color** =(255,0,0)</font >, <font color =" #00a6ed " >** life_time** =-1.0</font >)<button class =" SnipetButton " id =" carla.DebugHelper.draw_string-snipet_button " >snippet &rarr ; </button >
830
830
在模拟的给定位置绘制一个字符串,该字符串只能在服务器端看到。
831
831
- ** 参数:**
832
832
- ` location ` (_ [ carla.Location] ( #carla.Location ) <small > - 米</small >_ ) - 模拟中文本居中的位置。
833
833
- ` text ` (_ str_ ) - 旨在向世界展示的文本。
834
834
- ` draw_shadow ` (_ bool_ ) - 为字符串投射阴影,有助于可视化。默认情况下它是禁用的。
835
835
- ` color ` (_ [ carla.Color] ( #carla.Color ) _ ) - 用于为字符串着色的 RGB 代码。默认为红色。
836
- - ` life_time ` (_ float<small > - seconds </small >_ ) - 形状的生命周期。默认情况下它只持续一帧。将其设置<code >0</code >为永久形状。
836
+ - ` life_time ` (_ float<small > - 秒 </small >_ ) - 形状的生命周期。默认情况下它只持续一帧。将其设置<code >0</code >为永久形状。
837
837
- <a name =" carla.DebugHelper.clear_debug_shape " ></a >** <font color =" #7fb800 " >clear_debug_shape</font >** (<font color =" #00a6ed " >** self** </font ></font >)
838
838
清除模拟器上的所有调试形状。
839
839
- <a name =" carla.DebugHelper.clear_debug_string " ></a >** <font color =" #7fb800 " >clear_debug_string</font >** (<font color =" #00a6ed " >** self** </font ></font >)
@@ -913,6 +913,7 @@ Alpha 通道。
913
913
如果不允许静态闪电,Alpha 通道将包含环境光遮挡。
914
914
- <a name =" carla.GBufferTextureID.GBufferD " ></a >** <font color =" #f8805a " >GBufferD</font >**
915
915
“GBufferD”的内容根据渲染对象的材质着色模型 (GBufferB) 的不同而有所不同:<br >
916
+
916
917
- MSM_Subsurface (2), MSM_PreintegratedSkin (3), MSM_TwoSidedFoliage (6):<br >
917
918
RGB: 次表面颜色。<br >
918
919
A: 不透明度。<br >
@@ -931,6 +932,7 @@ Alpha 通道。
931
932
RG: 眼切线。<br >
932
933
B: 虹膜掩模。<br >
933
934
A: 虹膜距离。
935
+
934
936
- <a name =" carla.GBufferTextureID.GBufferE " ></a >** <font color =" #f8805a " >GBufferE</font >**
935
937
纹理“GBufferE”包含 RGBA 通道中预先计算的阴影因子。如果选择性输出掩码 (GBufferB) 没有设置其第 4 位,则此纹理不可用。
936
938
- <a name =" carla.GBufferTextureID.GBufferF " ></a >** <font color =" #f8805a " >GBufferF</font >**
@@ -2484,10 +2486,10 @@ _</font>
2484
2486
返回一个路径点列表,指示交通信号灯产生影响的位置和车道。
2485
2487
- ** 返回:** _ list([ carla.Waypoint] ( #carla.Waypoint ) )_
2486
2488
- <a name =" carla.TrafficLight.get_elapsed_time " ></a >** <font color =" #7fb800 " >get_elapsed_time</font >** (<font color =" #00a6ed " >** self** </font >)
2487
- 客户端根据上次滴答信息返回自当前灯光状态开始以来的时间 (秒)。该方法不调用模拟器。
2489
+ 客户端根据上次节拍信号返回自当前灯光状态开始以来的时间 (秒)。该方法不调用模拟器。
2488
2490
- ** 返回:** _ float<small > - seconds</small >_
2489
2491
- <a name =" carla.TrafficLight.get_green_time " ></a >** <font color =" #7fb800 " >get_green_time</font >** (<font color =" #00a6ed " >** self** </font >)
2490
- 客户端根据最后一个滴答信息返回为绿灯设置的时间 。该方法不调用模拟器。
2492
+ 客户端根据最后一个节拍信号返回为绿灯设置的时间 。该方法不调用模拟器。
2491
2493
- ** 返回:** _ float<small > - seconds</small >_
2492
2494
- ** 设置器:** _ [ carla.TrafficLight.set_green_time] ( #carla.TrafficLight.set_green_time ) _
2493
2495
- <a name =" carla.TrafficLight.get_group_traffic_lights " ></a >** <font color =" #7fb800 " >get_group_traffic_lights</font >** (<font color =" #00a6ed " >** self** </font >)
@@ -2505,18 +2507,18 @@ _</font>
2505
2507
返回将其标识为交叉口交通信号灯组一部分的杆的索引。
2506
2508
- ** 返回:** _ int_
2507
2509
- <a name =" carla.TrafficLight.get_red_time " ></a >** <font color =" #7fb800 " >get_red_time</font >** (<font color =" #00a6ed " >** self** </font >)
2508
- 客户端根据最后一个滴答信息返回交通信号灯变红的时间设置 。该方法不调用模拟器。
2510
+ 客户端根据最后一个节拍信号返回交通信号灯变红的时间设置 。该方法不调用模拟器。
2509
2511
- ** 返回:** _ float<small > - seconds</small >_
2510
2512
- ** 设置器:** _ [ carla.TrafficLight.set_red_time] ( #carla.TrafficLight.set_red_time ) _
2511
2513
- <a name =" carla.TrafficLight.get_state " ></a >** <font color =" #7fb800 " >get_state</font >** (<font color =" #00a6ed " >** self** </font >)
2512
- 客户端根据最后一个滴答信息返回交通信号灯的状态 。该方法不调用模拟器。
2514
+ 客户端根据最后一个节拍信号返回交通信号灯的状态 。该方法不调用模拟器。
2513
2515
- ** 返回:** _ [ carla.TrafficLightState] ( #carla.TrafficLightState ) _
2514
2516
- ** 设置起:** _ [ carla.TrafficLight.set_state] ( #carla.TrafficLight.set_state ) _
2515
2517
- <a name =" carla.TrafficLight.get_stop_waypoints " ></a >** <font color =" #7fb800 " >get_stop_waypoints</font >** (<font color =" #00a6ed " >** self** </font >)
2516
2518
返回指示交通信号灯停止位置的路点列表。这些路点是根据交通信号灯的触发框计算出来的,这些触发框指示车辆应该停在哪里。
2517
2519
- ** 返回:** _ list([ carla.Waypoint] ( #carla.Waypoint ) )_
2518
2520
- <a name =" carla.TrafficLight.get_yellow_time " ></a >** <font color =" #7fb800 " >get_yellow_time</font >** (<font color =" #00a6ed " >** self** </font >)
2519
- 客户端根据最后一个滴答信息返回为交通信号灯设置为黄色的时间 。该方法不调用模拟器。
2521
+ 客户端根据最后一个节拍信号返回为交通信号灯设置为黄色的时间 。该方法不调用模拟器。
2520
2522
- ** 返回:** _ float<small > - 秒</small >_
2521
2523
- ** 设置器:** _ [ carla.TrafficLight.set_yellow_time] ( #carla.TrafficLight.set_yellow_time ) _
2522
2524
@@ -3710,7 +3712,7 @@ _</font>
3710
3712
- <a name =" carla.World.wait_for_tick " ></a >** <font color =" #7fb800 " >wait_for_tick</font >** (<font color =" #00a6ed " >** self** </font >, <font color =" #00a6ed " >** seconds** =10.0</font >)
3711
3713
该方法使用 [ 异步模式] ( adv_synchrony_timestep.md ) 。它使客户端等待服务器的节拍信号。当计算下一帧时,服务器将发出节拍信号并返回描述世界新状态的快照。
3712
3714
- ** 参数:**
3713
- - ` seconds ` (_ float<small > - seconds </small >_ ) - 服务器等待滴答的最长时间 。默认设置为 <code >10.0</code >。
3715
+ - ` seconds ` (_ float<small > - 秒 </small >_ ) - 服务器等待节拍信号的最长时间 。默认设置为 <code >10.0</code >。
3714
3716
- ** 返回:** _ [ carla.WorldSnapshot] ( #carla.WorldSnapshot ) _
3715
3717
3716
3718
##### 设置器
@@ -3823,7 +3825,7 @@ _</font>
3823
3825
3824
3826
### 实例变量
3825
3827
- <a name =" carla.WorldSettings.synchronous_mode " ></a >** <font color =" #f8805a " >synchronous_mode</font >** (_ bool_ )
3826
- 表示客户端和服务器之间的同步。当设置为 true 时,服务器将等待客户端滴答以便继续前进 。默认情况下为 false。
3828
+ 表示客户端和服务器之间的同步。当设置为 true 时,服务器将等待客户端节拍信号以便继续前进 。默认情况下为 false。
3827
3829
- <a name =" carla.WorldSettings.no_rendering_mode " ></a >** <font color =" #f8805a " >no_rendering_mode</font >** (_ bool_ )
3828
3830
启用后,模拟将根本不运行渲染。这主要用于避免繁忙交通模拟期间的开销。默认情况下为 false。
3829
3831
- <a name =" carla.WorldSettings.fixed_delta_seconds " ></a >** <font color =" #f8805a " >fixed_delta_seconds</font >** (_ float_ )
@@ -4253,9 +4255,9 @@ Actor affected by the command.
4253
4255
- ` transform ` (_ [ carla.Transform] ( #carla.Transform ) _ )
4254
4256
- ` parent ` (_ [ carla.Actor] ( #carla.Actor ) or int_ )
4255
4257
- <a name =" command.SpawnActor.then " ></a >** <font color =" #7fb800 " >then</font >** (<font color =" #00a6ed " >** self** </font >, <font color =" #00a6ed " >** command** </font >)
4256
- 链接一个其他将要立刻执行的命令。它允许ease非常常见的流 ,比如通过命令生成一组车辆,并使用该方法设置自动驾驶。
4258
+ 链接一个其他将要立刻执行的命令。它可以简化一些常见的流程 ,比如通过命令生成一组车辆,并使用该方法设置自动驾驶。
4257
4259
- ** 参数:**
4258
- - ` command ` (_ any carla Command _ ) - 一个 Carla 命令。
4260
+ - ` command ` (_ 任何 carla 命令 _ ) - 一个 Carla 命令。
4259
4261
4260
4262
---
4261
4263
[ comment ] : < > ( ========================= )
0 commit comments