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
690
第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
Opcodeを読んでいたら何故かphp-srcを読んでいた話
murashotaro
0
320
エンジニアカフェ忘年会2024「今年やらかしてしまったこと!」
keropiyo
0
100
スタートアップで取り組んでいるAzureとMicrosoft 365のセキュリティ対策/How to Improve Azure and Microsoft 365 Security at Startup
yuj1osm
0
240
DUSt3R, MASt3R, MASt3R-SfM にみる3D基盤モデル
spatial_ai_network
2
270
新機能VPCリソースエンドポイント機能検証から得られた考察
duelist2020jp
0
230
Storage Browser for Amazon S3
miu_crescent
1
300
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
200
非機能品質を作り込むための実践アーキテクチャ
knih
5
1.6k
5分でわかるDuckDB
chanyou0311
10
3.3k
LINEスキマニにおけるフロントエンド開発
lycorptech_jp
PRO
0
340
APIとはなにか
mikanichinose
0
110
能動的ドメイン名ライフサイクル管理のすゝめ / Practice on Active Domain Name Lifecycle Management
nttcom
0
250
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Gamification - CAS2011
davidbonilla
80
5.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Making the Leap to Tech Lead
cromwellryan
133
9k
We Have a Design System, Now What?
morganepeng
51
7.3k
Done Done
chrislema
182
16k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
How STYLIGHT went responsive
nonsquared
96
5.2k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
170
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
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͕҆ఆ ͙͢ʹ͑ΔϩϘοτϞσϧͷ͕࢝·͍ͬͯΔ ཁྖ͕Θ͔ΕɺࣗͰϩϘοτϞσϧ৽͍͠ϓ ϥάΠϯΛ։ൃͰ͖Δ