ROS系统——ROS、realsense-ros的安装配置流程

2023-05-16

1 系统要求

  • Ubuntu 18.04
  • Linux内核版本不超过5.4

2 ROS安装方法(melodic版)

1、添加ROS软件源(TX2使用自带源即可,该步可省去)

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

2、添加公钥

sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

3、更新

确保包索引是最新的:

sudo apt update

检查cmake的版本,尽量升级到最新版本:https://blog.csdn.net/RNG_uzi_/article/details/107016899

4、安装ros

这里介绍桌面完整版(推荐): 包含 ROS、rqt、rviz、机器人通用库、2D/3D 模拟器、导航以及 2D/3D 感知包, 其他参考官方网站。

sudo apt install ros-melodic-desktop-full

5、初始化 rosdep

sudo rosdep init

rosdep update

备注:上述两条命名可能报错:

sudo rosdep init错误

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

解决办法1

  1. 打开hosts文件
  2. sudo gedit /etc/hosts
  3. #在文件末尾添加
  4. 151.101.84.133 raw.githubusercontent.com
  5. #保存后退出再尝试

备注:raw.githubusercontent.com的其他IP访问地址,可以通过http://tool.chinaz.com/dns网站查询,选择ping最小值那个IP地址。

解决办法2

  1. sudo c_rehash /etc/ssl/certs
  2. sudo -E rosdep init
  3. rosdep update

如果还是提示错误,请将源更更换为清华源,然后sudo apt update
(请将网络换成手机热点)

rosdep update出错

reading in sources list data from /etc/ros/rosdep/sources.list.d

ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml]:

<urlopen error _ssl.c:495: The handshake operation timed out> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml)

Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml

ERROR: error loading sources list:

The read operation timed out

运行:(网络换成手机热点,如果是time out,那就多尝试几次)

  1. sudo apt-get update
  2. sudo apt-get install python-rosdep

6、设置环境

echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc

source ~/.bashrc

7、安装rosinstall,便利的工具

sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential

使用下面命令安装ROS插件(包括3D包围框)

sudo apt install ros-melodic-jsk-rviz-plugins

8、检验安装

打开终端,输入roscore命令,可以看到ROS已经成功在ubuntu上运行起来。

卸载melodic的方法

sudo apt-get remove ros-melodic-*

ROS安装主要参考:https://www.guyuehome.com/10082

其他可能遇到的问题及其解决方案:

  • 18.04 安装ros 出现 ERROR: cannot download default sources list from: https://raw.githubusercontent.com/......:https://blog.csdn.net/qq_35822136/article/details/106320587

  • Ubuntu18.04 ROS填坑之 roscore Command ‘roscore‘ not found:     https://blog.csdn.net/jdx130/article/details/107647324

  • Resource not found: rgbd_launch 解决方案:https://blog.csdn.net/Hacker_MAI/article/details/108009916

3 realsense-ros安装

安装方法参照官网:https://github.com/IntelRealSense/realsense-ros  中方法1(使用apt-get直接安装)

3. 1 apt install 安装方式

#18.04 直接安装

$export ROS_VER=melodic 

#16.04

$export ROS_VER=kinetic 
安装realsense2-camera
$sudo apt-get install ros-$ROS_VER-realsense2-camera

(This will install both realsense2_camera and its dependents, including librealsense2 library.)

  • The version of librealsense2 is almost always behind the one availeable in RealSense™ official repository.
  • librealsense2 is not built to use native v4l2 driver but the less stable RS-USB protocol. That is because the last is more general and operational on a larger variety of platforms.
  • realsense2_description is available as a separate debian package of ROS distribution. It includes the 3D-models of the devices and is necessary for running launch files that include these models (i.e. rs_d435_camera_with_model.launch). It can be installed by typing: sudo apt-get install ros-$ROS_VER-realsense2-description

3. 2 源码下载的安装方式

3.2.1 需要先安装 SDK

https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md#installing-the-packages

3.2.2 源码下载

$mkdir -p ~/catkin_ws/src

$cd ~/catkin_ws/src/

$git clone https://github.com/IntelRealSense/realsense-ros.git

$cd realsense-ros/ git checkout `git tag | sort -V | grep -P "^2.\d+\.\d+" | tail -1`

$cd ..

$catkin_init_workspace

$cd ..

$catkin_make clean

$catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release

$catkin_make install

3.3 测试:

  1.     将realsense相机插入主机
  2.     新建终端,并执行:roslaunch realsense2_camera rs_camera.launch
  3.     再新建一个终端,并执行:rviz
  4.     在弹出的rviz软件中,左下角有个‘Add’,然后在弹框中选择‘By topic’,如果能看到camera数据源,表示成功安装。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ROS系统——ROS、realsense-ros的安装配置流程 的相关文章

  • 异常检测 and 自编码器(2)

    文章目录 前言一 自编码器用于异常检测的网址推荐1 自编码器AutoEncoder解决异常检测问题2 基于自编码器的时间序列异常检测算法3 深度学习实现自编码器Autoencoder神经网络异常检测心电图ECG时间序列 总结 前言 上篇文章
  • python树莓派3控制蜂鸣器_树莓派3 modelB型 连接HC-SR501人体红外感应模块和蜂鸣器模块...

    连接前准备 树莓派3 modelB型一个 HC SR501传感器一只 低电平蜂鸣器模块 有源 即接上电就会响 xff0c 低电平触发 母对母杜邦线三根 实物图如下 xff1a 博主连接的不是特别美观 两个传感器的连接图分别如下 HC SR5
  • git submodule 使用教程

    1 submoude 介绍 xff08 1 xff09 项目很大参与开发人员多的时候 xff0c 需要将各个模块文件进行抽离单独管理 xff08 2 xff09 使用git submodule来对项目文件做成模块抽离 xff0c 抽离出来的
  • 为什么笔记本电脑电源适配器基本是19V供电

    为什笔记本电源适配器供电一般不是20V xff0c 不是25V xff0c 偏偏是19V呢 xff0c 我们从硬件角度聊聊这个问题 首先一个大背景是 xff0c 笔记本电池基本都是锂电池为主 xff0c 在设计上 xff0c 一般会使用多枚
  • 基于国产飞腾、Intel X86等CPU主板设计与调试入门指导

    知识就像货币 xff0c 流动才有意义 一 前言 因为我是做硬件的 xff0c 想用这样一篇文章介绍一下我们常见的电脑主板 xff0c 或者说电路板卡 xff0c 是怎么设计出来的 仅以技术之所学 xff0c 得此文章 xff0c 若有表达
  • 两台电脑直接使用一根网线传输文件

    教程 目录 xff1a https blog csdn net dkbnull article details 87933584 有时候我们需要在两台电脑之间传输几十G的大文件 xff0c 或者置换新电脑时复制文件到新电脑 xff0c 而我
  • keil5(ARM)的下载和安装教程

    Keil 5的下载与安装 下载和安装教程均在以下百度网盘链接中 链接 xff1a 百度网盘 请输入提取码 https pan baidu com s 11N8EwQRBT 5AzXmW7y1X6A 提取码 xff1a efv3
  • git 远程分支与本地分支

    前言 远程仓库上只有 1 个 master 分支 复制远程仓库的地址 3 克隆远程仓库到本地 一 注意 xff1a 本地的 head 和 master 文件都存在 xff0c 但是 remote 的 master 信息是保存在文件 git
  • ARM 自己动手安装交叉编译工具链

    一 Windows中装软件的特点 Windows中装软件使用安装包 xff0c 安装包解压后有2种情况 xff1a 一种是一个安装文件 xff08 exe msi xff09 xff0c 双击进行安装 xff0c 下一步直到安装完毕 安装完
  • ARM X210开发板的软开关按键问题

    一 X210 开发板的软启动电路详解 x210bv3 pdf 1 210 供电需要的电压比较稳定 xff0c 而外部适配器的输出电压不一定那么稳定 xff0c 因此板载了一个文稳压器件 MP1482 这个稳压芯片的作用就是外部适配器电压在一
  • pyqt5 编写串口通讯上位机_如何使用Python开发串口通讯上位机(二)

    黑色的dos窗口对于大部分来说 xff0c 页面极为不友好 xff0c 且操作不方便 xff0c 因此本篇主要讲讲如何结合QtDesigner创建一个UI并初步与串口Api链接 1 QtDesigner进行上位机页面设计 Python下的软
  • TensorRT介绍

    TensorRT 文章目录 TensorRT训练和推理的区别TensorRTTensorRT 优化和性能TensorRT 工作原理Python APIImporting TensorRT Into PythonCreating A Netw
  • Pytorch 加载图像数据(ImageFolder和Dataloader)

    Pytorch加载图像数据集需要两步 xff0c 首先需要使用 torchvision datasets ImageFolder 读取图像 xff0c 然后再使用torch utils data DataLoader 加载数据集 Image
  • S2A-NET

    S2A NET 文章目录 S2A NET基础知识引言网络架构FAMARNACL 对齐卷积ODM 实现损失函数推理消融实验 参考 基础知识 长边 13 5 135 circ
  • [已解决] New Bing Chat报错: Sorry, looks like your network settings are preventing access to this feature

    文章目录 前因解决方案参考 前因 更改全局XX xff0c 线路选择美国 xff0c 做足一切准备 xff0c 让Bing认为我是一个彻头彻尾的美国用户 高兴地以为终于能在Microsoft Edge Dev版本中体验 New Bing C
  • 腾讯手游助手修改共享目录/缓存目录/Temp文件夹路径

    使用帮助 目录 xff1a https blog csdn net dkbnull article details 87933584 我们在电脑上安装了 腾讯手游助手 后 xff0c 发现 腾讯手游助手 的 缓存目录 游戏安装目录 共享目录
  • 【大学时光】回首向来萧瑟处,归去,也无风雨也无晴

    现状 自2023年始 xff0c 人生突遇大变 相恋四年的男友 xff0c 本以为要携手步入婚姻 xff0c 奈何由于对方母亲的缘故 xff0c 不得不忍痛舍弃四年的感情 同时间段 xff0c 因实在无法再忍受不了组内的PUA气氛 xff0
  • ChatGPT背后的技术:人类反馈强化学习RLHF

    文章目录 前言Chat GPT是如何基于RLHF进行训练的RLHF 技术分解预训练语言模型训练奖励模型强化学习微调预训练模型 局限性参考 前言 随着OpenAI推出的Chat GPT火热出圈 xff0c Chat GPT背后的技术原理之一
  • 【YOLO 系列】YOLO v4-v5先验知识

    文章目录 输入端Mosaic数据增强Self Adversarial TrainingCmBN 主干网络Mish激活函数DropBlock 正则化CSPNetFocus结构 NeckPANet 输出目标损失函数IoU LossGIoU Lo
  • 人脸识别之SphereFace

    论文 xff1a SphereFace xff1a Deep Hypersphere Embedding for Face Recognition 首先 xff0c 需要先科普一下在训练和测试人脸识别分类器的时候经常被提到的Open set

随机推荐