carla-加载场景并运行控制脚本
2020-04-09 本文已影响0人
wangafu
指令
更新API的路径
export CARLA_ROOT=/opt/carla
export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.8-py3.5-linux-x86_64.egg:${CARLA_ROOT}/PythonAPI/carla/agents:${CARLA_ROOT}/PythonAPI/carla
打开终端,运行carla服务端
./CARLA_0.9.8/CarlaUE4.sh
打开另一个终端,运行示例场景
cd /opt/carla/scenario_runner
export CARLA_ROOT=/opt/carla
export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.8-py3.5-linux-x86_64.egg:${CARLA_ROOT}/PythonAPI/carla/agents:${CARLA_ROOT}/PythonAPI/carla
python3 scenario_runner.py --scenario FollowLeadingVehicle_1 --reloadWorld
打开第三个终端,运行控制脚本
cd /opt/carla/scenario_runner
export CARLA_ROOT=/opt/carla
export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.8-py3.5-linux-x86_64.egg:${CARLA_ROOT}/PythonAPI/carla/agents:${CARLA_ROOT}/PythonAPI/carla
python3 manual_control.py
打开其它的openscenario场景
python scenario_runner.py --scenario group:FollowLeadingVehicle