冰羚-README.md翻译

25 篇文章 4 订阅

iceoryx(冰羚) - 一个建立在POSIX系统上的IPC中间件

介绍

很高兴您已经接触到了IceOryx这个Eclipse项目,让我们快速了解一下背景,介绍这个项目的范围并且通过一些例子带你入门

首先,什么是IceOryx(冰羚)?

IceOryx是一个在 POSIX 系统上跨进程通信的的中间件,通过POXIS系统上共享内存的特性来完成一个真正的零拷贝数据传输机制。更多的信息可以在 1000 words iceoryx introduction in the eclipse newsletter.中了解。

起源于车载系统领域,进程间大数据量的数据传输对于实现驾驶辅助系统或者自动驾驶应用来说是很重要的。此外,在机器人以及游戏领域也存在相同的情况。

这些都和API有关!

不要在代码层面和API有过于紧密的绑定,可以将IceOryx冰羚的API看作是一个我们自己的plumbing API接口。

Don’t get too frighten of the API when strolling through the codebase. Think of iceoryx’s API as a “plumbing” one
(“plumbing” as defined in Git, which means low-level). We’re not using the “plumbing” API ourselves, but instead a typed API.
An example for a “porcelain” API would be ROS2. Others are listed in the next section.

Eclipse iceoryx用在了哪儿?

FrameworkDescription
ROS2Eclipse iceoryx can be used inside the robot operating system with rmw_iceoryx
eCALOpen-source middleware from Continental AG supporting pub/sub and various message protocols
RTA-VRTEAdaptive AUTOSAR platform software framework for vehicle computer from ETAS GmbH
Cyclone DDSPerformant and robust open-source DDS implementation maintained by ADLINK Technology Inc.

支持的平台

  • Linux
  • QNX
  • macOS (initial support - please test and report bugs)
  • Windows 10 (not yet - currently in progress)

那些领域可以使用IceOryx冰羚?

用户使用评价(这一段就不翻译了)

Andrew, the HAD developer
Andrew is a software developer at a startup working on autonomous cars. Currently their project is using ROS, because
it’s easy to get the car driving. After some months, he’s realizing that sending gigabytes around, leads to high runtime
demands with ROS. A college mentions iceoryx during lunch, which might be interesting because it has a zero-copy
mechanism and offers a ROS RMW implementation. Soon after giving iceoryx a try, Andrew is thrilled about it. He cannot only feel
the runtime performance boost, but also still keep using his beloved ROS visualization tools!

Martha, the indie game developer
Martha always had troubles with those silly game engines. Some are slow but free, others are fast but too expensive.
It’s a hard life if you’re independent. When a friend who works in the automotive industry mentions he has just started
using iceoryx, which offers fast shared memory communication she listens up. Iceoryx is solely passing pointers around
and does avoid copies to the utmost? “I’ll definitely try iceoryx in my new project and see if I can speed up the
performance with my low cost engine” she thinks while wandering home at night after the meetup with her friend.

Robby, the lonely robot
Robby is autonomous robot built during a research project at a university. He has a great set of features and can
astonish the crowds by creating a detailed map of the university building in under an hour. However, they made him use
that slow selfso he can stream his favorite video even faster!

Installation

iceoryx_utils 和 iceoryx_posh 被作为独立的cmake软件包进行部署。Posh使用了一些util中的功能并且依赖这些功能。你可以编译util和posh并且整合到已经存在的cmake项目中。

先决条件

Mac OS

在安装iceoryx之前你需要安装XCode,git以及ncurses库。使用下面的步骤安装ncurses库:

cd iceoryx
ICEORYX_DIR=$PWD
mkdir -p build
cd build
git clone https://github.com/mirror/ncurses.git 
cd ncurses
git checkout v6.2
./configure  --prefix=$ICEORYX_DIR/build/dependencies/ --exec-prefix=$ICEORYX_DIR/build/dependencies/ --with-termlib 
make -j12
make install

如果你想使用我们的Cyclone DDS网关,你必须先安装Cyclone DDS,请参照
https://github.com/eclipse-cyclonedds/cyclonedds.

Linux

虽然我们努力想做到符合POSIX标准,但我们建议使用Ubuntu18.04和至少GCC7.4.0进行开发.
你需要安装下面这些包:
sudo apt install cmake libacl1-dev libncurses5-dev pkg-config

此外,IceOryx对于MIT lisence授权的cpptoml库有可选的依赖,这个库被用来解析RouDi的配置文件(文件中包含了内存池的配置):cpptoml

Build with CMake (支持所有平台)

注意: 需要CMake3.5版本或者更高版本

The CMakeLists.txt from iceoryx_meta can be used to easily develop iceoryx with an IDE.

  1. 克隆仓库

    git clone https://github.com/eclipse/iceoryx.git
    
  2. 产生必要的编译文件

    cd iceoryx
    cmake -Bbuild -Hiceoryx_meta -DTOML_CONFIG=ON
    # when you have installed external dependencies like ncurses you have to add them
    # to your prefix path
    cmake -Bbuild -Hiceoryx_meta -DTOML_CONFIG=ON -DCMAKE_PREFIX_PATH=$(PWD)/build/dependencies/
    
  3. 编译源码

    cmake --build build
    
下面这些CMake开关时用于编译额外的功能特性的
switchdescription
dds_gatewaybuilds the iceoryx dds gateway using the cyclonedds dds stack, cyclonedds will be fetched and built as part of the build, see cyclonedds for details
examplesbuilds all examples
introspectionthe console introspection client which requires an installed ncurses library with terminfo support
testenables module-, integration- and component-tests
TOML_CONFIGactivates config file support by using toml, if this is deactivated the central broker RouDi is not being build
下面这些CMake switches用于定制iceoryx_posh的编译
switchdescription
IOX_MAX_PORT_NUMBERthe maximum number of ports RouDi can distribute to the clients
IOX_MAX_INTERFACE_NUMBERthe maximum number for interface ports, which are used for e.g. gateways
IOX_MAX_SUBSCRIBERS_PER_PUBLISHERthe maximum number of subscriber a publisher can deliver chunks
IOX_MAX_CHUNKS_ALLOCATE_PER_SENDERthe maximum number of chunks a sender can hold at a given time
IOX_MAX_HISTORY_CAPACITY_OF_CHUNK_DISTRIBUTORthe maximum number chunks available for the chunk history
IOX_MAX_CHUNKS_HELD_PER_RECEIVERthe maximum number of chunks a receiver can hold at a given time

上述表格中的常量值定义可以在iceoryx_posh/cmake/iceoryx_posh_deployment.cmake 中找到。

使用编译脚本编译(仅针对Linux 和QNX)

作为一个备选方案,我们提供了编译测试脚本用于整合iceoryx到我们的基础框架中去。

  1. 克隆仓库

    git clone https://github.com/eclipse/iceoryx.git
    
  2. 编译所有项目

    cd iceoryx
    ./tools/iceoryx_build_test.sh
    

使用下面的编译参数可以用于添加额外的功能:

switchdescription
cleanRemoves the build directory and performs a clean build. If you have installed ncurses locally into your build directory you have to reinstall it first.
testEnables module-, integration- and component-tests. The Googletest-Framework will be automatically fetched from github and the test will be executed and the end of the script.

使用colcon进行编译

iceoryx 可以使用colcon进行编译,这个对于ROS2开发者会提供更方便的整合编译。

mkdir -p iceoryx_ws/src
cd $_
git clone https://github.com/eclipse/iceoryx.git
cd ..
colcon build

这种构建方法与 rmw_iceoryx结合起来最有意义

恭喜!你已经编译了所有必须的内容,下面可以先试试例子程序。

Docker环境中编译和运行

如果你想避免在自己的开发机实机上安装,你可以使用Docker,在Docker容器中安装IceOryx冰羚。

文档

范例

你可以在example.目录下找到范例程序

iceoryx带来的创新

NameDescriptionTechnologies
Larry.RoboticsAn iceoryx demonstrator for tinker, thinker and toddlerDemonstrator
iceoryx-rsExperimental Rust wrapper for iceoryxRust
IceRayAn iceoryx instrospection client written in RustRust

Is something missing or you’ve got ideas for other nifty examples? Jump right away to the next section!

捐献

请参看CONTRIBUTING.md 进行了解(如果您想进行卷子)

Planned features

Get to know the upcoming features and the project scope in PLANNED_FEATURES.md.

Maintainers

  • Michael Pöhnl (michael.poehnl@de.bosch.com)
  • Christian Eltzschig (christian.eltzschig2@de.bosch.com)
  • Dietrich Krönke (dietrich.kroenke2@de.bosch.com)
  • Mathias Kraus (mathias.kraus2@de.bosch.com)
  • Matthias Killat (matthias.killat2@de.bosch.com)
  • Martin Hintz (martin.hintz@de.bosch.com)
  • Simon Hoinkis (simon.hoinkis2@de.bosch.com)
  • 0
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值