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

jetson配置笔记


typora-root-url: /home/msj/ubuntu笔记本台式机环境配置说明/images


Ubuntu18.04 配置

说明:我们所有文档配置都是按照ubuntu18.04,保证x86架构(笔记本台式机)和 ARM架构(jetson Nano只能安装18.04)的一致性

1. 更换各类源

我们所有源都更换清华源, 如有问题请参考官网

1.1 ubuntu

Ubuntu 的软件源配置文件是 /etc/apt/sources.list。将系统自带的该文件做个备份,将该文件替换为清华源,即可使用选择的软件源镜像。

# 备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup#打开文件,内容更换成下面内容并保存
sudo gedit /etc/apt/sources.list
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiversedeb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-proposed main restricted universe multiverse

2.安装ROS-Melodic

  • 设置清华源的source.list
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
  • 设置GPG Key,并更新
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt update
  • 安装桌面完整版
sudo apt install ros-melodic-desktop-full

如果安装额外的其他包,用下面命令

sudo apt install ros-melodic-PACKAGE_NAME
  • 设置环境变量,令每个终端窗口都可以启动ros
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
  • 安装依赖
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
  • 初始化rosdep
sudo rosdep init

Bug1 - 会出现错误:这个错误是因为网络无法连接,无法下载20-default.list文件

ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down.

Solution1 - 我们参考清华源处理方法,也有其他更改下载链接方法,请自行百度。

# 手动模拟 rosdep init
sudo mkdir -p /etc/ros/rosdep/sources.list.d/
sudo curl -o /etc/ros/rosdep/sources.list.d/20-default.list https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
# 为 rosdep update 换源
export ROSDISTRO_INDEX_URL=https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml
rosdep update# 每次 rosdep update 之前,均需要增加该环境变量
# 为了持久化该设定,可以将其写入 .bashrc 中,例如
echo 'export ROSDISTRO_INDEX_URL=https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml' >> ~/.bashrc
#更新
rosdep update

出现以下输出:

reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/base.yaml
Hit https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/python.yaml
Hit https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/ruby.yaml
Query rosdistro index https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Skip end-of-life distro "dashing"
Skip end-of-life distro "eloquent"
Skip end-of-life distro "foxy"
Skip end-of-life distro "galactic"
Skip end-of-life distro "groovy"
Add distro "humble"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Add distro "iron"
Skip end-of-life distro "jade"
Skip end-of-life distro "kinetic"
Skip end-of-life distro "lunar"
Skip end-of-life distro "melodic"
Add distro "noetic"
Add distro "rolling"
updated cache in /home/msj/.ros/rosdep/sources.cache
  • 测试是否安装成功,打开roscore
roscore

出现以下输出,显示ros证明安装成功.

外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传

3. 安装cartographer-ros

介绍

cartographer_ros的安装、编译、与运行

软件架构

cartographer_install:cartographer的依赖安装包、源码安装包、安装脚本

cartographer_ros_ws/src/cartographer:cartographer的源码(如果之后需要修改carto的算法,需要在这里修改)

cartographer_ros_ws/src/cartographer_ros:cartographer的ros接口

安装
  1. 如果之前安装过这些库,删除系统中之前安装过的相关依赖库。

    cd /usr/local/include
    sudo rm -rf absl
    sudo rm -rf ceres
    sudo rm -rf cartographer
    cd google
    sudo rm -rf protobuf
    
  2. 卸载ros自带的proto2

    sudo apt-get remove libprotobuf-dev
    
  3. 安装一些系统依赖

    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 \python-wstool \python-rosdep \python-sphinx \libatlas-base-dev
    
  4. 安装cartographer_install中的依赖库

    • 如果之前安装过,需要事先删除依赖库中的build文件夹.
    • 最好不要使用脚本安装,最好手动安装,以看出每一步安装的具体报错.
    cd cartographer_install# 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# Build and install Ceres. 注意使用ninja编译可能失败 因为板子性能限制
    cd -
    cd ../../ceres-solver
    mkdir build
    cd build
    cmake .. -G Ninja -DCXX11=ON
    ninja
    #CTEST_OUTPUT_ON_FAILURE=1 ninja test
    sudo ninja install# 如果ninja编译卡死则用cmake编译, 如果上述步骤通过,忽略此步骤
    cd ..
    rm -rf build
    mkdir build
    cd build
    cmake ..
    make
    sudo make install# 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
    

装arm的:
cd …
把autogen.sh文件的属性改成可执行文件
./autogen.sh
./configure --host=arm-linux --with-protoc=protoc
make
sudo make install
ninja
sudo ninja install

Build and install Cartographer.

cd …/…/cartographer
mkdir build
cd build
cmake … -G Ninja
ninja
#CTEST_OUTPUT_ON_FAILURE=1 ninja test
sudo ninja install

#### 编译建立工作空间,并将我们准备的src(包含多个功能包的文件夹)拷贝到工作空间下(以后只需要修改cartographer_ros,即.launch和.lua文件)​```shell
# 创建工作空间
mkdir ~/msj_ws# 将我们src拷贝到工作空间下
cp YOUR_PATH/src ~/msj_wscatkin_make

https://google-cartographer-ros.readthedocs.io/en/latest/demos.html

相关文章:

jetson配置笔记

typora-root-url: /home/msj/ubuntu笔记本台式机环境配置说明/images Ubuntu18.04 配置 说明:我们所有文档配置都是按照ubuntu18.04,保证x86架构(笔记本台式机)和 ARM架构(jetson Nano只能安装18.04)的一致性 1. 更换各类源 我们所有源都更换清华源&a…...

使用select实现定时任务

selectOutOfTime.c里边的代码如下&#xff1a; #include<stdio.h> #include<sys/time.h> #include<sys/types.h> #include<unistd.h> #include <string.h>#define BUF_SIZE 100int main(void){fd_set reads;struct timeval tv;int errorNum;cha…...

uniapp的实战总结大全

&#x1f642;博主&#xff1a;冰海恋雨 &#x1f642;文章核心&#xff1a;uniapp部分总结 目录 ​编辑 目录 前言&#xff1a; 解决方案 1. 跨平台开发 2. Vue.js生态 3. 组件库 4. 自定义组件 5. Native能力 6. 插件生态 7. 性能优化 写法 1. 模板&#xf…...

No205.精选前端面试题,享受每天的挑战和学习

🤍 前端开发工程师(主业)、技术博主(副业)、已过CET6 🍨 阿珊和她的猫_CSDN个人主页 🕠 牛客高级专题作者、在牛客打造高质量专栏《前端面试必备》 🍚 蓝桥云课签约作者、已在蓝桥云课上架的前后端实战课程《Vue.js 和 Egg.js 开发企业级健康管理项目》、《带你从入…...

保序回归:拯救你的校准曲线(APP)

保序回归&#xff1a;拯救你的校准曲线&#xff08;APP&#xff09; 校准曲线之所以是评价模型效能的重要指标是因为&#xff0c;校准曲线衡量模型预测概率与实际发生概率之间的一致性&#xff0c;它可以帮助我们了解模型的预测结果是否可信。一个理想的模型应该能够准确地预测…...

清华镜像源地址,适用于pip下载速度过慢从而导致下载失败的问题

清华地址 https://pypi.tuna.tsinghua.edu.cn/simple下载各种各样的包的指令模板 pip install XXX -i https://pypi.tuna.tsinghua.edu.cn/simple这样就行了&#xff0c;XXX代表的是你将要下载的包名称。 比如&#xff1a; pip install opencv-python -i https://pypi.tuna.…...

arcgis--NoData数据处理

方法一&#xff1a;利用【栅格计算器】可以对NoData的值进行修改。【Spatial Analyst工具】-【地图代数】-【栅格计算器】&#xff0c;将NoData修改为某一个值。 方法二&#xff1a;先对原始数据进行重分类&#xff0c;分成1类&#xff0c;将NoData赋值为2,。然后&#xff0c;将…...

基于单片机教室人数实时检测系统仿真及源程序

一、系统方案 1、本设计采用51单片机作为主控器。 2、红外传感器检测进出人数&#xff0c;液晶1602显示。 3、按键最多容纳人数&#xff0c;烟雾报警。 二、硬件设计 原理图如下&#xff1a; 三、单片机软件设计 1、首先是系统初始化 void lcd_init() { lcd_write_com(0x38…...

【Linux笔记】Linux环境变量与地址空间

【Linux笔记】Linux环境变量与地址空间 一、命令行参数1.1、main函数的参数1.2、main函数的第三个参数 二、环境变量的概念与内容2.1、环境变量的概念2.2、环境变量的分类2.3、环境变量的组织形式2.4、常见的环境变量 三、设置环境变量3.1、通过命令获取或设置环境变量3.2、通过…...

【springboot】@restcontroller和@controller的区别

返回值不同&#xff1a;RestController注解的类中的所有方法都会返回JSON或XML等数据格式&#xff0c;而Controller注解的类中的方法可以返回JSP或HTML等视图页面。 默认注解不同&#xff1a;RestController注解中包含了ResponseBody注解&#xff0c;表示返回的数据会直接作为…...

oracle 不支持的字符集 orai18n.jar ZHS16GBK 异常问题解决

项目场景&#xff1a; 项目中有使用到oracle数据库来存在数据。 问题描述 在使用查询语句是&#xff0c;oracle会报错。 java.sql.SQLException: 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK 原因分析&#xff1a; 经排查发现缺少oracle字符集的依赖包导致的。…...

设计模式-04-原型模式

经典的设计模式有23种&#xff0c;但是常用的设计模式一般情况下不会到一半&#xff0c;我们就针对一些常用的设计模式进行一些详细的讲解和分析&#xff0c;方便大家更加容易理解和使用设计模式。 1-什么是原型模式 如果对象的创建成本比较大&#xff0c;而同一个类的不同对象…...

D. Jumping on Walls bfs

Problem - 199D - Codeforces 题目大意&#xff1a;有一个两个垂直的平行墙壁组成的一个峡谷。一个人初始是在左边墙壁第一层。在每个墙壁上有些障碍点&#xff0c;用X表示&#xff0c;这些障碍点不能被到达。&#xff0c;他可以执行以下三个操作&#xff1a; 向当前墙壁往上…...

preg_replace调用system(“ls“)

题目 <?php error_reporting(0); if(isset($_GET[code]) && isset($_POST[pattern])) {$pattern$_POST[pattern];if(!preg_match("/flag|system|pass|cat|chr|ls|[0-9]|tac|nl|od|ini_set|eval|exec|dir|\.|\|read*|show|file|\<|popen|pcntl|var_dump|pr…...

MT8788核心板主要参数介绍_联发科MTK安卓核心板智能模块

MT8788核心板是一款功能强大的4G全网通安卓智能模块&#xff0c;具有超高性能和低功耗特点。该模块采用联发科AIOT芯片平台。 MT8788核心板搭载了12nm制程的四个Cortex-A73和四个Cortex-A53处理器&#xff0c;最高主频可达2.0GHZ。它还配备了4GB64GB(2GB16GB、3GB32GB)的内存&a…...

Matlab批量提取图片特征向量

最近matlab数字图像处理课程需要&#xff0c;对上千张训练集测试集图片进行批量的特征提取&#xff0c;作为 SVM的输入。 所以就有了用matlab来批量提取图像特征向量&#xff0c;并保存&#xff0c;方便后续使用。 批量提取函数&#xff1a; % 函数返回参数% 分类列向量Categ…...

数据库系统原理与实践 笔记 #8

文章目录 数据库系统原理与实践 笔记 #8关系数据库设计(续)规范化(Normalization)范式(Normal Form)第一范式第二范式Boyce-Codd范式(BCNF)将模式分解成BCNFBCNF和保持依赖第三范式 函数依赖理论正则覆盖无关属性无关属性的验证无损分解保持依赖 数据库系统原理与实践 笔记 #8 …...

Ubuntu 和 Windows 文件互传

FTP 服务 FTP 采用 Internet 标准文件传输协议 FTP 的用户界面&#xff0c; 向用户提供了一组用来管理计算机之间文件传输的应用程序。在开发的过程中会频繁的在 Windows 和 Ubuntu 下进行文件传输&#xff0c;比如在 Windwos 下进行代码编写&#xff0c;然后将编写好的代码拿到…...

如何在WPF应用程序中全局捕获异常

在WPF (Windows Presentation Foundation) 应用程序中&#xff0c;你可以使用 AppDomain.CurrentDomain.UnhandledException 事件来全局捕获未处理的异常。这个事件会在应用程序中的任何地方发生未处理的异常时触发。以下是一个简单的例子&#xff0c;演示如何在WPF应用程序中全…...

自定义Matplotlib中的颜色映射(cmap)

要自定义Matplotlib中的颜色映射&#xff08;cmap&#xff09;&#xff0c;您可以按照以下步骤进行操作&#xff1a; 导入所需的库&#xff1a; import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import LinearSegmentedColormap创建自定义颜色映…...

微信小程序之bind和catch

这两个呢&#xff0c;都是绑定事件用的&#xff0c;具体使用有些小区别。 官方文档&#xff1a; 事件冒泡处理不同 bind&#xff1a;绑定的事件会向上冒泡&#xff0c;即触发当前组件的事件后&#xff0c;还会继续触发父组件的相同事件。例如&#xff0c;有一个子视图绑定了b…...

DockerHub与私有镜像仓库在容器化中的应用与管理

哈喽&#xff0c;大家好&#xff0c;我是左手python&#xff01; Docker Hub的应用与管理 Docker Hub的基本概念与使用方法 Docker Hub是Docker官方提供的一个公共镜像仓库&#xff0c;用户可以在其中找到各种操作系统、软件和应用的镜像。开发者可以通过Docker Hub轻松获取所…...

Leetcode 3577. Count the Number of Computer Unlocking Permutations

Leetcode 3577. Count the Number of Computer Unlocking Permutations 1. 解题思路2. 代码实现 题目链接&#xff1a;3577. Count the Number of Computer Unlocking Permutations 1. 解题思路 这一题其实就是一个脑筋急转弯&#xff0c;要想要能够将所有的电脑解锁&#x…...

跨链模式:多链互操作架构与性能扩展方案

跨链模式&#xff1a;多链互操作架构与性能扩展方案 ——构建下一代区块链互联网的技术基石 一、跨链架构的核心范式演进 1. 分层协议栈&#xff1a;模块化解耦设计 现代跨链系统采用分层协议栈实现灵活扩展&#xff08;H2Cross架构&#xff09;&#xff1a; 适配层&#xf…...

重启Eureka集群中的节点,对已经注册的服务有什么影响

先看答案&#xff0c;如果正确地操作&#xff0c;重启Eureka集群中的节点&#xff0c;对已经注册的服务影响非常小&#xff0c;甚至可以做到无感知。 但如果操作不当&#xff0c;可能会引发短暂的服务发现问题。 下面我们从Eureka的核心工作原理来详细分析这个问题。 Eureka的…...

SiFli 52把Imagie图片,Font字体资源放在指定位置,编译成指定img.bin和font.bin的问题

分区配置 (ptab.json) img 属性介绍&#xff1a; img 属性指定分区存放的 image 名称&#xff0c;指定的 image 名称必须是当前工程生成的 binary 。 如果 binary 有多个文件&#xff0c;则以 proj_name:binary_name 格式指定文件名&#xff0c; proj_name 为工程 名&…...

2025年渗透测试面试题总结-腾讯[实习]科恩实验室-安全工程师(题目+回答)

安全领域各种资源&#xff0c;学习文档&#xff0c;以及工具分享、前沿信息分享、POC、EXP分享。不定期分享各种好玩的项目及好用的工具&#xff0c;欢迎关注。 目录 腾讯[实习]科恩实验室-安全工程师 一、网络与协议 1. TCP三次握手 2. SYN扫描原理 3. HTTPS证书机制 二…...

MySQL 部分重点知识篇

一、数据库对象 1. 主键 定义 &#xff1a;主键是用于唯一标识表中每一行记录的字段或字段组合。它具有唯一性和非空性特点。 作用 &#xff1a;确保数据的完整性&#xff0c;便于数据的查询和管理。 示例 &#xff1a;在学生信息表中&#xff0c;学号可以作为主键&#xff…...

Redis上篇--知识点总结

Redis上篇–解析 本文大部分知识整理自网上&#xff0c;在正文结束后都会附上参考地址。如果想要深入或者详细学习可以通过文末链接跳转学习。 1. 基本介绍 Redis 是一个开源的、高性能的 内存键值数据库&#xff0c;Redis 的键值对中的 key 就是字符串对象&#xff0c;而 val…...

C# WPF 左右布局实现学习笔记(1)

开发流程视频&#xff1a; https://www.youtube.com/watch?vCkHyDYeImjY&ab_channelC%23DesignPro Git源码&#xff1a; GitHub - CSharpDesignPro/Page-Navigation-using-MVVM: WPF - Page Navigation using MVVM 1. 新建工程 新建WPF应用&#xff08;.NET Framework) 2.…...