Blender Driving Scenario Creator插件
下载引擎Blender
安装到/opt目录下,在当前目录终端下运行 ./blender 方便提示错误信息
安装pyclothoids
pip install pyclothoids
cd到Blender程序python目录下
cd /opt/blender/
安装Python包安装工具
sudo ./python
我的是python10,具体看目录下python版本,然后安装scenariogeneration到当前lib中
sudo -E ./pip3 install scenariogeneration
可在 python/lib/python3.10/site-packages目录下查看是否安装成功
安装openscenegraph
sudo apt install openscenegraph
下载Releases · esmini/esmini · GitHub
添加环境变量到 ~/.bashrc
export PATH=$PATH:your_path/esmini/bin
下载:Releases · johschmitz/blender-driving-scenario-creator · GitHub
我是v0.11.1.zip
打开Blender,然后Edit -> Preferences -> Add-ons如图所示
点击install,找到zip文件,选中安装插件即可
点击小方框激活可能会有错误,如缺少lib2to3
File "/opt/blender/3.2/scripts/modules/addon_utils.py", line 335, in enable
mod = __import__(module_name)
File "/home/lmw/.config/blender/3.2/scripts/addons/blender-driving-scenario-creator/__init__.py", line 19, in <module>
from . export import DSC_OT_export
File "/home/lmw/.config/blender/3.2/scripts/addons/blender-driving-scenario-creator/export.py", line 17, in <module>
from scenariogeneration import xosc
File "/opt/blender/3.2/python/lib/python3.10/site-packages/scenariogeneration/__init__.py", line 7, in <module>
from .esmini_runner import *
File "/opt/blender/3.2/python/lib/python3.10/site-packages/scenariogeneration/esmini_runner.py", line 15, in <module>
from .xodr import OpenDrive
File "/opt/blender/3.2/python/lib/python3.10/site-packages/scenariogeneration/xodr/__init__.py", line 11, in <module>
from .signals_objects import *
File "/opt/blender/3.2/python/lib/python3.10/site-packages/scenariogeneration/xodr/signals_objects.py", line 12, in <module>
from lib2to3.pytree import convert
ModuleNotFoundError: No module named 'lib2to3'
C++
可以用conda创建一个python10的环境,将其中的lib2to3复制到软件的python3.10/site-packages/目录下便可成功运行
export driving scenario即可获得.xodr
在OpenDRIVE地图在线查看 - BimAnt打开
也可使用esmini模拟
cd到输出目录
run
esmini --osc xosc/bdsc_export.xosc --window 50 50 800 400