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
第1回ROS勉強会発表資料 ROS+Gazeboではじめるロボットシミュレーション
Search
akio
June 28, 2016
Technology
0
680
第1回ROS勉強会発表資料 ROS+Gazeboではじめるロボットシミュレーション
ROS + Gazeboの紹介など。内容が大分古くなっているのでご注意。
akio
June 28, 2016
Tweet
Share
More Decks by akio
See All by akio
Go言語によるROSプログラミング
akio
0
470
2016-06-26 第8回ROS勉強会LT資料 catkin-tools
akio
0
370
2016-06-26 第8回ROS勉強会資料 ROSCRAFT
akio
0
430
Other Decks in Technology
See All in Technology
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
160
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
120
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
670
Terraform Stacks入門 #HashiTalks
msato
0
370
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.2k
Mastering Quickfix
daisuzu
1
340
Chasing the White Whale of Open Source - ROI
mrbobbytables
0
120
アジャイルチームがらしさを発揮するための目標づくり / Making the goal and enabling the team
kakehashi
4
250
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
740
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
650
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
200
A Tour of Anti-patterns for Functional Programming
guvalif
0
380
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Teambox: Starting and Learning
jrom
133
8.8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Why Our Code Smells
bkeepers
PRO
334
57k
Site-Speed That Sticks
csswizardry
0
40
How GitHub (no longer) Works
holman
310
140k
Building Adaptive Systems
keathley
38
2.3k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Unsuck your backbone
ammeep
668
57k
Thoughts on Productivity
jonyablonski
67
4.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Transcript
ςΩετ ROS+GazeboͰ͡ΊΔϩϘοτγϛϡϨʔγϣϯ akio
DISCLAIMER ͜ͷൃදͷ༰શͯެ։͞Ε͍ͯΔใ͓Αͼൃ දऀ(akio)ͷݸਓతͳҙݟʹجͮ͘ͷͰ͢ɻൃදऀ ͷޏ༻ऀʹҰͷؔ͋Γ·ͤΜɻ ൃද༰ʹࡉ৺ͷҙΛ͍ͬͯ·͕͢ɺهࡌ ใͷ͝ར༻ʹΑΓສҰଛ͕ੜͯ͡ɺൃදऀҰ ͷΛෛ͍·ͤΜɻ
ࣗݾհ akio @akio(GitHub) ϩϘοτͷιϑτΣΞΛ։ൃ͢ΔࣄΛͯ͠·͢ ֶੜ͔࣌ΒཧγϛϡϨʔλͰ༡Ϳͷ͕͖Ͱ͢
༰ Gazeboʹ͍ͭͯ ROSͱͷ࿈ܞ ͙͢ࢼͤΔύοέʔδ ࣗͷϞσϧΛͭͬͯ͘ΈΑ͏ ·ͱΊ
Gazeboʹ͍ͭͯ
Gazeboͱ ! ެࣜαΠτhttp://gazebosim.org ΦʔϓϯιʔεʢApacheϥΠηϯεʣͷ̏DϩϘοτγϛϡϨʔλ ϦΞϧλΠϜੑΛॏࢹ OGREΛར༻ͨ͠ߴ࣭ͳάϥϑΟοΫ ෳͷཧΤϯδϯΛΓସ͑ΒΕΔʢODE, Bullet, Simbody, DARTʣ
ΧϝϥɺϨʔβʔϨϯδϑΝΠϯμͳͲͷηϯαʔγϛϡϨʔγϣϯ ಠࣗͷAPIΛ͕࣋ͭɺROSͱͷ࿈ܞॆ࣮
ಠஅͱภݟʹΑΔGazeboͷྺ࢙ Player࣌ ROS࣌ Standalone࣌ɹࠓ͜͜
Player࣌ 2DϩϘοτγϛϡϨʔλPlayer/Stageͷ༻్Λิ͢ ΔతͰ࢝ಈ ઃఆϑΝΠϧXMLϕʔεͰهड़ ϥΠηϯεGPL ൃදऀ͋·ΓΑ͘Βͳ͍
ROS࣌(2009 - 2011) Willow Garage͕։ൃࢧԉ ROSͱͷ࿈ܞΛ༰қʹ͢Δྗ͕ͳ͞ΕΔ PR2ͷγϛϡϨʔλͱͯ͠ར༻͞ΕΔ C++αϙʔτͷڧԽ ίʔυϕʔεPlayer࣌ͱಉ͡ʢGPLʣ ROS
Wikiʹ·ͩ͜ͷ࣌ͷهड़͕͓ͬͯΓɺࠞཚ͍͢͠
Standalone࣌(2012 - ݱࡏ) WillowGarage͔ΒεϐϯΞτͨ͠OSRF(Open Source Robotics Foundation) ͕ओʹ։ൃ શ໘తͳॻ͖͕͠ߦΘΕɺόʔδϣϯϦηοτ ϥΠηϯεApache
Software License 2.0ʹ ઃఆϑΝΠϧSDFʢSimulation Description Formatʣ ProtobufΛར༻ͨ͠ಠࣗͷϝοηʔδ௨৴ػߏΛ࣋ͭ DARPA Robotics Challengeͷ༧બͷҰͭVRC(Virtual Robotics Challenge)༻γ ϛϡϨʔλʹ࠾༻͞ΕΔ
GazeboͷΞʔΩςΫνϟ SDF gzserver gzclient (GUI) ϓϥάΠϯ Ϟσϧ Load Ϟσϧ ϓϥάΠϯ
ϓϥάΠϯ Simulation World ϝοηʔδ௨৴ ੍ޚॲཧͳͲ
͖ෆ͖ ݩʑͷ։ൃܦҢ͔ΒɺηϯαʔʴγϯϓϧͳػߏͷϩϘοτͱൺֱత૬ੑ ͕ྑ͍Ͱ͢ ͔͠͠ɺཧγϛϡϨʔγϣϯΤϯδϯͷΞϧΰϦζϜͷӨڹ͋Γଟؔઅ ϩϘοτาߦϩϘοτͳͲͰ͍ۤ͠໘͕… ϦΞϧλΠϜੑॏࢹͳͷͰɺݫີͳਫ਼Λظ͠ͳ͍Ͱ͏ͷ͕ྑ͍ v1.9Λ͍ͬͯͯಈ࡞͕ෆ҆ఆͳ͕࣌͋ΔɻకΊΓʹΘΕ͍ͯΔ࣌ʹ ͔ͳ͍͔͠Εͳ͍ ࠓޙ(v2.2ʙʣɺཧγϛϡϨʔγϣϯΤϯδϯͷબࢶ͕͕ΔͷͰɺվળ ͷر͋Γ·͢
·ͱΊ ࠓޙStandalone൛͕ओྲྀͰ͢ ͖ෆ͖͕͋ΔͷͰɺ༻్ͱੑೳΛߟྀͯ͠͏ ͷ͕٢Ͱ͢ ࠓޙͷվળ࣍ୈͰରԠ༻్͕Δ͔ʁ
ROSͱͷ࿈ܞ
GazeboͱROSͱͷ࿈ܞػߏͷ࠶උ Standalone൛ͰΒ͘ެࣜͳROSͱͷ࿈ܞػߏ͕ ͳ͔ͬͨ Standalone൛1.3ʙ͔ΒରԠ࢝͠Ί1.9Ͱ΄΅҆ఆ ROSHydro͔Βͪ͜ΒͷΈʹ४ڌ GroovyͰ͋ͪͪ͜ෆ߹͕ग़·͢
SDF gzserver gzclient (GUI) ϓϥάΠϯ Ϟσϧ Load ϓϥάΠϯ Simulation World
ϝοηʔδ௨৴ ੍ޚॲཧͳͲ ࿈ܞγεςϜͷΞʔΩςΫνϟ URDF ม ROS controller manager roscpp ROSϊʔυ ROSϊʔυ Controller ϓϥάΠϯ Ϟσϧ Controller ϓϥάΠϯ roscpp roscpp ROS ϝοηʔδ
ϞσϧΛ੍ޚ͍ͨ͠߹ gazebo_pluginsʹ͋ΔطϓϥάΠϯΛ͏ GazeboϓϥάΠϯͱͯ͠։ൃ͢Δ Ϟσϧʹඥ͍ͮͯɺGazebo APIΛར༻ roscppΛͬͯଞͷROSϊʔυͱ௨৴ ros-controlsͷControllerManagerʹରԠͨ͠ControllerϓϥάΠϯͱͯ͠։ൃ͢Δ ros-controlsPR2ͷϦΞϧλΠϜ੍ޚϨΠϠʔͷҰൠԽ൛ ࣮ػ༻੍ޚϓϩάϥϜͱɺControllerΛڞ༗Ͱ͖Δ
gazebo_pluginsͷϓϥάΠϯ Camera Multicamera Depth Camera Openni Kinect GPU Laser Laser
Block Laser F3D (Force Feedback Ground Truth) Force IMU Joint Pose Trajectory P3D (3D Position Interface for Ground Truth) Projector Prosilica Camera Bumper Differential Drive Skid Steering Drive Video Plugin Planar Move Plugin
·ͱΊ ͠Β͘Gazebo1.9 + ROS HydroͷΈ߹Θ͕ͤ҆ఆͩͱࢥ ΘΕ·͢ ҟͳΔόʔδϣϯΛΈ߹ΘͤΔͱɺ͕͍͠Τϥʔ͕ग़ ͨΓ͠·͢ ϞσϧΛ੍ޚ͢ΔͳΒকདྷతʹros-controlsܦ༝͔ʁ ros-controlsࣗମ·ͩख़͖͍ͬͯ͠ͳ͍
ࠓ͍͚͕ඞཁ
͙͢ࢼͤΔύοέʔδ
ROS HydroͰϦϦʔε͞Ε͍ͯΔ GazeboγϛϡϨʔγϣϯPKG ൃදऀௐͳͷͰɺൈ͚ʗ࿙ΕͳͲଟ͋ΔͱࢥΘΕ·͢ Turtlebot2/Kobuki Husky Grizzly youBot Segbot UR5/10
Hector Quadcoptor
ςΩετ Turtlebot2/Kobuki Πϯετʔϧ $ apt-get install ros-hydro-turtlebot-simulator ࣮ߦ $ roslaunch
turtlebot_gazebo turtlebot_empty_world.launch !
ςΩετ Husky Πϯετʔϧ $ apt-get install ros-hydro-husky-simulator ࣮ߦ $ roslaunch
husky_gazebo husky_empty_world.launch
ςΩετ Grizzly Πϯετʔϧ $ apt-get install ros-hydro-grizzly-simulator ࣮ߦ $ roslaunch
grizzly_gazebo grizzly_empty_world.launch
ςΩετ youBot Πϯετʔϧ $ apt-get install ros-hydro-youbot-simulation ࣮ߦ $ roslaunch
youbot_gazebo_robot youbot_dual_arm.launch
ςΩετ Segbot Πϯετʔϧ $ apt-get install ros-hydro-segbot-simulator ࣮ߦ $ roslaunch
segbot_gazebo segbot_test_world.launch (ผͷ)$ roslaunch segbot_gazebo segbot_mobile_base.launch
ςΩετ UR5/10ʢUniversal Robotsʣ Πϯετʔϧ $ apt-get install ros-hydro-ur-gazebo ࣮ߦ (UR5)$
roslaunch ur_gazebo ur5.launch (UR10)$ roslaunch ur_gazebo ur10.launch ΞʔϜ͚ͩͳͷͰɺ͖ͳंʹ͚ͬͭ͘Α͏
ςΩετ Hector Quadrotor Πϯετʔϧ $ apt-get install ros-hydro-hector-quadrotor-gazebo ࣮ߦ $
roslaunch hector_quadrotor_gazebo quadrotor_empty_world.launch
·ͱΊ ROS HydroͳΒ͙͢ࢼͤΔγϛϡϨʔλϞσϧଟ جຊతʹඪ४తͳΠϯλʔϑΣʔεʹ४ڌ͍ͯ͠Δͷ ͰɺଞͷROSϑϨʔϜϫʔΫ(MoveIt!ͳͲʣͱൺֱ త༰қͷͣ
ࣗͷϞσϧΛ࡞ͬͯΈΑ͏ ʢαϯϓϧίʔυͰֶͿฤʣ
ࢀߟʹͳΔࢿྉ ެࣜͷROS࿈ܞνϡʔτϦΞϧ http://gazebosim.org/wiki/Tutorials#ROS_Integration ্هνϡʔτϦΞϧͷαϯϓϧίʔυ https://github.com/ros-simulation/gazebo_ros_demos
ࠓճͷྫ ެࣜνϡʔτϦΞϧྫ ΛࢀߟʹΑΓ؆ུԽ ̍࣠ճసؔઅΛ࣋ͭ ΞʔϜઌʹΧϝϥ Xacroແ͠Ͱॻ͘
ඞཁͳύοέʔδ ros-hydro-gazebo-ros-pkgs ros-hydro-gazebo-ros-control ros-hydro-ros-controllers ֬ೝ༻ ros-hydro-image-view2
αϯϓϧίʔυ sudo apt-get install git CatkinͷϫʔΫεϖʔεΛ࡞ͬͯɺsrcσΟϨΫτϦʹ clone ͍ͯͩ͘͠͞ɻ git clone
https://github.com/akio/myrobot_demo.git
ϑΝΠϧͷઆ໌ myrobot_demo myrobot_gazebo package.xmlɹɹɹී௨ CMakeLists.txtɹɹී௨ myrobot.launchɹɹશ෦ೖΓLaunch myrobot.urdf ɹɹϞσϧͷఆٛ
ղઆ͖ίʔυͰઆ໌
ϞσϧΛॻ࣌͘ͷҙ URDF͔ΒSDFͷมϓϩάϥϜɺGazeboαʔόʔͷΤ ϥʔܯࠂ͕ൃల్্ɻ ݁ՌɺΤϥʔ͕ى͖ͯݪҼෆ໌ͱ͍͏͜ͱ͕Α͋͘Γ·͢ ߹ʹΑͬͯҙਤ͠ͳ͍݁Ռ͕ग़͍ͯͯΤϥʔʹͳΒͳ ͍͜ͱ͋Γ·͢ ͦΜͳͱ͖มεςοϓΛҰͭҰͭղͯ֬͠ೝ͢Δͱྑ ͍Ͱ͢ʢମݧஊʣ
·ͱΊ جຊURDFͳͷͰɺJointͱϦϯΫͷ܁Γฦ͠ͰϩϘοτΛ ΈཱͯΔ ඞཁͳ෦ʹɺGazebo༻ͷઃఆΛՃ͢ΔΠϝʔδ GazeboϓϥάΠϯɺROS ControllersϓϥάΠϯͱʹ๛ʹ४ උ͞Ε͍ͯΔͷͰɺࣗͷ͍͍ͨػೳΛΑ͘୳͠·͠ΐ͏ ෳࡶͳϩϘοτͱͯهड़͕͘ͳΔͷͰɺXacroΛͬͯ هड़ΛݮΒͨ͠ΓɺϑΝΠϧׂ͢ΔςΫχοΫ͕ඞཁ
શମͷ·ͱΊ
શମͷ·ͱΊ ಉ͡GazeboͰ৭ʑ͋ΔͷͰɺཁҙ ͠Β͘Gazebo1.9 + Hydro͕҆ఆ ͙͢ʹ͑ΔϩϘοτϞσϧͷ͕࢝·͍ͬͯΔ ཁྖ͕Θ͔ΕɺࣗͰϩϘοτϞσϧ৽͍͠ϓ ϥάΠϯΛ։ൃͰ͖Δ