Top Banner
Bridging ROS to Embedded Systems Morgan Quigley Open Source Robotics Foundation Many images via Wikipedia
16

Bridging ROS to Embedded Systems

Dec 31, 2016

Download

Documents

truongthien
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Bridging ROS to Embedded Systems

Bridging ROS to Embedded Systems Morgan Quigley

Open Source Robotics Foundation

Many images via Wikipedia

Page 2: Bridging ROS to Embedded Systems

Overview

• survey of the diversity of embedded systems and some bridging approaches using ROS

• not intending to argue for/against any particular method for all situations

– best method is often implied by the application

Page 3: Bridging ROS to Embedded Systems

Motivation

• all robots have embedded systems.

– it’s not “if” but “how” we talk with them

– lasers, cameras, motors, radios, etc.

• sometimes, we have control over firmware

• sometimes, we don’t

• many different situations = many approaches

Page 4: Bridging ROS to Embedded Systems

Huge Range of Embedded Systems

Images: Wikipedia

Page 5: Bridging ROS to Embedded Systems

Why embed ?

• reduce cost, size, weight, power

• more powerful every year

– massive market forces #embedded >> #pc’s

• real-time requirements are hard/painful to mix with non-realtime code on full systems

– isolate real-time requirements to embedded

– more and more code can go in them

non-realtime ROS host real-time

embedded system

real-time embedded system

Page 6: Bridging ROS to Embedded Systems

Popular Hardware Classes

x86

Images: Wikipedia

mini-ITX PC/104

ARM-A

Android

Raspberry Pi

BeagleBone Gumstix

ARM-M AVR

mbed STM32

Discovery Olimex ARM-USB-TINY-H

Arduino

Teensy 2.0

Page 7: Bridging ROS to Embedded Systems

Two Extremes of Integration

“Unified” “Bridged”

bridge

Images: Creative Commons Images: Wikipedia

Page 8: Bridging ROS to Embedded Systems

x86 ARM-A ARM-M AVR

Unified

Bridged

rosbridge

uROSnode

rosc (future)

rosjava

roscpp, rospy

rosserial

custom bridges

Page 9: Bridging ROS to Embedded Systems

roscpp, rospy, rosjava

• ARM Cortex-A machines can run all of ROS

• Cross-compiling can be tricky. Start with binary distros and/or popular platforms:

– Android

– Gumstix (Linaro)

– Raspberry Pi (Raspbian)

Page 10: Bridging ROS to Embedded Systems

uROSnode and rosc

• ROS node functionality on ARM Cortex-M

• Small size via code generators

• can chain to other MCU’s

• $1 MCU

MCU

Page 11: Bridging ROS to Embedded Systems

rosbridge

• JSON protocol to bridge to non-ROS systems

– for example, connect web browsers to ROS

– more broadly, connect sockets to ROS

• Much more at http://rosbridge.org and http://www.ros.org/wiki/rosbridge_suite

Page 12: Bridging ROS to Embedded Systems

rosserial

• Bridges selected topics between a ROS system and a serial stream: UART, XBee, etc.

• Ports: Arduino and generic embedded linux

• http://www.ros.org/wiki/rosserial

Page 13: Bridging ROS to Embedded Systems

Custom Bridges

• Useful to implemented proprietary protocols, unusual data links, complex inter-system communications, etc.

– hokuyo_node (and 1e6 other drivers)

– Sandia Hand: https://bitbucket.org/osrf/sandia-hand

bridge FPGA

palm

cam

Page 14: Bridging ROS to Embedded Systems

Cortex-M cross compiling, debugging

• http://bitbucket.org/osrf/sandia-hand

– downloads a version of arm-gcc

– clones and builds OpenOCD

– CMake rules for cross-compiling Cortex-M targets

– GDB server and client targets, disassembling, etc

– custom bootloaders to support UDP, rs485, etc.

OpenOCD GDB Target

JTAG

USB-UART picocom

Page 15: Bridging ROS to Embedded Systems

Xilinx FPGA simulation

• http://bitbucket.org/osrf/sandia-hand

– Makefile rules for synthesis, download, flash burn

– Rules for simulation using Icarus Verilog (GPL)

– Gigabit ethernet emulation to/from simulation

– Debug comms between simulated FPGA and driver

Simulator Driver simulated ethernet

Page 16: Bridging ROS to Embedded Systems

Acknowledgments and Summary

• ros-sig-embedded

• ROS for Products Workshop

• furious activity at many levels of embedded

• lots of interest in a portable, lightweight ANSI C client for both bare metal and various RTOS’es

– next talk: rosc