前言:做这件事的初衷是为了有一天能够在openeuler上通过yum install ros-xxx来安装ros,想想都觉得很炫酷。
step0: 环境准备
系统环境 OpenEuler21.03
ROS2的版本 ros2-foxy
目前是2021年12月1日,ros2已经到了galactic,关于galactic可以参考
ROS 2 Documentation — ROS 2 Documentation: Galactic documentation
本章用于打包的是ros2的foxy版本,在ubuntu20.04上已经是比较成熟的版本,相关的文档参考:
ROS 2 Documentation — ROS 2 Documentation: Foxy documentation
由于ros2目前还没有相对比较完善的wiki, 因此在这边进行一定的总结
step1: 如何编译ros2的工程
1. 在ros1当中我们使用的catkin进行编译,在ros2当中我们使用colcon进行编译
关于colcon参考的
Bootstrap from source — colcon documentation
$ mkdir colcon-from-source && cd colcon-from-source
$ curl --output colcon.repos https://raw.githubusercontent.com/colcon/colcon.readthedocs.org/main/colcon.repos
$ mkdir src
$ vcs import src < colcon.repos # 这行要等很久
由于vcs感觉需要等很久很久,因此部分的包我已经上传到了gitee上面,大家可以去我的主页上查找
然后使用进行安装
./src/colcon-core/bin/colcon build --paths src/*
跟catkin一样我们需要source环境变量
souce ins