项目场景:
用gazebo进行仿真,遇到问题ModelDatabase.cc:340
问题描述
出现报错
[Wrn] [ModelDatabase.cc:340] Getting models from[http://gazebosim.org/models/]. This may take a few seconds.
[Err] [ModelDatabase.cc:235] No tag in the model database database.config found here[http://gazebosim.org/models/]
[Err] [ModelDatabase.cc:294] Unable to download model manifests
[Err] [ModelDatabase.cc:414] Unable to download model[model://postbox/meshes/postbox.dae]
[Err] [SystemPaths.cc:412] File or path does not exist[“”]
[Err] [Visual.cc:2824] No mesh specified
[Wrn] [ModelDatabase.cc:340] Getting models from[http://gazebosim.org/models/]. This may take a few seconds.
[Err] [ModelDatabase.cc:235] No <database> tag in the model database database.config found here[http://gazebosim.org/models/]
[Err] [ModelDatabase.cc:294] Unable to download model manifests
[Err] [ModelDatabase.cc:414] Unable to download model[model://postbox/meshes/postbox.dae]
[Err] [SystemPaths.cc:412] File or path does not exist[""]
[Err] [Visual.cc:2824] No mesh specified
原因分析:
因为http://gazebosim.org/models/地址已经变换http://models.gazebosim.org,因此无法下载所需模型
解决方案:
planA:
1,修改下载地址:/usr/share/gazebo目录下打开setup.sh,只读文件需要sudo
sudo gedit setup.sh
2,注释旧地址换成新地址
export GAZEBO_MODEL_DATABASE_URI=http://models.gazebosim.org/
#export GAZEBO_MODEL_DATABASE_URI=http://gazebosim.org/models
再次进行仿真可以看到,在/.gazebo/models目录中所需的模型自动下载好了
planB:
1,打开新地址http://models.gazebosim.org,在里面寻找缺的包,下载至本地,将模型放在/.gazebo/models目录下