moveit 安装及模拟规划:
http://moveit.ros.org/install/source/
1)安装依赖工具:
sudo apt-get install python-wstool python-catkin-tools clang-format-3.8
2)创建安装目录:
mkdir ~/ws_moveit
cd ~/ws_moveit
3) 使ROS安装环境生效
source ~/ros_catkin_ws/install_isolated/setup.bash
4) 下载moveit源码
wstool init src
wstool merge -t src https://raw.githubusercontent.com/ros-planning/moveit/melodic-devel/moveit.rosinstall
wstool update -t src
rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO}
5) 配置catkin:
catkin config --extend ~/ros_catkin_ws/install_isolated --cmake-args -DCMAKE_BUILD_TYPE=Release:
这一步如果出错,需要指定workspace: 执行命令:catkin init --workspace .
6) 编译moveit
catkin build
编译过程中可能会出现一下问题:
1)Could not find a package configuration file provided by
"eigen_stl_containers" with any of the following names:
eigen_stl_containersConfig.cmake
eigen_stl_containers-config.cmake
原因是因为缺少了 eigen_stl_containers包,上网页:https://github.com/ros/eigen_stl_containers下载,然后把文件夹复制到ros_catkin_ws/src下面,
最后用命令:./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --pkg eigen_stl_containers安装即可。
2)Could not find a package configuration file provided by "random_numbers"
with any of the following names:
random_numbersConfig.cmake
random_numbers-config.cmake
原因是因为缺少了random_numbers包,到https://github.com/ros-planning/random_numbers下载,然后把文件夹复制到ros_catkin_ws/src下面,
最后执行命令./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --pkg eigen_stl_containers安装即可。
3)Could not find a package configuration file provided by
"object_recognition_msgs" with any of the following names:
object_recognition_msgsConfig.cmake
object_recognition_msgs-config.cmake
原因是因为缺少了object_recognition_msgs包,到https://github.com/wg-perception/object_recognition_msgs下载,然后把文件夹复制到ros_catkin_ws/src下面,
最后执行命令./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --pkg object_recognition_msgs安装即可。
4) Could not find a package configuration file provided by "octomap_msgs" with
any of the following names:
octomap_msgsConfig.cmake
octomap_msgs-config.cmake
原因是因为缺少了octomap_msgs包,到https://github.com/OctoMap/octomap_msgs下载,然后把文件夹复制到ros_catkin_ws/src下面,
最后执行命令./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --pkg octomap_msgs安装即可。
5)Could not find a package configuration file provided by "graph_msgs" with
any of the following names:
graph_msgsConfig.cmake
graph_msgs-config.cmake
原因是因为缺少了graph_msgs包,到https://github.com/davetcoleman/graph_msgs下载,然后把文件夹复制到ros_catkin_ws/src下面,
最后执行命令./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --pkg graph_msgs安装即可。
6) Could not find a package configuration file provided by "ompl" with any of
the following names:
omplConfig.cmake
ompl-config.cmake
原因是缺少ompl库,到https://bitbucket.org/ompl/ompl下载,并按照说明安装。
7)Could not find a package configuration file provided by "warehouse_ros"
with any of the following names:
warehouse_rosConfig.cmake
warehouse_ros-config.cmake
原因是因为缺少了graph_msgs包,到https://github.com/ros-planning/warehouse_ros下载,然后把文件夹复制到ros_catkin_ws/src下面,
最后执行命令./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --pkg warehouse_ros安装即可。
7) 安装完成后执行以下语句以使环境生效
source ~/ws_moveit/devel/setup.bash
8) 执行命令模拟路径规划
roslaunch ur10_moveit_config ur10_moveit_planning_execution.launch sim:=true
roslaunch ur10_moveit_config moveit_rviz.launch config:=true
catkin_make等同于catkin build
catkin_make -j8
catkin build -j8
改变编译器运行线程-j+数字
原文链接:https://blog.csdn.net/BeyondCN2008/article/details/85010838