Ubuntu下google建图cartographer包移植

因团队需要,原本ubuntu14.04的操作系统要升级到ubuntu16.04,原本安装的ROS还有各种软件包都需要重新安装,普通得工作空间只需要复制src目录下的文件(也就是源代码文件)到一个新的src的下,然后catkin_make就能正常使用。

然而对于cartographer来说,由于其官方给出的安装方式,比较特别,所以移植的方式也稍微复杂一点。

一下代码为cartographer官方给出的安装代码:

# Install wstool and rosdep.

sudo apt-get update

sudo apt-get install -y python-wstool python-rosdep ninja-build

 

# Create a new workspace in 'catkin_ws'.

mkdir catkin_ws

cd catkin_ws

wstool init src

 

# Merge the cartographer_ros.rosinstall file and fetch code for dependencies.

wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_ros/master/cartographer_ros.rosinstall

wstool update -t src

 

# Install deb dependencies.

# The command 'sudo rosdep init' will print an error if you have already

# executed it since installing ROS. This error can be ignored.

sudo rosdep init

rosdep update

rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y

 

# Build and install.

catkin_make_isolated --install --use-ninja

source install_isolated/setup.bash

 

    在移植平台的时候,    这两段命令还是需要进行的。

sudo apt-get update

sudo apt-get install -y python-wstool python-rosdep ninja-build

mkdir catkin_ws

cd catkin_ws

wstool init src

    进入这个步骤以后,就不需要进行wstool merge -t src https://raw.githubuserco……这个步骤了,这个步骤是从google的网站下在包,但是国内的情况并不是很好,既然你第一次下载好了,或者对之前的文件进行过一些修改,这时候,直接把原src下的文件复制过来,然后继续下边的步骤

sudo rosdep init

rosdep update

rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y

 

# Build and install.

catkin_make_isolated --install --use-ninja

source install_isolated/setup.bash

 

这样基本能够达到跟以前的工作空间一样的效果

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值