Noetic build moveit from its source 从源码安装Moveit!
20210322
具体安装过程参考:
https://ros-planning.github.io/moveit_tutorials/doc/getting_started/getting_started.html#install-ros-and-catkin
https://moveit.ros.org/install/source/
Bug修复:
Bug1:
lee@lee-virtual-machine:~/moveit_ws$ rosdep install -y --from-paths . --ignore-src --rosdistro noetic
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
pilz_industrial_motion_planner: Cannot locate rosdep definition for [moveit_resources_prbt_pg70_support]
在Moveit_planner中,把pilz_industrial_motion_planner相类似的包直接删除后再运行
lee@lee-virtual-machine:~/moveit_ws$ rosdep install -y --from-paths . --ignore-src --rosdistro noetic
#All required rosdeps installed successfully
Bug2:
lee@lee-virtual-machine:~/moveit_ws$ catkin config --extend /opt/ros/${ROS_DISTRO} --cmake-args -DCMAKE_BUILD_TYPE=Release
Traceback (most recent call last):
File "/usr/bin/catkin", line 6, in
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3254, in
def _initialize_master_working_set():
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3237, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3266, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 584, in _build_master
ws.require(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 901, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 787, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'osrf-pycommon>0.1.1' distribution was not found and is required by catkin-tools
执行:
catkin config --extend /opt/ros/${ROS_DISTRO} --cmake-args -DCMAKE_BUILD_TYPE=Release
出现:
pkg_resources.DistributionNotFound:
缺少插件:
sudo apt install python3-osrf-pycommon
之后再运行即可成功:
Bug3:
在编译moveit ros move group的时候,出现:
原因是系统下载了ros-noetic-moveit-msgs, 这对应noetic版本;而源码编译对应的是master版本,所以需要在workspace里面重新git clone 在moveit.rosinstall中的相关package的master版本。
# This file is intended for users who want to build MoveIt from source.
# Used with wstool, users can download source of all packages of MoveIt.
- git:
local-name: moveit_msgs
uri: https://github.com/ros-planning/moveit_msgs.git
version: master
- git:
local-name: moveit_resources
uri: https://github.com/ros-planning/moveit_resources.git
version: master
- git:
local-name: geometric_shapes
uri: https://github.com/ros-planning/geometric_shapes.git
version: noetic-devel
- git:
local-name: moveit
uri: https://github.com/ros-planning/moveit.git
version: master
- git:
local-name: rviz_visual_tools
uri: https://github.com/PickNikRobotics/rviz_visual_tools
version: master
- git:
local-name: moveit_visual_tools
uri: https://github.com/ros-planning/moveit_visual_tools.git
version: master
- git:
local-name: moveit_tutorials
uri: https://github.com/ros-planning/moveit_tutorials.git
version: master
- git:
local-name: panda_moveit_config
uri: https://github.com/ros-planning/panda_moveit_config.git
version: melodic-devel
官方也提到过:
至此编译成功