当前位置: 移动技术网 > IT编程>脚本编程>Python > windows10安装Carla并调试驾驶功能

windows10安装Carla并调试驾驶功能

2020年09月01日  | 移动技术网IT编程  | 我要评论
首先,下载Carla,地址点击这里点下面的Download后看到首先需要安装pygamepip install pygame本文使用的是Jupyter lab,在解压后先进入到指定文件夹cd D:\Program Files (x86)\Carla\WindowsNoEditor\PythonAPI\examples执行下列代码后生成人物和车辆:run spawn_npc.py -n 100执行一下代码会打开一个控制窗口:run manual_control.py功能如下

首先,下载Carla,地址点击这里
点下面的Download后看到
在这里插入图片描述
首先需要安装pygame

pip install pygame

本文使用的是Jupyter lab,在解压后先进入到指定文件夹
在这里插入图片描述

cd D:\Program Files (x86)\Carla\WindowsNoEditor\PythonAPI\examples

执行下列代码后生成人物和车辆:

run spawn_npc.py -n 100

在这里插入图片描述
执行一下代码会打开一个控制窗口:

run manual_control.py

在这里插入图片描述
功能如下:
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html

Welcome to CARLA manual control.

Use ARROWS or WASD keys for control.

W            : throttle 
S            : brake
A/D          : steer left/right
Q            : toggle reverse
Space        : hand-brake
P            : toggle autopilot
M            : toggle manual transmission
,/.          : gear up/down

L            : toggle next light type
SHIFT + L    : toggle high beam
Z/X          : toggle right/left blinker
I            : toggle interior light

TAB          : change sensor position
` or N       : next sensor
[1-9]        : change to sensor [1-9]
G            : toggle radar visualization
C            : change weather (Shift+C reverse)
Backspace    : change vehicle

R            : toggle recording images to disk

CTRL + R     : toggle recording of simulation (replacing any previous)
CTRL + P     : start replaying last recorded simulation
CTRL + +     : increments the start time of the replay by 1 second (+SHIFT = 10 seconds)
CTRL + -     : decrements the start time of the replay by 1 second (+SHIFT = 10 seconds)

F1           : toggle HUD
H/?          : toggle help
ESC          : quit

比如切换传感器1-9演示几个:
按6后显示
在这里插入图片描述
按M后自动驾驶操作,G的话是可视化雷达
在这里插入图片描述
在这里插入图片描述
当碰撞时候,会在左下角提示Collide with XXX。

本文地址:https://blog.csdn.net/qwe900/article/details/108587529

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网