rosdep error

kenneth@kenneth-lenovo-g50-75m:~/catkin_ws$ rosdep install --from-paths src --ignore-src --rosdistro=melodic -y
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
robot_sim_demo: Cannot locate rosdep definition for [yocs_cmd_vel_mux]
navigation_sim_demo: Cannot locate rosdep definition for [gmapping]
slam_sim_demo: Cannot locate rosdep definition for [hector_mapping]

对比melodic和kinetic支持的包

http://repositories.ros.org/status_page/ros_melodic_default.html

http://repositories.ros.org/status_page/ros_kinetic_default.html

发现缺失的三个包在kinetic里都能找到。

原项目应用kinetic开发,而我安装的ubuntu18.04+melodic却不支持。

 

卸载melodic

sudo apt-get purge ros-*
sudo rm -rf /etc/ros
gedit ~/.bashrc
删除bash里的配置
source ~/.bashrc

安装kinetic

sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full
apt-cache search ros-kinetic
sudo rosdep init
rosdep update
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential

并没有什么卵用。。

逛ROSAnswers,找到

The ROS package slam_gmappingdepends on another package openslam_gmapping. As of this writing, if you are on melodic distro, you need to install these packages from source since they are not released into melodic yet. For ROS packages installing from source implies cloning their repositories in the src directory of your workspace.

cd your_work_space/src
git clone https://github.com/ros-perception/slam_gmapping.git
git clone https://github.com/ros-perception/openslam_gmapping.git

# [comment] navigate back to your_work_space directory
cd ..

Next, Install missing dependencies if any:

rosdep install --from-paths src --ignore-src

Next: Build your project

catkin_make

你可能感兴趣的:(rosdep error)