ROS2 MAC OS Install(非原创),安装过程记录一下

注意

(1)如果安装了anaconda,请将~/.bash_profile文件中的export PATH="/anaconda3/bin:$PATH"屏蔽,否则默认使用anaconda中的python,导致接下来安装catkin_pkg错误。

(2)需要注意tinyxml2的版本,在ROS 2 Bouncy Bolson的时候tinyxml2的版本要求是6,而macOS 10.14.1的tinyxml2是7,需要降版本。

安装

ROS2的安装有两种方式:Binary packages与Building from source,这里选择Binary packages安装方式。

1. 安装brew(一般一定安装),参考https://brew.sh/网址。

安装brew后,在Terminal中执行

$ brew doctor

修复一些错误。

2. 安装一些库文件

$ brew install python3

# install asio and tinyxml2 for Fast-RTPS
$ brew install asio tinyxml2 # install dependencies for robot state publisher
$ brew install tinyxml eigen pcre poco # OpenCV isn't a dependency of ROS 2, but it is used by some demos.
$ brew install opencv # install OpenSSL for DDS-Security
$ brew install openssl # install Qt for RViz
$ brew install qt freetype assimp

3. 安装一些其他的依赖裤

$ python3 -m pip install catkin_pkg empy git+https://github.com/lark-parser/lark.git@0.7b pyparsing pyyaml setuptools argcomplete

4. 关闭系统的SIP

重启系统后,按住command+R键,进入Recovery OS,启动Terminal,输入

$ csrutil status

如果显示:System Integrity Protection status: enabled.那么需要关闭,在终端输入

$ csrutil disable

关闭SIP

5. 下载ROS2

进入https://github.com/ros2/ros2/releases找到对应的版本,macOS应该下载到~/Downloads/ros2-package-osx-x86_64.tar.bz2。

解压:

$ mkdir -p ~/ros2_install
$ cd ~/ros2_install
$ tar xf ~/Downloads/ros2-package-osx-x86_64.tar.bz2

6. 安装DDS(Data Distribution Service)

如果需要OpenSplice的支持,那么需要去 https://github.com/ADLINK-IST/opensplice/releases下载,然后解压,在~/.bash_profile文件中文件中添加OSPL_HOME环境变量,路径中必须包含release.com,如:

export OSPL_HOME=/Users/<name>/x86_64.darwin10_clang/

如果需要RTI支持,那么在https://www.rti.com/free-trial中下载一个30试用版本,安装完成后,在~/.bash_profile文件中添加:

export NDDSHOME=/Applications/rti_connext_dds-5.3.1/

7. 设置ROS2

进入ROS2环境

$ . ~/ros2_install/ros2-osx/setup.bash

运行一个例子测试,在一个终端中运行:

$ ros2 run demo_nodes_cpp talker

在另一个终端中运行:

$ ros2 run demo_nodes_cpp listener

8. 安装vsc, colcon等

$ python3 -m pip install argcomplete catkin_pkg colcon-common-extensions coverage empy flake8 flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes mock nose pep8 pydocstyle pyflakes pyparsing setuptools vcstool

9. 参考:

https://index.ros.org/doc/ros2/OSX-Install-Binary/


ROS2 MAC OS Install的更多相关文章

  1. RabbitMQ for Mac OS Install

    使用brew来安装 RabbitMQ brew install rabbitmq 执行看到如下命令: Updating Homebrew... ==> Auto-updated Homebrew ...

  2. mac下的改装人生——制作mac os 启动盘

    我即将开始对我的mac进行彻底的改造,现在还需要的是一个mac的启动盘或者启动光盘.由于没钱买mac的安装光盘或者安装盘,只能网上下了一个镜像自己做启动盘~ 需要:装有Mac Os的电脑,至少8g的u ...

  3. Install Docker on Mac OS X(转)

    Install Docker on Mac OS X You can install Docker using Boot2Docker to run docker commands at your c ...

  4. Install wget in Mac OS X Without Homebrew or MacPorts

    May 22, 2012 - 31 Comments The command line tool wget lets you retrieve a group of files from FTP an ...

  5. mac os 10.10 pod install errors

    /System/Library/Frameworks/Ruby.framework/Versions//gems/rake-/bin/rake RUBYARCHDIR=/Library/Ruby/Ge ...

  6. install Mac OS on Vmware

    本文将用详尽的图文介绍如何在虚拟机中安装运行Mac OS X,只要严格地按照本教程一步步操作,即使不了解苹果电脑的读者,也能顺利地安装并运行Mac OS X. 一.准备工作 VMWare 12 Pro ...

  7. Mysql On Mac OS: Remove & Install

    If you downloaded and installed from .dmg package already, and mightbe sometime it sucks because of ...

  8. Install Terraform on Windows, Linux and Mac OS

    Step-by-step tutorial of how to download and install Terraform on Windows, Linux and Mac OS. Terrafo ...

  9. Install MySQL on Mac OS X——MAC安装MySQL

    很多关于如何安装MySQL的教程已经过时了,或者比必须的步骤复杂得多.这篇教程将展示如何安装MySQL,启动MySQL,以root用户进入MySQL,以及创建删除退出数据库. Step 1: 下载My ...

随机推荐

  1. 13、IO (File、递归)

    File File类的概述和作用 * A:File类的概述和作用 * a: File的概念 * File类是文件和目录路径名的抽象表示形式 * Java中把文件或者目录(文件夹)都封装成File对象 ...

  2. Spring Boot学习笔记(三)实现热部署

    pom文件中添加如下依赖即可 <dependency> <groupId>org.springframework.boot</groupId> <artifa ...

  3. poj 1833 排列 STL 全排列公式

    排列 Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 15173   Accepted: 6148 Description 题 ...

  4. lambda 表达式学习笔记

    在Java中传递一个代码段并不容易,不能直接传递代码段.Java是一个面向对象语言,所以必须构造一个对象,这个对象的类需要一个方法能包含所需的代码.lambda的出现有效的解决这个问题,让代码变得更加 ...

  5. word 文档刷文字格式

    WORD文档增加的宏文件, 作用:对全文中文字体更改为,DFKai-SB :对英文字母字体更改为,Times New Roman Sub AutoClose() Selection.WholeStor ...

  6. 洛谷P3763 [TJOI2017]DNA(后缀数组 RMQ)

    题意 题目链接 Sol 这题打死我也不会想到后缀数组的,应该会全程想AC自动机之类的吧 但知道这题能用后缀数组做之后应该就不是那么难了 首先把\(S\)和\(S0\)拼到一起跑,求出Height数组 ...

  7. Vijos / 题库 / 输油管道问题

    背景 想念car的GF,car就出了道水题! 描述 某石油公司计划建造一条由东向西的主输油管道.该管道要穿过一个有n 口油井的油田.从每口油井都要有一条输油管道沿最短路经(或南或北)与主管道相连.如果 ...

  8. 文本(TextView)

    今天给大家介绍一下简单的文本. 首先我们看下TextView的继承关系和一些基本的属性: xml文件如下: <?xml version="1.0" encoding=&quo ...

  9. 实用爬虫-01-检测爬虫的 IP

    实用爬虫-01-检测爬虫的 IP 本篇介绍一个识别爬虫 ip 的小实例(教你一招识破无效的 ip 代理) [注意事项]: 1.url 可能会失效(个人感觉,因为它带了一个2018,下面附上链接获取方法 ...

  10. HW—词频统计

    第一次个人作业——词频统计 第一次做这种大作业,明显感觉陌生,各种规范和技能也是第一次使用,希望自己好运. 目录:一.基本要求 二.需求分析及时间估计 三.实现思路及过程 四.测试用例.时间性能分析及 ...