Failed to process package ‘cartographer_ros‘ :

本文涉及的产品
资源编排,不限时长
简介: Failed to process package ‘cartographer_ros‘ :

遇到了两三天的问题,差点就把Ubuntu20.04给卸载重新安装个18.04的Ubuntu~~

Failed to process package 'cartographer_ros' :

遇到这个问题分为两种情况

第一种

看Cmake Error上面两行  它会提示:ImportError:"…………………"No module named 'catkin_pkg'

这时在 命令行里面输入

catkin_make_isolated --install --use-ninja -DPYTHON_EXECUTABLE=/usr/bin/python2

第二种

看Cmake Error下面两行  它会提示:Could NOT find PythonInterp: Found unsuitable version"你的python版本",but required is at least "3"(found /usr/bin/python)

 

这时在命令行里面输入

catkin_make_isolated --install --use-ninja -DPYTHON_EXECUTABLE=/usr/bin/python3

(它提示至少python 3.0以上 如果你的python版本过低:看这里

下载python3.7.2安装包

wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz 

新建安装路径(根据个人喜好),然后解压安装包

mkdir -p /usr/local/python3

tar -zxvf Python-3.7.2.tgz

进入解压后的路径编译,安装

cd cd Python-3.7.2

./configure --prefix=/usr/local/python3

make && make instal

编译安装成功后,修改软连接

rm /usr/bin/python

rm /usr/bin/pip

ln -s /usr/local/python3/bin/python3 /usr/bin/python

ln -s /usr/local/python3/bin/pip3 /usr/bin/pi

检查安装

python --version   #输出版本号为3.7.2即升级成功

)

cartographer安装成功后可以通过下面代码测试

下载cartographer 例子数据包

2D数据包下载的命令如下:

wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag


3D数据包下载的命令如下:

 

wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/with_intensities/b3-2016-04-05-14-14-00.bag

launch数据包


直接执行launch语句来run数据包,可能会报错,所以通常加一句:

 

source install_isolated/setup.bash


launch 2D对应2D数据包:

 

roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME}/Downloads/cartographer_paper_deutsches_museum.bag


launch 3D对应3D数据包:


 

roslaunch cartographer_ros demo_backpack_3d.launch bag_filename:=${HOME}/Downloads/b3-2016-04-05-14-14-00.bag

运行成功后如下所示:

 

如果你想再次打开相应的2D或者3D模型

打开终端ctrl+alt+t

 

cd cartographer_ws


刷新一下环境变量

 

source install_isolated/setup.bash


2D的

 

roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=//你的2D包的路径


3D的换成

roslaunch cartographer_ros demo_backpack_3d.launch bag_filename:=你的3D包的路径

参考文章:

(46条消息) Linux系统Ubuntu Python2.7升级Python3.7 踩雷先锋_livre7的博客-CSDN博客

(46条消息) Ubuntu + ROS 安装Google-Cartographer建图导航测试bag_汉文修士的博客-CSDN博客

相关实践学习
使用ROS创建VPC和VSwitch
本场景主要介绍如何利用阿里云资源编排服务,定义资源编排模板,实现自动化创建阿里云专有网络和交换机。
阿里云资源编排ROS使用教程
资源编排(Resource Orchestration)是一种简单易用的云计算资源管理和自动化运维服务。用户通过模板描述多个云计算资源的依赖关系、配置等,并自动完成所有资源的创建和配置,以达到自动化部署、运维等目的。编排模板同时也是一种标准化的资源和应用交付方式,并且可以随时编辑修改,使基础设施即代码(Infrastructure as Code)成为可能。 产品详情:https://www.aliyun.com/product/ros/
相关文章
|
Java Maven Spring
|
6月前
|
Java 数据库 索引
GreenDao,clearIdentityScope报错Error:Execution failed for task ':app:compileDebugJavaWithJavac'. > Com
GreenDao,clearIdentityScope报错Error:Execution failed for task ':app:compileDebugJavaWithJavac'. > Com
44 1
|
6月前
|
缓存 Java 开发工具
Error:Execution failed for task ‘:app:preDebugAndroidTestBuild’. Conflict with dependency ‘com.andr
Error:Execution failed for task ‘:app:preDebugAndroidTestBuild’. Conflict with dependency ‘com.andr
31 1
|
资源调度
No change to package.json was detected. No package manager install will be executed.怎么解决
这个提示是由于没有对 package.json 文件进行更改所导致的,因此无需运行包管理器的安装。
404 0
|
Ubuntu
问题解决:Ubuntu安装ROS依赖出现ERROR: the following packages/stacks could not have their rosdep keys resolvedt
问题解决:Ubuntu安装ROS依赖出现ERROR: the following packages/stacks could not have their rosdep keys resolvedt
1464 0
装R包(package)error:(as ‘lib’ is unspecified)installation of package had non-zero exit status]
装R包(package)error:(as ‘lib’ is unspecified)installation of package had non-zero exit status]
No package ‘gobject-introspection-1.0‘ found
No package ‘gobject-introspection-1.0‘ found
256 0
No package ‘libmatekbd‘ found
No package ‘libmatekbd‘ found
64 0
No package ‘polkit-gobject-1‘ found
No package ‘polkit-gobject-1‘ found
106 0
No package ‘vte-2.91‘ found
No package ‘vte-2.91‘ found
75 0