在安装Moveit包之前,先安装以下依赖项:
sudo apt-get install ros-noetic-moveit
sudo apt-get install ros-noetic-moveit-visual-tools
sudo apt-get install ros-noetic-moveit-msgs
sudo apt-get install ros-noetic-moveit-planners-ompl
sudo apt-get install ros-noetic-moveit-ros-move-group
然后,需要将catkin工作区的源文件夹中添加Moveit的依赖项,在catkin工作区执行以下命令:
cd ~/catkin_ws/src
git clone https://github.com/ros-planning/moveit_msgs.git
cd ~/catkin_ws/
catkin_make
如果还有其他错误,请检查是否安装其他依赖项,并确保你正在使用正确的Ubuntu和ROS版本。