VMware+ubuntu 18.04 百度Apollo5.0平台搭建

本文基本按照该地址步骤进行:
https://blog.csdn.net/qq_34906391/article/details/81478968

更改 apt-get 添加镜像源:

为了加快下载速度,首先添加镜像源。

  1. 一些操作过程需要用到Vim指令:https://www.cnblogs.com/88999660/articles/1581524.html
  2. 更改镜像:https://blog.csdn.net/zgljl2012/article/details/79065174

Install Docker

  1. 步骤:https://blog.csdn.net/qq_34906391/article/details/81478968
  2. E: 无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用)
    https://blog.csdn.net/qq_38019633/article/details/84024309
  3. 安装成功
    测试
sudo docker run hello-worl

在这里插入图片描述
4. Docker知识:http://www.ruanyifeng.com/blog/2018/02/docker-tutorial.html

Install ROS(melodic version)

  1. https://wangxin1248.github.io/linux/2019/07/ubuntu-install-ros.html
  2. 采用中科大源之后出现问题:提示Depends: ros-kinetic-desktop but it is not going to be installed
    https://blog.csdn.net/xiangxianghehe/article/details/78483799
    或者改成清华源:https://blog.csdn.net/shanpenghui/article/details/80433555
  3. 安装完成
    在这里插入图片描述
  4. 查看已经安装的ROS软件
$ apt-cache search ros-melodic

在这里插入图片描述
5. 错误,https://www.cnblogs.com/wjundong/p/10701160.html
在这里插入图片描述在这里插入图片描述

参考网上方法,连接4G方法后还是不行。
https://blog.csdn.net/weixin_39036700/article/details/81566982
参考该文,在list已经写进/etc/ros/rosdep/sources.list.d/20-default.list基础上进行apt-get update操作。
在这里插入图片描述
还有一种网上的方法,因为上述方法已经成功,所以还未尝试下列方法,该方法实质是自己把list写进了/etc/ros/rosdep/sources.list.d/20-default.list文件中:
https://blog.csdn.net/qq_41058594/article/details/102970901
6. 测试成功
在这里插入图片描述
7. 小海龟:https://blog.csdn.net/haiyinshushe/article/details/84256137
https://blog.csdn.net/WY_star1/article/details/81564319

小海龟例子

第一个终端

roscore

打开第二个终端

rosrun turtlesim turtlesim_node

再开起一个终端控制

rosrun turtlesim turtle_teleop_key

在第三个终端里键盘控制上下左右小海龟就能运动了。
在这里插入图片描述
Ctrl+c 关闭ROS进程。

Download Apollo

  1. 下载Apollo镜像
git clone https://github.com/ApolloAuto/apollo
  1. 添加public RSA,如果采用ssh下载,需要此步骤。
    https://www.cnblogs.com/qcwblog/p/5709720.html
  2. Git clone 速度缓慢,可以使用码云进行拉取。
    https://blog.csdn.net/xy_zhangchn/article/details/81558144
    4. Git clone出现错误
    error: RPC failed; curl 56 GnuTLS recv error (-110): The TLS connection was non-properly terminated.
    https://zhuanlan.zhihu.com/p/53961303
    其中,sudo dpkg-buildpackage -rfakeroot –b -uc –us, -uc –us为取消签名操作。

While signing a package isn’t necessary, and the -uc -us options can
be used to avoid that step, it can also be helpful to sign a package,
especially if others will be using it, or you’ll be sending it via
insecure communications paths. And it isn’t hard at all.

https://serverfault.com/questions/191785/how-can-i-properly-sign-a-package-i-modified-and-recompiled
在这里插入图片描述在这里插入图片描述

  1. 错误,error: RPC failed; curl 18 transfer closed with outstanding read data remaining
    https://blog.csdn.net/it_liuchengli/article/details/77040806
git clone –- depth 1  https://gitee.com/jeremy-ma/apollo.git 

在这里插入图片描述

Install Apollo Kernel

  1. Instruction from Apollo
    在这里插入图片描述
  2. Reboot 重启后查看是否是我们需要的内核:
    https://blog.csdn.net/taoshengzhao369/article/details/86293702
    在这里插入图片描述

Install Apollo platform

  1. 出现提醒:ROS_DISTRO was set to 'melodic' before. Please make sure that the environment does not mix paths from different distributions.
    暂时还不知道是否有影响。
    在这里插入图片描述

Apollo 编译

  1. 步骤
cd Apollo 
bash docker/scripts/dev_start.sh -C #-C表示从中国镜像服务器下载,速度较快

-c如果报错误,则取消-c,只是速度会较慢。
在这里插入图片描述在这里插入图片描述

bash docker/scripts/dev_into.sh
bash apollo.sh build  #若提示权限不足,则sudo 
bash scripts/bootstrap.sh #启动人机交互界面 

随后可以在Chrome或Firefox浏览器中打开网址http://localhost:8888/
参考 https://blog.csdn.net/davidhopper/article/details/85097502

  1. 错误,查询后发现是磁盘空间不足引起的
    gcc: internal compiler error: killed (program cc1plus)
    在这里插入图片描述
    进行磁盘扩容和加一个交换分区(swap):
    https://blog.csdn.net/fa544384733/article/details/82730513

在这里插入图片描述在这里插入图片描述在这里插入图片描述在这里插入图片描述
在这里插入图片描述

附录

  1. docker 知识:
    https://yeasy.gitbooks.io/docker_practice/content/introduction/what.html
  2. 编译速度缓慢
    在这里插入图片描述
  3. 安装deb包的方法
    https://blog.csdn.net/kevinhg/article/details/5934462
dpkg -i <package.deb>
  • 2
    点赞
  • 26
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值