When installing Moveit! and Baxter simulator on Ubuntu 16.04 (ROS kinetic), there will be some errors that can waste you a lot of time. Therefore, a detailed introduction is recorded here.
Steps for installation:
1 Install ROS kinetic:
In this section, the standard procedure should be followed from this link:
kinetic/Installation/Ubuntu - ROS Wikiwiki.ros.orgNote: In my case, ~/ros_ws is the ROS workspace, and all source codes are stored in the src/ sub-directory.
2 Do not use catkin_make. Use catkin build from python-catkin-tools instead:
apt-get install python-wstool python-catkin-tools clang-format-3.9
3 upgrade your software pkgs.
rosdep update
sudo apt-get update
sudo apt-get dist-upgrade
4 Download source code of Baxter SDK, Moveit! and OMPL and install the dependencies
# source code of Moveit!
cd ~/ros_ws
wstool init src
wstool merge -t src https://raw.githubusercontent.com/ros-planning/moveit/master/moveit.rosinstall
wstool update -t src
gedit moveit/moveit_planners/ompl/CMakeLists.txt
Locate the include_directories directive and exchange the two variables ${OMPL_INCLUDE_DIRS} and ${catkin_INCLUDE_DIRS},
so that ${OMPL_INCLUDE_DIRS} is added before ${catkin_INCLUDE_DIRS}.
# source code of Baxter SDK and simulator
cd src
wstool merge https://raw.githubusercontent.com/RethinkRobotics/baxter_simulator/master/baxter_simulator.rosinstall
wstool update
# source code of ompl
git clone -b kinetic-devel https://github.com/ompl/ompl.git
# for ROS build
cd ompl
wget https://raw.githubusercontent.com/ros-gbp/ompl-release/debian/kinetic/xenial/ompl/package.xml
# install dependencies
cd ~/ros_ws
rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO}
catkin config --extend /opt/ros/${ROS_DISTRO} --cmake-args -DCMAKE_BUILD_TYPE=Release
In my case, ros-kinetic-moveit-resources is not installed automatically. It needs to be installed manually. Otherwize, an error will appear during catkin build:
Errors << moveit_core:make /home/zhb/ros_ws/logs/moveit_core/build.make.002.log
In file included from /home/zhb/ros_ws/src/moveit/moveit_core/utils/src/robot_model_test_utils.cpp:42:0:
/home/zhb/ros_ws/src/moveit/moveit_core/utils/include/moveit/utils/robot_model_test_utils.h:48:37: fatal error: moveit_resources/config.h: No such file or directory
compilation terminated.
make[2]: *** [utils/CMakeFiles/moveit_test_utils.dir/src/robot_model_test_utils.cpp.o] Error 1
make[1]: *** [utils/CMakeFiles/moveit_test_utils.dir/all] Error 2
make: *** [all] Error 2
Another error here is that c++11 is required for building of baxter_gazebo pkg. Add this line to baxter_gazebo/CMakeLists.txt
add_compile_options(-std=c++11)
5 Run catkin build and wait.
6 Install MongoDB and FCL (OMPL is already installed)
Dependencies Source Install | MoveIt!moveit.ros.org7 Install moveit_robots (baxter_moveit_config is included)
cd ~/ros_ws/src
git clone https://github.com/ros-planning/moveit_robots.git
catkin build
补充说明
1 在VMWARE虚拟机装ROS的话,gazebo启动可能会出现错误
解决方案:
gedit ~/.bashrc
加入下面一行
export SVGA_VGPU10=0
2 Gazebo启动时,会自动下载在线模型。但是由于内置服务器无法连接,所以会无限卡机。
解决方案:
从
Index of /models.gazebosim.org把模型全部下载下来,放到 ~/.gazebo/models文件夹下