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
710
第1回ROS勉強会発表資料 ROS+Gazeboではじめるロボットシミュレーション
ROS + Gazeboの紹介など。内容が大分古くなっているのでご注意。
akio
June 28, 2016
Tweet
Share
More Decks by akio
See All by akio
Go言語によるROSプログラミング
akio
0
520
2016-06-26 第8回ROS勉強会LT資料 catkin-tools
akio
0
390
2016-06-26 第8回ROS勉強会資料 ROSCRAFT
akio
0
480
Other Decks in Technology
See All in Technology
Enhancing SaaS Product Reliability and Release Velocity through Optimized Testing Approach
ropqa
1
240
cdk initで生成されるあのファイル達は何なのか/cdk-init-generated-files
tomoki10
0
200
FOSS4G 2025 KANSAI QGISで点群データをいろいろしてみた
kou_kita
0
410
【LT会登壇資料】TROCCO新コネクタ「スマレジ」を活用した直営店データの分析
kazari0425
1
110
マルチプロダクト環境におけるSREの役割 / SRE NEXT 2025 lunch session
sugamasao
1
110
Rethinking Incident Response: Context-Aware AI in Practice
rrreeeyyy
1
140
United airlines®️ USA Contact Numbers: Complete 2025 Support Guide
unitedflyhelp
0
330
いつの間にか入れ替わってる!?新しいAWS Security Hubとは?
cmusudakeisuke
0
140
AWS認定を取る中で感じたこと
siromi
1
220
アクセスピークを制するオートスケール再設計: 障害を乗り越えKEDAで実現したリソース管理の最適化
myamashii
1
160
american airlines®️ USA Contact Numbers: Complete 2025 Support Guide
supportflight
1
110
[SRE NEXT] ARR150億円_エンジニア140名_27チーム_17プロダクトから始めるSLO.pdf
satos
2
800
Featured
See All Featured
It's Worth the Effort
3n
185
28k
Music & Morning Musume
bryan
46
6.6k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.3k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
GitHub's CSS Performance
jonrohan
1031
460k
Git: the NoSQL Database
bkeepers
PRO
430
65k
The Language of Interfaces
destraynor
158
25k
Adopting Sorbet at Scale
ufuk
77
9.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
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͕҆ఆ ͙͢ʹ͑ΔϩϘοτϞσϧͷ͕࢝·͍ͬͯΔ ཁྖ͕Θ͔ΕɺࣗͰϩϘοτϞσϧ৽͍͠ϓ ϥάΠϯΛ։ൃͰ͖Δ