我们通常以Binary的方式在ROS中安装MoveIt!,但是这种方式的缺点是无法将自己写的运动算法(比如在OMPL中的算法基础上进行修改)集成到MoveIt!中,而以source的方式来安装,可以解决这个问题。本篇博客记录一下具体的安装步骤。
配置:Ubuntu 16.04,ROS Kinetic
主要参考资料如下:
Building Common MoveIt! Dependencies from Source in Catkin
ROS Kinetic版本下如何一步一步实现一个基本机械臂运动规划算法,如PRM?
Custom state sampler in MoveIt!
1、Uninstall moveit (sudo apt-get install方式安装的)
如果在前期使用ROS的过程中,已经安装了moveit,首先是将其卸载,卸载方法如下:
sudo apt-get remove ros-kinetic-moveit-*
或者是
sudo apt-get purge ros-kinetic-moveit-*
sudo apt-get autoremove
2、安装moveit!from Source
2.1 安装前预配置
首先,安装ROS,运行如下命令,检查是否安装了最新版本的packages:
rosdep update
sudo apt-get update
sudo apt-get dist-upgrade
源代码安装需要wstool, catkin_tools, clang-format,其中clang-format是可选的:
sudo apt-get install python-wstool python-catkin-tools clang-format-3.9
建立单独的工作空间,最好不要和catkin_ws混在一起,会很乱。