关于gazebo的并行计算,现有的官方教程链接:
环境:ubuntu 16.04,ros kinetic,gazebo 8,无独显
1. 按照以上链接中的介绍进行操作,在以下步骤时:
hg clone https://bitbucket.org/osrf/gazebo
会发生错误,下载失败,原因是gazebo包太大(600M左右),所以可以先用其他方式下载好gazebo文件包,再复制到相关文件路径。
进行到./src/catkin/bin/catkin_make_isolated时会发生错误1:找不到ignition math2。
运行:
sudo apt-get install libignition-math2
会提示此操作会卸载系统中所有gazebo8相关的包,按下y;
再运行:
sudo apt-get install libignition-math2-dev
再次运行./src/catkin/bin/catkin_make_isolated,发生错误2:
error: no match for ‘operator/’ (operand types are ‘std::__cxx11::string {aka std::__cxx11::basic_string<char>}’ and ‘const char [7]’)
this->dataPtr->logPath = paths->GetTmpPath() / "gazebo";
网上搜索的相关回答有:
根据网上回答进行的操作是:
修改代码Daignostics.cc第55行为:
this->dataPtr->logPath = paths->GetTmpPath() / boost::filesystem::path("gazebo");
再次运行./src/catkin/bin/catkin_make_isolated,编译通过。
2. 实施效果:
环境:服务器cpu4,内存16G
a 不做处理,运行dual_pr2.world: real time factor大概达到0.45左右
b with island threading 2:达到0.49左右
c with island threading 3:达到0.52左右
d with island threading 4:达到0.44左右
e with threaded position error correction:达到0.20左右
f with both types of threading,island threading 2:达到0.21左右