Skip to content

Commit

Permalink
目录调整
Browse files Browse the repository at this point in the history
  • Loading branch information
nongfugengxia committed May 14, 2024
1 parent 6af008c commit 9fa1ac0
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 33 deletions.
18 changes: 8 additions & 10 deletions docs/examples.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
## [交互式脚本](https://github.com/Morphlng/Carla-Interactive-Script/)


### generate_traffic.py
生成交通流量。
### [生成交通流量](https://github.com/OpenHUTB/carla_doc/blob/master/src/examples/generate_traffic.py)
```shell
python examples/generate_traffic.py --host localhost --port 2000 -n 50 -w 20 --safe
```

### manual_control.py
手动控制车辆的示例。
### [手动控制车辆](https://github.com/OpenHUTB/carla_doc/blob/master/src/examples/manual_control.py)
```shell
python examples/manual_control.py --host localhost --port 2000 --rolename hero --keep_ego_vehicle
```
![](img/interactive_script/manual_control.png)

### Sensor_bounding_box.py
### [绘制边界框](https://github.com/OpenHUTB/carla_doc/blob/master/src/examples/sensor_bounding_box.py)
脚本将根据用户指定的视角 `view`(上方`above`、后面`behind`)附加一个 RGB 相机,并在距离`distance`之内绘制所有的参与者。
```shell
python examples/sensor_bounding_box.py --host localhost --port 2000 --rolename hero --view above --distance 100 --res 800x600 --fov 90
Expand All @@ -23,10 +21,10 @@ python examples/sensor_bounding_box.py --host localhost --port 2000 --rolename h
![](img/interactive_script/sensor_bounding_box.gif)

!!! 注意
运行之前,需要先运行 `manual_control.py` 生成一辆英雄车辆,否则运动报错:`Actor hero not found`。 并且将原始脚本的环境路径`../src`改为``..`。
运行之前,需要先运行 `manual_control.py` 生成一辆英雄车辆,否则运动报错:`Actor hero not found`。 并且将原始脚本的环境路径`../src`改为`..`


### rgb_camera_example.py
### [可视化六种相机](https://github.com/OpenHUTB/carla_doc/blob/master/src/examples/rgb_camera_example.py)

该脚本为您提供了如何在 Carla 中可视化各种 RGB 相机传感器的示例。
```shell
Expand All @@ -36,8 +34,8 @@ python examples/rgb_camera_example.py --host localhost --port 2000 --rolename he
![](img/interactive_script/rgb_camera.gif)


### waypoint_follow.py
该脚本实现了一个简单的路径点跟踪方法。它将沿着地图上的航点行驶,并在到达航点终点时停止
### [路径点跟踪](https://github.com/OpenHUTB/carla_doc/blob/master/src/examples/waypoint_follow.py)
该脚本实现了一个简单的路径点跟踪方法。它将沿着地图上的路径点行驶,并在到达路径点终点时停止
```shell
python examples/waypoint_follow.py --host localhost --port 2000 --rolename hero --map Town01 --json_file data/town01_waypoints.json --sync --fixed_delta_seconds=0.05 --spawn --visualize --camera_follow
```
Expand All @@ -47,7 +45,7 @@ python examples/waypoint_follow.py --host localhost --port 2000 --rolename hero
![](img/interactive_script/waypoint_follow.gif)


### 3d_lidar.py
### [可视化激光点云](https://github.com/OpenHUTB/carla_doc/blob/master/src/examples/3d_lidar.py)
此脚本提供了如何使用 Open3D 可视化激光雷达点云和雷达数据的示例。
```shell
python examples/3d_lidar.py --host localhost --port 2000 --rolename hero --keep_ego_vehicle
Expand Down
11 changes: 2 additions & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Carla 论坛</a>

[__教程__](tutorials.md) — Carla 详细教程。

[__示例__](tuto_E_gallery.md) — Carla 经典示例。


## 构建 Carla

Expand Down Expand Up @@ -207,15 +209,6 @@ Carla 论坛</a>
[__调试程序__](tuto_D_windows_debug.md) - 进行程序的调试


## 示例

[__入门__](tuto_E_gallery.md) - 基本示例

[__交通灯的配置和使用__](tuto_G_traffic_light.md) - 红绿灯的配置和使用

[__流量预测__](tuto_G_traffic_prediction.md) - 车流量预测


## Carla 生态系统

[__ISS 智能驾驶系统__](ecosys_iss.md) — 包含用于自动驾驶相关任务的传统和深度学习算法。
Expand Down
10 changes: 5 additions & 5 deletions docs/ref_sensors.md
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ if rss_proper_response:


```py
# Fragment of rss_sensor.py
# rss_sensor.py 代码片段
# The carla.RssSensor is updated when listening for a new carla.RssResponse
def _on_rss_response(weak_self, response):
...
Expand Down Expand Up @@ -568,7 +568,7 @@ def _on_rss_response(weak_self, response):


```py
# Update the current route
# 更新当前路线
self.sensor.reset_routing_targets()
if routing_targets:
for target in routing_targets:
Expand Down Expand Up @@ -596,7 +596,7 @@ if routing_targets:
2. 每个参与者的计算

```py
# Fragment of rss_sensor.py
# rss_sensor.py 代码片段
# The function is registered as actor_constellation_callback
def _on_actor_constellation_request(self, actor_constellation_data):
actor_constellation_result = carla.RssActorConstellationResult()
Expand All @@ -609,10 +609,10 @@ def _on_actor_constellation_request(self, actor_constellation_data):
actor_id = -1
actor_type_id = "none"
if actor_constellation_data.other_actor != None:
# customize actor_constellation_result for specific actor
# 为特定的参与者定制 actor_constellation_result
...
else:
# default
# 默认
...
return actor_constellation_result
```
Expand Down
7 changes: 7 additions & 0 deletions docs/tuto_E_gallery.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [基本示例](examples.md)

[交通灯的配置和使用](tuto_G_traffic_light.md)

[流量预测](tuto_G_traffic_prediction.md)


## [Carla 教程 (Python API)](https://github.com/wuhanstudio/carla-tutorial)

请使用 0.9.14 版本或者其他兼容 API 的 Carla 版本。
Expand Down
5 changes: 0 additions & 5 deletions docs/tuto_first_steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import random
# 链接到客户端并获取世界对象
client = carla.Client('localhost', 2000)
world = client.get_world()

```

[__客户端__](python_api#carlaclient) 对象用于维护客户端与服务器的连接,并具有许多用于应用命令以及加载或导出数据的功能。我们可以使用客户端对象加载替代地图或重新加载当前地图(重置为初始状态)。
Expand All @@ -58,7 +57,6 @@ world = client.get_world()

```py
client.load_world('Town05')

```

请在 [__此处__](core_map.md) 查找有关 Carla 地图的更多信息。
Expand Down Expand Up @@ -100,7 +98,6 @@ rotation = transform.rotation
# 用空变换设置观察者
spectator.set_transform(carla.Transform())
# 这将设置观众在地图的原点,0度俯仰,偏航和滚动-一个很好的方式来定位自己在地图上

```

## 添加非玩家角色
Expand Down Expand Up @@ -193,13 +190,11 @@ __自我车辆__ 是使用 Carla 时需要牢记的一个重要概念。自我
要定义自我车辆,您应该在生成自我车辆时设置`role_name`车辆[carla.Actor](python_api.md#carlaactor) 对象 [蓝图](python_api.md#carlaactorblueprint) 的属性:

```py

ego_bp = world.get_blueprint_library().find('vehicle.lincoln.mkz_2020')

ego_bp.set_attribute('role_name', 'hero')

ego_vehicle = world.spawn_actor(ego_bp, random.choice(spawn_points))

```
---
## 选择你的地图
Expand Down
5 changes: 1 addition & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ nav:
- '快速启动包安装': 'start_quickstart.md'
- '第一步' : 'tuto_first_steps.md'
- '教程': 'tutorials.md'
- '示例': 'tuto_E_gallery.md'
- 构建 Carla:
- '构建 Carla' : 'build_carla.md'
- 'Linux 上编译': 'build_linux.md'
Expand Down Expand Up @@ -119,10 +120,6 @@ nav:
- '生成详细碰撞': 'tuto_D_generate_colliders.md'
- '发布版本': 'tuto_D_make_release.md'
- '调试程序': 'tuto_D_windows_debug.md'
- 示例:
- '入门': 'tuto_E_gallery.md'
- '交通灯的配置和使用': 'tuto_G_traffic_light.md'
- '流量预测': 'tuto_G_traffic_prediction.md'
- Carla 生态系统:
- 'ISS 智能驾驶系统': 'ecosys_iss.md'
- 'Web 可视化器': 'plugins_carlaviz.md'
Expand Down

0 comments on commit 9fa1ac0

Please sign in to comment.