当前位置: 首页 > 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创建自定义颜色映…...

Go 语言接口详解

Go 语言接口详解 核心概念 接口定义 在 Go 语言中&#xff0c;接口是一种抽象类型&#xff0c;它定义了一组方法的集合&#xff1a; // 定义接口 type Shape interface {Area() float64Perimeter() float64 } 接口实现 Go 接口的实现是隐式的&#xff1a; // 矩形结构体…...

【大模型RAG】Docker 一键部署 Milvus 完整攻略

本文概要 Milvus 2.5 Stand-alone 版可通过 Docker 在几分钟内完成安装&#xff1b;只需暴露 19530&#xff08;gRPC&#xff09;与 9091&#xff08;HTTP/WebUI&#xff09;两个端口&#xff0c;即可让本地电脑通过 PyMilvus 或浏览器访问远程 Linux 服务器上的 Milvus。下面…...

HTML 列表、表格、表单

1 列表标签 作用&#xff1a;布局内容排列整齐的区域 列表分类&#xff1a;无序列表、有序列表、定义列表。 例如&#xff1a; 1.1 无序列表 标签&#xff1a;ul 嵌套 li&#xff0c;ul是无序列表&#xff0c;li是列表条目。 注意事项&#xff1a; ul 标签里面只能包裹 li…...

五年级数学知识边界总结思考-下册

目录 一、背景二、过程1.观察物体小学五年级下册“观察物体”知识点详解&#xff1a;由来、作用与意义**一、知识点核心内容****二、知识点的由来&#xff1a;从生活实践到数学抽象****三、知识的作用&#xff1a;解决实际问题的工具****四、学习的意义&#xff1a;培养核心素养…...

1.3 VSCode安装与环境配置

进入网址Visual Studio Code - Code Editing. Redefined下载.deb文件&#xff0c;然后打开终端&#xff0c;进入下载文件夹&#xff0c;键入命令 sudo dpkg -i code_1.100.3-1748872405_amd64.deb 在终端键入命令code即启动vscode 需要安装插件列表 1.Chinese简化 2.ros …...

将对透视变换后的图像使用Otsu进行阈值化,来分离黑色和白色像素。这句话中的Otsu是什么意思?

Otsu 是一种自动阈值化方法&#xff0c;用于将图像分割为前景和背景。它通过最小化图像的类内方差或等价地最大化类间方差来选择最佳阈值。这种方法特别适用于图像的二值化处理&#xff0c;能够自动确定一个阈值&#xff0c;将图像中的像素分为黑色和白色两类。 Otsu 方法的原…...

vue3 定时器-定义全局方法 vue+ts

1.创建ts文件 路径&#xff1a;src/utils/timer.ts 完整代码&#xff1a; import { onUnmounted } from vuetype TimerCallback (...args: any[]) > voidexport function useGlobalTimer() {const timers: Map<number, NodeJS.Timeout> new Map()// 创建定时器con…...

关于 WASM:1. WASM 基础原理

一、WASM 简介 1.1 WebAssembly 是什么&#xff1f; WebAssembly&#xff08;WASM&#xff09; 是一种能在现代浏览器中高效运行的二进制指令格式&#xff0c;它不是传统的编程语言&#xff0c;而是一种 低级字节码格式&#xff0c;可由高级语言&#xff08;如 C、C、Rust&am…...

基于TurtleBot3在Gazebo地图实现机器人远程控制

1. TurtleBot3环境配置 # 下载TurtleBot3核心包 mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3.git git clone -b noetic https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git git clone -b noetic-dev…...

uniapp手机号一键登录保姆级教程(包含前端和后端)

目录 前置条件创建uniapp项目并关联uniClound云空间开启一键登录模块并开通一键登录服务编写云函数并上传部署获取手机号流程(第一种) 前端直接调用云函数获取手机号&#xff08;第三种&#xff09;后台调用云函数获取手机号 错误码常见问题 前置条件 手机安装有sim卡手机开启…...