STEPS:

0. Install Homebrew

1.  Install 'Docker for Mac 18.03+',配置CPUs (n个CPUs,Bazel开n个线程编译), Memory (>2G,编译最小内存,推荐4G), Swap (>2G,推荐2G)

2. git clone ... apollo ...

3. 进入apollo目录,pull docker image for apollo (首次运行会pull 5G 的images)

./docker/scripts/dev_start.sh

*注意 这里的dev_start.sh需要修改下来适配Docker for Mac特性, 需要改成手动配置端口映射:

Replace
--net host \

with bellow, both 8887 and 8888 works.
-p 8887:8887 -p 8888:8888 \

4. 进入apollo container by using

./docker/scripts/dev_into.sh

5. Docker for mac 的实现基于轻量虚拟机技术,网络和文件系统共享完善。

在container中的/apollo文件夹直接映射host中的工作文件夹./apollo

6. 编译

./apollo.sh build

(or)

./apollo.sh build_no_perception dbg

由于macbook 13" 性能不佳或者网络不好(编译中可能会下载一个小文件),编译可能中断。

直接退出后重启docker, 清空container,重启apollo container进入接着编译

Bazel会自动跳过已编译过的项目。

整个编译过程大概要~1h,需要约10G硬盘空间。

7. 编译成功后运行

./scripts/bootstrap.sh

启动

andrew@in_dev_docker:/apollo$ ./scripts/bootstrap.sh

Started supervisord with dev conf

Start roscore...

voice_detector: started

dreamview: started

Dreamview is running at http://localhost:8888

8. 在host mac上打开chrome输入地址 localhost:8888

进入dreamview前端界面

From the dropdown box selet "Navigation" mode.

9.  Replay demo rosbag

To see if the system works, use the demo 'bag' which feeds the system.

下载演示数据集 demo_2.5.bag (~约3G)

# get rosbag note that the command download is required
python ./docs/demo_guide/rosbag_helper.py demo_2.5.bag 运行演示数据集 demo_2.5.bag
# You can now replay this demo "bag" in a loop with the '-l' flag
rosbag play -l demo_2.5.bag

Dreamview should show a running vehicle now.

Comments

1. Docker for mac的支持已经很好, mac可以用做代码编写和编译环境、模拟演示

2. 整个编译运行空间,大约需要50G +,mac ssd!,macbook 13"编译时间长

3. docker.qcow2 是docker用于存放image和container的单个文件,在docker for mac 中配置其大小最多为60G。

=============================

du -sh 查看当前文件夹大小

du -sh * | sort -n 统计当前文件夹(目录)大小,并按文件大小排序

  • #!/bin/bash
  • # Delete all containers
  • docker rm $(docker ps -a -q)
  • # Delete all images
  • docker rmi $(docker images -q)

Force-remove a running container

This command will force-remove a running container.

$ docker rm --force redis r

The main process inside the container referenced under the link redis will receive SIGKILL, then the container will be removed.

Remove all stopped containers

$ docker rm $(docker ps -a -q)

This command will delete all stopped containers. The command docker ps -a -q will return all existing container IDs and pass them to the rm command which will delete them. Any running containers will not be deleted.

Remove a container and its volumes

$ docker rm -v redis redis

This command will remove the container and any volumes associated with it. Note that if a volume was specified with a name, it will not be removed.

Macbook pro 13" compile Apollo 2.5的更多相关文章

  1. 小小程序员的生产力工具——2017款MacBook pro 13.3(附使用技巧和常用链接)

    新买的2017款 MacBook pro 13.3 九号到了,第一次用苹果笔记本,用了两天基本熟悉了,各种软件也安装的差不多,把一些小技巧分享给大家.先放几张图   使用小常识,希望可以帮到您一:尽量 ...

  2. Macbook pro 13" Installs Ubuntu 18.04

    最新版的 MacBook对Ubuntu的支持(或者反过来?)不是很好,但是除了Suspend和resume功能没找到方法使用外,其他都还好,可用. 1.mac在OSX中先安装refind引导,如果开启 ...

  3. MacBook Pro (13 英寸, 2017 年)安装win10系统

    准备: windows10系统镜像 16G或更大容量U盘(存放驱动,必须格式化为FAT) 官方提供的驱动软件 详细步骤: 1.打开Bootcamp,选择镜像文件 2.点击下一步,选择Bootcamp分 ...

  4. MacBook Pro (13 英寸, 2012 年中)安装win7系统

    准备: windows7 ISO镜像 16G或更大U盘(提前备份,需要格式化) Apple 官方提供的 windows7驱动程序 详细步骤: 1.打开Bootcamp,选择前两个选择点击继续,选择下载 ...

  5. MacBook Pro 安装win7 64 成功安装过程总结

    安装对象: MacBook Pro (13 英寸, 2010 年中) 中安装win7 64位操作系统(原版安装非Ghost),且只保留win7系统即可. 场景还原: 拿到笔记本时,笔记本中已无Mac ...

  6. 如何修复MacBook Pro过热:保持MacBook散热的13个技巧

    尽管MacBook Pro是一台能处理繁重工作量的高能效机器,但它却无法像市场上其他笔记本电脑一样避免过热.至于什么可以防止发热,那不是一两个技巧就能解决的问题.相反,这是一组技巧可以解决的挑战. 因 ...

  7. MacBook Pro 2019 13 inch & screen blink

    MacBook Pro 2019 13 inch & screen blink MacBook Pro 闪屏 https://macreports.com/mac-how-to-trouble ...

  8. 2016款MACBOOK PRO触控条版 安装WIN10初体验 及 无奈退货记

    新的2016MBP终于发布了,作为把苹果电脑装WIN使用的人,等候很久之后,终于可以行动了. 黄山松 (Tom Huang) 发表于博客园http://www.cnblogs.com/tomview/ ...

  9. macbook pro install ubuntu

    https://help.ubuntu.com/community/MacBookPro Determine your hardware revision To determine which ver ...

随机推荐

  1. iptables安装失败后-------------firewalld回归

    yum install firewalld systemctl stop iptables; systemctl mask iptables; systemctl unmask firewalld s ...

  2. Missing separate debuginfos, use: debuginfo-install

    环境:CentOS6.2 64位 操作:使用gdb调试C++查询MySQL数据库的程序 原因: 解决办法: 1.  修改文件/etc/yum.repos.d/CentOS-Debuginfo.repo ...

  3. Ubuntu安装Sublime Text 2

    参考资料:http://www.technoreply.com/how-to-install-sublime-text-2-on-ubuntu-12-04-unity/ 1.去Sublime Text ...

  4. QListView和QListWidget的区别

    QListView是基于Model,而QListWidget是基于Item.这是它们的本质区别. 往QListView中添加条目需借助QAbstractListModel: 如: MainWindow ...

  5. linux使用ip能ping通,但使用域名却不能访问的解决方法

    使用命令:yum -y update进行更新测试,一般测试结果为couldn't resolve hostmirrors.aliyun.com 解决方式参考博客couldn't resolve hos ...

  6. 三分 - HNU 13409 Flowers

    Flowers Problem's Link: http://acm.hnu.cn/online/?action=problem&type=show&id=13409&cour ...

  7. 模拟HttpContext单元测试

    众所周知 ASP.NET MVC 的一个显著优势即可以很方便的实现单元测试,但在我们测试过程中经常要用到HttpContext,而默认情况下单元测试框架是不提供HttpContext的模拟的,本文通过 ...

  8. C语言 百炼成钢24

    /* 题目60:从键盘中输入一个不超过40个字符的字符串, 再输入3个位数(每次删除一个字符),删除对应 位数的字符,然后输出删除指定字符后的字符串. 输入:hellokityManGood 3 6 ...

  9. 浅析 Hadoop 中的数据倾斜

    转自:http://my.oschina.net/leejun2005/blog/100922 最近几次被问到关于数据倾斜的问题,这里找了些资料也结合一些自己的理解. 在并行计算中我们总希望分配的每一 ...

  10. 使用命令行操控VirtualBox虚拟机

    (1)启动虚拟机:$ VBoxManage startvm <VMNAME> --type gui  #执行结束后,就会启动指定的虚拟机,几乎和平时没什么区别. $ VBoxManage ...