Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ROS 2はじめました
Search
Yutaka Kondo
May 20, 2017
Programming
4
9.6k
ROS 2はじめました
ROS Japan UG #10
https://rosjp.connpass.com/event/55125/
の発表資料です。ROS 2とDockerを絡めた話をしました。
Yutaka Kondo
May 20, 2017
Tweet
Share
More Decks by Yutaka Kondo
See All by Yutaka Kondo
家庭用自律移動ロボット「カチャカ」の開発者API公開と ROS 2インターフェイス実装
youtalk
0
590
ros2_control for ROBOTIS Dynamixel: dynamixel_control
youtalk
0
420
ROBOTIS Dynamixelのためのros2_control実装 dynamixel_controlのその後
youtalk
1
500
Build Your Own #ROS2 Robot from Scratch ver. 2
youtalk
0
1.3k
ROBOTIS DynamixelのためのROS 2 Control実装 dynamixel_control
youtalk
0
3.3k
DynamixelサーボのためのROS 2 Control実装とOpenMANIPULATOR-Xへの参照実装
youtalk
0
3.8k
[ROS World 2020参加報告会] Navigation2: The Next Generation Navigation System
youtalk
0
1.7k
ROSCon JP 2019講習会 ROS2の移動ロボットへの応用
youtalk
0
660
youfork: Fully ROS 2 Homemade Mobile Manipulator
youtalk
0
2k
Other Decks in Programming
See All in Programming
推し活の ハイトラフィックに立ち向かう Railsとアーキテクチャ - Kaigi on Rails 2024
falcon8823
6
2.2k
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
240
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
4
1.2k
Sidekiqで実現する 長時間非同期処理の中断と再開 / Pausing and Resuming Long-Running Asynchronous Jobs with Sidekiq
hypermkt
6
2.7k
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
200
飲食業界向けマルチプロダクトを実現させる開発体制とリアルな現状
hiroya0601
1
390
JaSST 24 九州:ワークショップ(は除く)実践!マインドマップを活用したソフトウェアテスト+活用事例
satohiroyuki
0
260
go.mod、DockerfileやCI設定に分散しがちなGoのバージョンをまとめて管理する / Go Connect #3
arthur1
10
2.4k
qmuntal/stateless のススメ
sgash708
0
120
Vue.js学習の振り返り
hiro_xre
2
130
カスタムしながら理解するGraphQL Connection
yanagii
1
1.2k
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
150
Featured
See All Featured
Gamification - CAS2011
davidbonilla
80
5k
Embracing the Ebb and Flow
colly
84
4.4k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Fireside Chat
paigeccino
32
3k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
167
49k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
A Philosophy of Restraint
colly
203
16k
What's new in Ruby 2.0
geeforr
342
31k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Transcript
304͡Ί·ͨ͠ ۙ౻๛ IUUQSPTZPVUBMLKQ !ZPVUBML 304+BQBO6( ษڧձ
"CPVU.F ZVUBLBLPOEP!ZPVUBMLKQ ຊ໊ ΞΧϯτ໊ ࠃ੶ ϗʔϜϖʔδΞυϨε ϝʔϧΞυϨε
304$PO4&06-
IUUQSPTDPOSPTPSHQSFTFOUBUJPOT 304$PO3046QEBUFQEG
IUUQSPTDPOSPTPSH QSFTFOUBUJPOTTUBUFPGSPTQEG
None
IUUQSPTDPOSPTPSHQSFTFOUBUJPOT SPT@PO@TNBMM@FNCFEEFE@TZTUFNTQEG
UBMLFSDQQ int main(int argc, char * argv[]) { rclcpp::init(argc,
argv); auto node = rclcpp::node::Node::make_shared("talker"); rmw_qos_profile_t custom_qos_profile = rmw_qos_profile_default; custom_qos_profile.depth = 7; auto topic = std::string("chatter"); auto chatter_pub = node->create_publisher<std_msgs::msg::String>( topic, custom_qos_profile); rclcpp::WallRate loop_rate(2); auto msg = std::make_shared<std_msgs::msg::String>(); auto i = 1; while (rclcpp::ok()) { msg->data = "Hello World: " + std::to_string(i++); std::cout << "Publishing: '" << msg->data << "'" << std::endl; chatter_pub->publish(msg); rclcpp::spin_some(node); loop_rate.sleep(); } return 0; } IUUQTHJUIVCDPNSPTEFNPTCMPCNBTUFS EFNP@OPEFT@DQQTSDUPQJDTUBMLFSDQQ
MJTUFOFSDQQ void chatterCallback(const std_msgs::msg::String::SharedPtr msg) { std::cout << "I heard:
[" << msg->data << "]" << std::endl; } int main(int argc, char * argv[]) { rclcpp::init(argc, argv); auto node = rclcpp::Node::make_shared("listener"); auto topic = std::string("chatter"); auto sub = node->create_subscription<std_msgs::msg::String>( topic, chatterCallback, rmw_qos_profile_default); rclcpp::spin(node); return 0; } IUUQTHJUIVCDPNSPTEFNPTCMPCNBTUFS EFNP@OPEFT@DQQTSDUPQJDTMJTUFOFSDQQ
304Λࢼ͢ • -JOVY%FWFMPQNFOU4FUVQʹै͏ – IUUQTHJUIVCDPNSPTSPTXJLJ-JOVY%FWFMPQNFOU4FUVQ • -JOVY*OTUBMM#JOBSZΛ͏ – IUUQTHJUIVCDPNSPTSPTXJLJ-JOVY*OTUBMM#JOBSZ –
ґଘύοέʔδͷΠϯετʔϧผ్ඞཁ – όΠφϦ͕ݹ͍ • %PDLFSΠϝʔδΛ͏ – EPDLFSQVMMPTSGSPTˡϲ݄લ͔ΒϏϧυࣦഊ – EPDLFSQVMMZPVUBMLSPTKBˡ࠷৽ίϛοτΛϏϧυࡁΈ • IUUQTHJUIVCDPNZPVUBMLEPDLFSJNBHFTKB • IUUQTIVCEPDLFSDPNSZPVUBMLSPTKB
%PDLFSΠϯετʔϧ • 6CVOUV sudo apt-get install docker-ce • 8JOEPXT –
%PDLFSGPS8JOEPXT https://docs.docker.com/docker-for-windows/install/ • NBD04 – %PDLFSGPS.BD https://docs.docker.com/docker-for-mac/install/
EPDLFSQVMMZPVUBMLSPTKB • ϕʔε6CVOUV • ຊͷ'51αΠτ Λࢀর • #VJMEJOH304PO -JOVYʹै࣮ͬͯ
ʹΠϯετʔϧ FROM youtalk/ubuntu-ja:xenial MAINTAINER Yutaka Kondo <
[email protected]
> RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu xenial main" > \ /etc/apt/sources.list.d/ros-latest.list' RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 421C365BD9FF1F717815A3895523BAEEB01FA11 RUN sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu xenial main" > \ /etc/apt/sources.list.d/gazebo-latest.list' RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys D2486D2DD83DB69272AFE98867170598AF249743 RUN apt-get update && apt-get -q -y install \ git wget build-essential cppcheck cmake \ libopencv-dev libpoco-dev libpocofoundation9v5 libpocofoundation9v5-dbg \ python-empy python3-dev python3-empy python3-nose python3-pip python3-setuptools python3-vcstool \ libtinyxml-dev libeigen3-dev clang-format \ pydocstyle pyflakes python3-coverage python3-mock python3-pep8 \ uncrustify libasio-dev libtinyxml2-dev \ libboost-chrono-dev libboost-date-time-dev libboost-program-options-dev \ libboost-regex-dev libboost-system-dev libboost-thread-dev \ && rm -rf /var/lib/apt/lists/* RUN pip3 install flake8 flake8-import-order RUN mkdir -p /root/ros2_ws/src WORKDIR /root/ros2_ws RUN wget https://raw.githubusercontent.com/ros2/ros2/release-latest/ros2.repos RUN vcs import src < ros2.repos RUN src/ament/ament_tools/scripts/ament.py build --build-tests --symlink-install --isolated COPY ./ros2_entrypoint.sh / ENTRYPOINT ["/ros2_entrypoint.sh"] CMD ["bash"] %PDLFSpMF
EPDLFSSVO–JUZPVUBMLSPTKB
%PDLFS$PNQPTF • ෳίϯςφΛ͏ %PDLFSΞϓϦΛఆٛɺ ࣮ߦ͢Δπʔϧ • SPTMBVODIͷΘΓʹ EPDLFSDPNQPTFΛ ͬͯΈΔ •
.JDSPTFSWJDFT – 304/PEF$POUBJOFS version: '2' services: talker: image: youtalk/ros2-ja:xenial command: talker networks: - ros2 listener: image: youtalk/ros2-ja:xenial command: listener networks: - ros2 networks: ros2: driver: bridge EPDLFSDPNQPTFZNM
EPDLFSDPNQPTFVQ
·ͱΊ • %PDLFSͱ304ͷ૬ੑൈ܈ – ϗετ04%PDLFS&OHJOFಈ͚ԿͰ0, – ୯ҰোʢSPTDPSFʣ͕ͳ͍ – ࠓͷͱ͜ΖSPTMBVODIͳ͍͚ͲɺEPDLFSDPNQPTFͰ ༻Մೳ
• 304ݱࡏЌ – ·ͩ·ͩपลཁૉ͕උ͞Ε͍ͯͳ͍ – ΰʔϧυʢϓϧϦΫʣϥογϡ౸དྷͷ༧ײ
304+BQBO6TFST(SPVQ • ϗʔϜϖʔδSPTVTFSTKQˡͩΕ͔վम࡞ۀखͬͯ • ษڧձϖʔδSPTKQDPOOQBTTDPN • ϝʔϦϯάϦετ SPTKBQBOVTFST!HPPHMFHSPVQTDPN
• (JU)VCSPTKBQBOVTFST • 4MBDLSPTKQTMBDLDPN – টϑΥʔϜIUUQTHPPHMGPSNTC5"1P2PM[5M9 • 5XJUUFSSPTKQ
6QEBUF:PVS04 304+BQBO6( ษڧձ