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
  • 0
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 10
    评论
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值