当前位置: 首页 > news >正文

cartographer-(0)-ubuntu(20.04)-环境安装

1.安装 ROS wiki.ros.org


1.1修改镜像源:





     到网站上找与操作系统相匹配的镜像源
     ubuntu | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
  

  

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-proposed main restricted universe multiverse
#1.root 用户
sudo passwd root
su - root#2.root 用户 修改下载源cd /etc/apt/cp sources.list  sources-ini.listvim /etc/apt/sources.listapt-get  updateapt-get upgradeapt install vim

 
1. 2.安装对应版本的ros




 

 

2.安装 cartographer

2.1先安装FTP服务器

#1.安装ftp服务器apt install vsftpdsystemctl status vsftpdcd /etc/vsftpd.confvim /etc/vsftpd.conflocal_enables=YESwrite_enable=YESanonymous_enable=YESanon_mkdir_write_enable=YES   //允许匿名用户在FTP上创建目录anon_upload_enable=YES  //允许匿名用户在FTP服务器上上传文件anon_other_write_enable=YES  //开启匿名用户的其他写权限

 
  2.2 安装 cartographer依赖库
 

#1.安装ROS
sudo apt install ros-melodic-desktop-full
#2.初始化rosdep
sudo rosdep init
apt install python3-rosdep2
rosdep update
#3.设置环境变量echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrcsource ~/.bashrc
#4.安装rosinstallapt install python3-rosdep2apt install python-rosinstall python-rosinstall-generator python-wstool build-essential复制文件到目录: cartographer_install
chmod +x auto-carto-build.sh
./auto-carto-build.sh 

2.3 安装编写的运行脚本 ceres-solver ,protobuf,cartographer

2.3.1 运行环境
 


/home/tang/cartographer/cartographer_install
安装脚本的编写参考:
Cartographer — Cartographer documentation

#!/bin/bash#1 Install the required libraries that are available as debs.
# sudo apt-get update
sudo apt-get install \clang \cmake \g++ \git \google-mock \libboost-all-dev \libcairo2-dev \libcurl4-openssl-dev \libeigen3-dev \libgflags-dev \libgoogle-glog-dev \liblua5.2-dev \libsuitesparse-dev \lsb-release \ninja-build \stow \python3-wstool \python3-rosdep \python3-sphinx \libatlas-base-dev#2 Build and install abseil-cpp
set -o errexit
set -o verbosecd abseil-cpp
git checkout d902eb869bcfacc1bad14933ed9af4bed006d481
mkdir build
cd build
cmake -G Ninja \-DCMAKE_BUILD_TYPE=Release \-DCMAKE_POSITION_INDEPENDENT_CODE=ON \-DCMAKE_INSTALL_PREFIX=/usr/local/stow/absl \..
ninja
sudo ninja install
cd /usr/local/stow
sudo stow absl#3 Build and install Ceres.
cd -
cd ../../ceres-solver
mkdir build
cd build
cmake .. -G Ninja -DCXX11=ON
ninja
#CTEST_OUTPUT_ON_FAILURE=1 ninja test
sudo ninja install#4 Build and install proto3.
cd ../../protobuf
mkdir build
cd build
cmake -G Ninja \-DCMAKE_POSITION_INDEPENDENT_CODE=ON \-DCMAKE_BUILD_TYPE=Release \-Dprotobuf_BUILD_TESTS=OFF \../cmake
ninja
sudo ninja install#5 Build and install Cartographer.
cd ../../cartographer
mkdir build
cd build
cmake .. -G Ninja
ninja
#CTEST_OUTPUT_ON_FAILURE=1 ninja test
sudo ninja install

 出现:
   fatal: detected dubious ownership in repository
原因:权限的问题。
解决方法:
git config --global --add safe.directory /home/tang/cartographer/cartographer_install/abseil-cpp
 

2.3.2源码编译 


目录:/home/tang/carto_ws/cartographer_detailed_comments_ws/

下载注释的代码:
https://github.com/xiangli0608/cartographer_detailed_comments_ws
git clone https://github.com/xiangli0608/cartographer_detailed_comments_ws.git

 

#1.编译源码 git 下在
cd /home/tang/
mkdir carto_ws
cd carto_ws
git clone https://github.com/xiangli0608/cartographer_detailed_comments_ws.git#更新git
git pull origin master#2.编译源码
./catkin_make.sh#3.vim ~/.bashrc 
source /home/tang/carto_ws/cartographer_detailed_comments_ws/install_isolated/setup.bash#4. 4个包
/home/tang/carto_ws/cartographer_detailed_comments_ws/src/cartographer
/home/tang/carto_ws/cartographer_detailed_comments_ws/src/cartographer_ros/cartographer_ros
/home/tang/carto_ws/cartographer_detailed_comments_ws/src/cartographer_ros/cartographer_ros_msgs
/home/tang/carto_ws/cartographer_detailed_comments_ws/src/cartographer_ros/cartographer_rviz

 error,当出现找不到rosbag等包时,不要修改cmake文件,安装各种包即可。

sudo apt install ros-noetic-ros-rosbag
sudo apt install ros-noetic-turtle-tf2
sudo apt install ros-noetic-tf2-tools 
sudo apt install ros-noetic-urdf-tutorial

2.到目录下执行脚本编译


到目录下直接执行catkin_make不行,会报错

 

相关文章:

cartographer-(0)-ubuntu(20.04)-环境安装

1.安装 ROS wiki.ros.org 1.1修改镜像源: 到网站上找与操作系统相匹配的镜像源 ubuntu | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb htt…...

MIT 6.S081学习笔记(第二章)

〇、前言 本文主要完成MIT 6.S081 实验二:system call 一、Using gdb (easy) Question requirements In many cases, print statements will be sufficient to debug your kernel, but sometimes being able to single step through some assembly code or inspe…...

L958. 二叉树的完全性检验 java

从1开始当下标,最后节点下标节点总数?true:false; /*** Definition for a binary tree node.* public class TreeNode {* int val;* TreeNode left;* TreeNode right;* TreeNode() {}* TreeNode(int val) { …...

阿里云对象存储OSS SDK的使用

官方文档 https://help.aliyun.com/zh/oss/developer-reference/java 准备工作 windows安装好JDK,这里使用JDK1.8为例 windows安装好IDEA,这里使用IDEA2022 登录阿里云控制台,通过免费试用OSS或开通OSS 步骤 配置访问凭证 有临时和长期…...

二、互联网技术——网络协议

文章目录 一、OSI与TCP/IP参考模型二、TCP/IP参考模型各层功能三、TCP/IP参考模型与对应协议四、常用协议与功能五、常用协议端口 一、OSI与TCP/IP参考模型 二、TCP/IP参考模型各层功能 三、TCP/IP参考模型与对应协议 例题:TCP/IP模型包含四个层次,由上至…...

初赛错题集

MPEG属于视频文件格式. UNIX,Mac OS属于操作系统. 中国计算机协会成立于()年。 A. 1961 B. 1962 C. 1971 D. 1972 Ans:B 五个本质不同的点在没有重边或者自环的情况下,组成不同的无向图的个数是: A. 10 B. 1024 C. 15 D. 120 Ans:B 解析&…...

Java Thread类详解

🙈作者简介:练习时长两年半的Java up主 🙉个人主页:程序员老茶 🙊 ps:点赞👍是免费的,却可以让写博客的作者开兴好久好久😎 📚系列专栏:Java全栈,…...

3_使用传统CNN网络训练图像分类模型

使用传统CNN网络训练图像分类模型 1. MNIST 首先,定义一下超参数等 import torch# dataset input_shape = 28 num_classes = 10# hyper batch_size = 64 num_epochs = 5 learning_rate = 1e-3# gpu device = torch.device(cuda...

Java 创建线程的方法

🙈作者简介:练习时长两年半的Java up主 🙉个人主页:程序员老茶 🙊 ps:点赞👍是免费的,却可以让写博客的作者开兴好久好久😎 📚系列专栏:Java全栈,…...

基于安卓android微信小程序的旅游app系统

项目介绍 随着人民生活水平的提高,旅游业已经越来越大众化,而旅游业的核心是信息,不论是对旅游管理部门、对旅游企业,或是对旅游者而言,有效的获取旅游信息,都显得特别重要.自助定制游将使旅游相关信息管理工作规范化、信息化、程序化,提供旅游景点、旅游线路,旅游新闻等服务本…...

C++设计模式-单件(Singleton)

目录 C设计模式-单件(Singleton) 一、意图 二、适用性 三、结构 四、参与者 五、代码 C设计模式-单件(Singleton) 一、意图 保证一个类仅有一个实例,并提供一个访问它的全局访问点。 二、适用性 当类只能有一…...

想做好接口测试,先把这些概念搞清楚了

接口一般来说有两种,一种是程序内部的接口,一种是系统对外的接口。 系统对外的接口 比如你要从别的网站或服务器上获取资源或信息,别人肯定不会把数据库共享给你,他只能给你提供一个他们写好的方法来获取数据,你引用…...

通过融合UGV的地图信息和IMU的惯性测量数据,实现对车辆精确位置和运动状态的估计和跟踪研究(Matlab代码实现)

💥💥💞💞欢迎来到本博客❤️❤️💥💥 🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。 ⛳️座右铭&a…...

『Linux』Linux环境搭建 | 阿里云云服务器白嫖 | Xshell环境配置

🔥博客主页: 小羊失眠啦 🔖系列专栏: C语言、Linux 🌥️每日语录:时间,都是公平的,不公平的,只是现在的自己,对未来的自己。 ❤️感谢大家点赞👍收…...

C++ 类和对象篇(五) 析构函数

目录 一、概念 1. 析构函数是什么? 2. 为什么要有析构函数? 3. 怎么用析构函数? 3.1 创建析构函数 3.2 调用析构函数 二、特性 三、由编译器生成的默认析构函数 四、对象的析构顺序 1. 局部对象 2. new出来的堆对象 3. 全局对象 一、概念 1…...

find 与 cp 命令组合使用

查找到文件后,拷贝到指定路径 find ~/Downloads/ -name *.torrent -exec cp {} ~/Downloads/myTorrent \;\;前面有个空格,要注意,这是固定结构,请不要尝试改变 上面命令是在Downloads 目标中查找后缀为torrent所有文件&#xff0…...

用VLD调查VC内存泄漏

一、发现内存泄漏 使用VS2022&#xff0c;发现提示有内存泄漏&#xff0c;检查了所有的new&#xff0c;确认都有相应的delete释放。 Detected memory leaks! Dumping objects -> {1914} normal block at 0x0000021FDFFBD2E0, 48 bytes long.Data: < >…...

【Java 进阶篇】使用 JDBCTemplate 执行 DQL 语句详解

在前面的文章中&#xff0c;我们已经学习了如何使用 Spring 的 JDBCTemplate 执行 DML&#xff08;Data Manipulation Language&#xff09;操作&#xff0c;包括插入、更新和删除操作。现在&#xff0c;让我们来深入了解如何使用 JDBCTemplate 执行 DQL&#xff08;Data Query…...

了解了spring mvc web容器中一个http请求的全过程,能给我们提升多少武力值

继上一篇文章什么&#xff0c;这年头还有人不知道404_cow__sky的博客-CSDN博客后&#xff0c;有些同学发现&#xff0c;学了之后有啥用&#xff0c;有什么实际场景可以用到吗&#xff1f;程序员就是这样&#xff0c;不习惯于纸上谈兵&#xff0c;给一个场景show me code才是最实…...

【BBC新闻文章分类】使用 TF 2.0和 LSTM 的文本分类

一、说明 NLP上的许多创新是如何将上下文添加到词向量中。常见的方法之一是使用递归神经网络...

Linux应用开发之网络套接字编程(实例篇)

服务端与客户端单连接 服务端代码 #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <arpa/inet.h> #include <pthread.h> …...

什么是库存周转?如何用进销存系统提高库存周转率?

你可能听说过这样一句话&#xff1a; “利润不是赚出来的&#xff0c;是管出来的。” 尤其是在制造业、批发零售、电商这类“货堆成山”的行业&#xff0c;很多企业看着销售不错&#xff0c;账上却没钱、利润也不见了&#xff0c;一翻库存才发现&#xff1a; 一堆卖不动的旧货…...

Caliper 配置文件解析:config.yaml

Caliper 是一个区块链性能基准测试工具,用于评估不同区块链平台的性能。下面我将详细解释你提供的 fisco-bcos.json 文件结构,并说明它与 config.yaml 文件的关系。 fisco-bcos.json 文件解析 这个文件是针对 FISCO-BCOS 区块链网络的 Caliper 配置文件,主要包含以下几个部…...

优选算法第十二讲:队列 + 宽搜 优先级队列

优选算法第十二讲&#xff1a;队列 宽搜 && 优先级队列 1.N叉树的层序遍历2.二叉树的锯齿型层序遍历3.二叉树最大宽度4.在每个树行中找最大值5.优先级队列 -- 最后一块石头的重量6.数据流中的第K大元素7.前K个高频单词8.数据流的中位数 1.N叉树的层序遍历 2.二叉树的锯…...

AspectJ 在 Android 中的完整使用指南

一、环境配置&#xff08;Gradle 7.0 适配&#xff09; 1. 项目级 build.gradle // 注意&#xff1a;沪江插件已停更&#xff0c;推荐官方兼容方案 buildscript {dependencies {classpath org.aspectj:aspectjtools:1.9.9.1 // AspectJ 工具} } 2. 模块级 build.gradle plu…...

【Linux】Linux 系统默认的目录及作用说明

博主介绍&#xff1a;✌全网粉丝23W&#xff0c;CSDN博客专家、Java领域优质创作者&#xff0c;掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java技术领域✌ 技术范围&#xff1a;SpringBoot、SpringCloud、Vue、SSM、HTML、Nodejs、Python、MySQL、PostgreSQL、大数据、物…...

wpf在image控件上快速显示内存图像

wpf在image控件上快速显示内存图像https://www.cnblogs.com/haodafeng/p/10431387.html 如果你在寻找能够快速在image控件刷新大图像&#xff08;比如分辨率3000*3000的图像&#xff09;的办法&#xff0c;尤其是想把内存中的裸数据&#xff08;只有图像的数据&#xff0c;不包…...

在 Spring Boot 中使用 JSP

jsp&#xff1f; 好多年没用了。重新整一下 还费了点时间&#xff0c;记录一下。 项目结构&#xff1a; pom: <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0" xmlns:xsi"http://ww…...

Python实现简单音频数据压缩与解压算法

Python实现简单音频数据压缩与解压算法 引言 在音频数据处理中&#xff0c;压缩算法是降低存储成本和传输效率的关键技术。Python作为一门灵活且功能强大的编程语言&#xff0c;提供了丰富的库和工具来实现音频数据的压缩与解压。本文将通过一个简单的音频数据压缩与解压算法…...

Easy Excel

Easy Excel 一、依赖引入二、基本使用1. 定义实体类&#xff08;导入/导出共用&#xff09;2. 写 Excel3. 读 Excel 三、常用注解说明&#xff08;完整列表&#xff09;四、进阶&#xff1a;自定义转换器&#xff08;Converter&#xff09; 其它自定义转换器没生效 Easy Excel在…...