ROS2更換DDS

Alternative DDS sources

The demos will attempt to build against any detected DDS vendor.

The only bundled vendor is eProsima's Fast RTPS, which is included in the default set of sources for ROS 2.0.

If you would like to switch out the vendor below are the instructions.

When you run the build make sure that your chosen DDS vendor(s) are exposed in your environment.

When multiple vendors are present, you can choose the used RMW implementation by setting the environment variableRMW_IMPLEMENTATIONto the package providing the RMW implementation.If the environment variable is not set the "default" vendor will be used (for now this isrmw_fastrtps_cppif available, otherwise the first in alphabetical order).For example, thetalkerbinary will use the "default" vendor, but it can be invoked with different vendors, e.g.RMW_IMPLEMENTATION=rmw_connext_cpp talker.

In beta 1 and earlier

In the beta 1 and earlier releases theRMW_IMPLEMENTATIONenvironment variable was not yet supported.Instead multiple binaries were being provided.For example, thetalkerbinary will use the "default" vendor, but for each vendor there will also be a vendor specific binary fortalker, e.g.talker__rmw_connext_cpp.That way you can ensure you're using the right vendor for each binary by including the suffix when you run the program.

PrismTech OpenSplice (version 6.7.170912 or higher)

Choose one of the following options for PrismTech OpenSplice.

Debian packages built by OSRF (used in the default instruction sequence above)

sudo apt-get update

sudo apt-get install libopensplice67? # from repo.ros2.org

Add this to your~/.bashrc

export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml

Official binary packages from PrismTech

Install the packages provided byOpenSplice(we require at least version 6.7.170912).Remember to replace@@INSTALLDIR@@with the path where you unpacked the OpenSplice distribution.Then, source the ROSsetup.bashfile, and finally, source therelease.comfile in the root of the OpenSplice distribution to set theOSPL_HOMEenvironment variable appropriately.After that, your shell is ready to run ROS2 binaries with the official OpenSplice distribution.

You may also need to add the following line to your.bashrcfile:

export PTECH_LICENSE_FILE=path/to/prismtech.lic

Building OpenSplice from source

If you build OpenSplice from source, be sure to remember to following

the INSTALL.txt instructions and manually replace the @@INSTALLDIR@@

placeholder in the OpenSplice install/HDE/x86_64.linux/release.com

RTI Connext (version 5.3)

To use RTI Connext you will need to have obtained a license from RTI.Add the following line to your.bashrcfile pointing to your copy of the license.

export RTI_LICENSE_FILE=path/to/rti_license.dat

You also need a Java runtime installed to run the RTI code generator:

sudo apt-get install openjdk-7-jre

Finally, you can install the Connext 5.3 package for Linux provided by RTI from theirdownloads page.

After downloading, usechmod +xon the.runexecutable and then execute it.Note that if you're installing to a system directory usesudoas well.

The default location is~/rti_connext_dds-5.3.0

Source the setup file to set theNDDSHOMEenvironment variable.

source ~/rti_connext_dds-5.3.0/resource/scripts/rtisetenv_x64Linux3gcc4.8.2.bash

Now you can build as normal and support for RTI will be built as well.

Alternate compilers

Using a different compiler besides gcc to compile ROS 2 is easy. If you set the environment variablesCCandCXXto executables for a working C and C++ compiler, respectively, and retrigger CMake configuration (by using--force-cmake-configor by deleting the packages you want to be affected), CMake will reconfigure and use the different compiler.

Clang

To configure CMake to detect and use Clang:

sudo apt-get install clang

export CC=clang

export CXX=clang++

ament build --force-cmake-config

TODO: using ThreadSanitizer, MemorySanitizer

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末谅摄,一起剝皮案震驚了整個(gè)濱河市聪廉,隨后出現(xiàn)的幾起案子萧诫,更是在濱河造成了極大的恐慌扮饶,老刑警劉巖夺巩,帶你破解...
    沈念sama閱讀 216,496評(píng)論 6 501
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件贞让,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡柳譬,警方通過(guò)查閱死者的電腦和手機(jī)喳张,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,407評(píng)論 3 392
  • 文/潘曉璐 我一進(jìn)店門(mén),熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái)美澳,“玉大人销部,你說(shuō)我怎么就攤上這事≈聘” “怎么了舅桩?”我有些...
    開(kāi)封第一講書(shū)人閱讀 162,632評(píng)論 0 353
  • 文/不壞的土叔 我叫張陵,是天一觀的道長(zhǎng)雨膨。 經(jīng)常有香客問(wèn)我擂涛,道長(zhǎng),這世上最難降的妖魔是什么聊记? 我笑而不...
    開(kāi)封第一講書(shū)人閱讀 58,180評(píng)論 1 292
  • 正文 為了忘掉前任撒妈,我火速辦了婚禮,結(jié)果婚禮上排监,老公的妹妹穿的比我還像新娘狰右。我一直安慰自己,他們只是感情好社露,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,198評(píng)論 6 388
  • 文/花漫 我一把揭開(kāi)白布挟阻。 她就那樣靜靜地躺著,像睡著了一般峭弟。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上脱拼,一...
    開(kāi)封第一講書(shū)人閱讀 51,165評(píng)論 1 299
  • 那天瞒瘸,我揣著相機(jī)與錄音,去河邊找鬼熄浓。 笑死情臭,一個(gè)胖子當(dāng)著我的面吹牛省撑,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播俯在,決...
    沈念sama閱讀 40,052評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼竟秫,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來(lái)了跷乐?” 一聲冷哼從身側(cè)響起肥败,我...
    開(kāi)封第一講書(shū)人閱讀 38,910評(píng)論 0 274
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎愕提,沒(méi)想到半個(gè)月后馒稍,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,324評(píng)論 1 310
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡浅侨,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,542評(píng)論 2 332
  • 正文 我和宋清朗相戀三年纽谒,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片如输。...
    茶點(diǎn)故事閱讀 39,711評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡鼓黔,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出不见,到底是詐尸還是另有隱情澳化,我是刑警寧澤,帶...
    沈念sama閱讀 35,424評(píng)論 5 343
  • 正文 年R本政府宣布脖祈,位于F島的核電站肆捕,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏盖高。R本人自食惡果不足惜慎陵,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,017評(píng)論 3 326
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望喻奥。 院中可真熱鬧席纽,春花似錦、人聲如沸撞蚕。這莊子的主人今日做“春日...
    開(kāi)封第一講書(shū)人閱讀 31,668評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)甥厦。三九已至纺铭,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間刀疙,已是汗流浹背舶赔。 一陣腳步聲響...
    開(kāi)封第一講書(shū)人閱讀 32,823評(píng)論 1 269
  • 我被黑心中介騙來(lái)泰國(guó)打工, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留谦秧,地道東北人竟纳。 一個(gè)月前我還...
    沈念sama閱讀 47,722評(píng)論 2 368
  • 正文 我出身青樓撵溃,卻偏偏與公主長(zhǎng)得像,于是被迫代替她去往敵國(guó)和親锥累。 傳聞我的和親對(duì)象是個(gè)殘疾皇子缘挑,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,611評(píng)論 2 353

推薦閱讀更多精彩內(nèi)容