详见:http://blog.exbot.net/archives/3035
在虚拟机上运行Gazebo会遇到诸多问题,主要是显卡和硬件加速的问题。
1. 关闭虚拟机硬件加速
echo " export SVGA_VGPU10=0" >> ~/.bashrc
source ~/.bashrc
2. 下载Gazebo模型
首次运行Gazebo,加载模型会出现非常缓慢,原因可能是不能正确下载模型。
因为http://gazebosim.org/models/地址已经变换http://models.gazebosim.org, 可能导致在访问时候无法自动转换地址。
解决方法:通过直接下载所有模型到用户的根目录下的.gazebo/models/下。
运行:
cd ~/.gazebo/
ls
mkdir -p models
ls
cd ~/.gazebo/models/
wget http://file.ncnynl.com/ros/gazebo_models.txt
ls
输出:
gazebo_models.txt
运行:
wget -i gazebo_models.txt
ls model.tar.g* | xargs -n1 tar xzvf
3. 清除Gazebo残留进程
当不正确关闭Gazebo时,再次启动Gazebo会遇到sever无法启动的问题。
Exception [Master.cc:50] Unable to start server[bind: Address already in use]. There is probably another Gazebo process running.
解决方法:
用ps命令查找gzserver进程,将其kill。或是干脆重启系统。