flying penguins - elinux · 2016-07-06 · launch files • ros feature that makes it easy to...
TRANSCRIPT
![Page 1: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/1.jpg)
Embedded Linux applications for autonomous UAVs
Flying Penguins
![Page 2: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/2.jpg)
Clay McClure twitter.com/claymcclure github.com/claymation
![Page 3: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/3.jpg)
![Page 4: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/4.jpg)
![Page 5: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/5.jpg)
![Page 6: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/6.jpg)
![Page 7: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/7.jpg)
![Page 8: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/8.jpg)
stabilizationtelemetry
failsafesmissions
![Page 9: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/9.jpg)
![Page 10: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/10.jpg)
≠AUTO
PILOT
AUTO
NOMOUS
![Page 11: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/11.jpg)
AUTONOMY
“system finds its own goal positions”
![Page 12: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/12.jpg)
where to go
“system finds its own goal positions”
AUTONOMY
![Page 13: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/13.jpg)
where to gohow to get there
“system finds its own goal positions”
AUTONOMY
![Page 14: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/14.jpg)
where to gohow to get therewhat to do next
“system finds its own goal positions”
AUTONOMY
![Page 15: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/15.jpg)
SO MANY
ALGORITHMS,
SO LITTLE
MEGAHERTZhttp://ra3ndy.deviantart.com/art/Sad-Panda-69204875
![Page 16: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/16.jpg)
+
![Page 17: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/17.jpg)
• Real-time kernel • Hardware drivers (SPI, I2C, CAN, UART) • Device trees • Programmable real-time units • PixHawk Fire Cape • BeaglePilot project
Autopilot runs on Linux
![Page 18: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/18.jpg)
• Linux runs on a companion computer • RS-232 serial interface to autopilot • Treat the autopilot as a peripheral • This is what I’m talking about today
Autopilot talks to Linux
![Page 19: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/19.jpg)
ODROID-XU3 Lite• Samsung Exynos5422 octa core
• 4x Cortex™-A15 2.0GHz
• 4x Cortex™-A7 1.4GHz
• 2 GB RAM
• 32+ GB flash
• 4x USB 2.0 + 1x USB 3.0
![Page 20: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/20.jpg)
Your App
Autopilot
![Page 21: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/21.jpg)
Your App
Autopilot
Middleware
![Page 22: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/22.jpg)
Middleware• DroneAPI!
• Python
• Go to Kevin Hester’s talk tomorrow
• ROS + mavros!
• Python, C++, Lisp (really)
• Access to a wealth of robotics research and tools
![Page 23: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/23.jpg)
Credit: Kabir Mohammed
PX4 + ROS
![Page 24: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/24.jpg)
ROS Crash Course
![Page 25: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/25.jpg)
Robot Operating System
“ROS is an open-source, meta-operating system for your robot.”
– http://wiki.ros.org/ROS/Introduction
![Page 26: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/26.jpg)
Nodes• Process / address space
• ROS applications composed of many small nodes
• “Do one thing and do it well”
• Modular
• Reusable
• Separation of concerns
![Page 27: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/27.jpg)
Topics• Publish / subscribe message bus
• Strongly-typed messages
• Peer-to-peer message passing
• Centralized name registry (master node)
![Page 28: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/28.jpg)
Services• Similar to topics, but with request / reply semantics
• Think of it as RPC
![Page 29: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/29.jpg)
but that's not all...parameters transformations record/playback visualization logging
![Page 30: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/30.jpg)
mavros
![Page 31: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/31.jpg)
Topics• /mavros/global_position/global
• /mavros/local_position/local
• /mavros/imu/data
• /mavros/state
• /mavros/setpoint_position/local_position
• /mavros/setpoint_velocity/cmd_vel
![Page 32: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/32.jpg)
Services• /mavros/cmd/arming
• /mavros/cmd/land
• /mavros/cmd/takeoff
• /mavros/set_mode
• /mavros/set_stream_rate
![Page 33: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/33.jpg)
Event-driven programming• “Don’t call me, I’ll call you”
• Your application code responds to events
• Message arrival
• “my position is (x, y, z)”
• Timer expiry
• “it’s time to run the control loop”
![Page 34: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/34.jpg)
Example ApplicationYet Another Precision Lander
![Page 35: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/35.jpg)
Nodes• Tracker!
• Processes video stream, looking for landing pad
• Publishes target position/velocity messages
• Commander!
• Subscribes to vehicle state and position messages
• Controls vehicle velocity
![Page 36: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/36.jpg)
![Page 37: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/37.jpg)
(TODO: code snippets)
![Page 38: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/38.jpg)
Simulations
![Page 39: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/39.jpg)
HITL• Hardware in the loop
• Flight software runs on flight hardware
• Simulated sensor and control inputs
![Page 40: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/40.jpg)
SITL• Software in the loop
• Flight software runs on (Linux) desktop
• Simulated sensor and control inputs and HAL
![Page 41: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/41.jpg)
ArduPilot SITL
![Page 42: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/42.jpg)
![Page 43: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/43.jpg)
PX4 SITL• 3D simulation with Gazebo
• TODO
![Page 44: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/44.jpg)
Practical Considerations
![Page 45: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/45.jpg)
![Page 46: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/46.jpg)
Connections• UART recommended
• USB works for development
![Page 47: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/47.jpg)
Power• UBEC
• ODROID + USB camera + WiFi + 3S LiPo = 5 hours
![Page 48: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/48.jpg)
Launch files• ROS feature that makes it easy to start and manage
multiple nodes and their parameters
• `roslaunch mavros apm.launch`
• `rosparam load ~/tracker.yaml /tracker`
![Page 49: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/49.jpg)
Startup• use ubuntu’s upstart to launch ROS + mavros +
application nodes
• robot_upstart
![Page 50: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/50.jpg)
Telemetry• MAVLink + radio
• WiFi
• Ad-Hoc mode (man wireless)
• sudo apt-get remove wpasupplicant
• GSM
![Page 51: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/51.jpg)
Coordinate Frames• Global / Local
• NED
• NEU
• ENU
• Body-fixed
• tf library
![Page 52: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/52.jpg)
![Page 53: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/53.jpg)
What will you make?
![Page 54: Flying Penguins - eLinux · 2016-07-06 · Launch files • ROS feature that makes it easy to start and manage multiple nodes and their parameters • `roslaunch mavros apm.launch`](https://reader033.vdocuments.us/reader033/viewer/2022041821/5e5ddd3c6c9ac55f305d273f/html5/thumbnails/54.jpg)
ardupilot.com pixhawk.org/start ros.org github.com/mavlink/mavros github.com/claymation/lander