安装cartographer步骤及问题解决

1 安装cartographer

安装环境:ubuntu16.04 kinetic
安装过程:主要是安装官网的方式,参考链接https://blog.csdn.net/weixin_40712763/article/details/82292087
之前安装的时候没有出现问题一次性通过,这个换个电脑重新安装各种错误提示,心累。

2 遇到问题

2.1 sudo rosdep init 提示错误

Traceback (most recent call last):
File “/usr/bin/rosdep”, line 6, in
from pkg_resources import load_entry_point
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2927, in
@_call_aside
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2913, in _call_aside
f(*args, **kwargs)
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2940, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 637, in _build_master
return cls._build_from_requirements(requires)
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 650, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 829, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘rospkg>=1.1.10’ distribution was not found and is required by rosdep

解决:
(1) pip install rospkg --user 提示已经安装(行不通,pass)
(2)sudo apt-get install python3-rosdep(参考https://blog.csdn.net/weixin_42462804/article/details/103737115
出现错误:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
python3-rosdep : Depends: python3-catkin-pkg but it is not going to be installed
Depends: python3-rospkg but it is not going to be installed
Depends: python3-rosdep-modules (>= 0.19.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
按照提示安装:sudo apt-get install python3-catkin-pkg
OK!

2.2 rosdep install --from-paths src --ignore-src --rosdistro=${kinetic} -y提示错误

WARNING: given --rosdistro but ROS_DISTRO is “kinetic”. Ignoring environment.
WARNING: ROS_PYTHON_VERSION is unset. Defaulting to 3
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
cartographer_ros_msgs: Cannot locate rosdep definition for [std_msgs]
ceres-solver: Cannot locate rosdep definition for [catkin]
cartographer_ros: Cannot locate rosdep definition for [rosunit]
cartographer: Cannot locate rosdep definition for [catkin]
cartographer_rviz: Cannot locate rosdep definition for [rviz]

解决:
(1)rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y --os=ubuntu:xenial行不通。pass
(2)把:rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y
改成:rosdep install --from-paths ~/catkin_ws/src --ignore-src -r
OK!

2.3 编译过程中提示下载不了abseil-cpp

解决:
本来还在网上各种搜集怎么直接编译abseil-cpp呢,后来发现多编译几次,网络好的时候竟然直接编译通过了。噢耶!

  • 18
    点赞
  • 70
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值