Your SlideShare is downloading. ×
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Os Grossupdated
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Os Grossupdated


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. OSS in Amateur Robotics Mark Gross [email_address]
    • OSCON-07 talk based on my on-going SRS robot Magellan development experience
  • 2. SRS Robot Magellan contest
    • Autonomous navigation to orange traffic cones in an urban park setting.
      • grass, potholes, sidewalks curbs, trees…
    • 1000’ approximate distance between farthest cone and start.
    • robot < 50 pounds, fits in a 4’x4’x4’ cube.
    • robot has fail save pause / stop mechanism.
    • See for rules
  • 3. My robot’s components
    • 16f877 PIC micro controller base SBC.
    • Linksys NSLU2 : IXP420 computer.
    • servos, motor controller, encoder, ultrasonic range finders, digital compass, bump sensor, safety switch, USB camera, USB hub, USB serial dongle, USB memory stick.
    • built on a radio shack RC toy truck
  • 4. Architecture
    • Dual SBC design
    • PIC for low level device interface
    • NSLU2 running Linux doing the high level control and vision processing.
  • 5. Architecture cont.
    • The PIC talks to all the devices except the USB.
      • motor controller, motor encoder, ultrasonic range finders, compass, servos, bump and safety switches.
    • PIC implements RT control loop processing for speed, steering etc.
    • PIC implements a command response protocol such that the NSLU2 can issue high level command and poll for completion over the serial port
      • get status, track_heading, forward_turn, reverse_turn
  • 6. Architecture cont.
    • NSLU2 running a hacked version of Slugos from the Open Embedded distribution.
      • Includes spca5xxx camera driver
      • Python, python serial, python image library and pyv4l
      • Runs my python program from a init script in rc3.d
  • 7. It’s all a Work in progress.
    • PDXBot 2007 results : “Flash” took second place*
    • Robot was barley ready in time and ran with some know problems.
    • Details on robot its evolution, implementation patches and code are available at :
    • Web site will be updated as I get ready for the Seattle robot event.
      • There is a lot more to do 
    • *out of 2 entrants ;)
  • 8. Back to OSS in amateur robotics
    • PIC was programmed using JALv2, a BSD licensed compiler with a Pascal like syntax and a mixture of BSD and GPL libraries.
      • GPL and LGPL in PIC library code is problematic for production use of such compiled code. I will not say more about this as that will be a non-amateur application.
    • NSLU2 ran the SlugOs-image from Open Embedded.
    • The high level logic of the robot was programmed in Python.
    • The rest of this presentation drills down on JAL, Open embedded and python use for the application.
  • 9. JAL (smells like Pascal)
    • Language created by Wouter van Ooijen
      • in 2003 was release as GPL and a source forge community project was started.
    • JALv2 written by Kyle York, is a technically better compiler
      • having 2 and 4 byte integers make is very compelling.
      • I have used both versions and like them both, but if you want multi-byte math JALv2 is the only way to go.
    • The JALv2 compiler author is resistant to starting a SF or other community project site.
  • 10. Some Simple JAL code
    • procedure ping is
    • var byte temp
    • _I2C_HW_startbit
    • -- all sensors will respond to a ping request sent to i2c address zero
    • _I2C_HW_put_byte(0x00)
    • _I2C_HW_put_byte(0)
    • -- get distance in cm.... (need to wait about 2ms/foot!)
    • _I2C_HW_put_byte(0x51)
    • _I2C_HW_stopbit
    • end procedure
  • 11. JALv0.4.xx
    • JALv0.4.xx is a GPL compiler with GPL libraries
    • http:// /
    • Installation is the standard ./config, make , make install - build process. builds and runs in Linux, cygwin, mac-osx, and OS/2
    • Includes a test suite
    • JALv0.4xx is a better OSS project than Jal V2 with community and SF repository
    • This version has become stagnate.
  • 12. JALv2 (by Kyle York)
    • JALv2 is BSD without library files bundled with the compiler.
    • JALv2 is a technically better compiler
      • smaller code
      • supports multi-byte arithmetic
    • Compiler is maintained by one guy, the libraries are maintained by others.
      • No good point for users to contribute fixes to other than Yahoo group mailing list.
      • bugs in some Library files have gone unfixed at times.
  • 13. NSLU2 and Open Embedded
      • is a project of derivative of Open Embedded.
      • Has a nice makefile base wrapper so you don’t need to understand Bit Bake.
      • Its got a nice community and good for root file systems that maintain the NAS functions intended for the product.
      • After using it initially I moved on to just using OE.
      • its pretty cool.
      • more suited to hacking than
      • Has some usability warts.
  • 14. Open Embedded
    • Can be thought of as a bag-O-distributions.
    • Automates tool chain build, target build and image packaging for many of the existing hackable hardware platforms available today, NSLU2, zarus, n800, x86 pc’s, iPaq’…
    • Customizable build includes kernel and a wide assortment of components one can choose to include within a build.
    • has a strong developer community and has good ties to the, gnome,, and similar communities.
  • 15. OE architecture
    • OE consists of 2 components
      • Bit Bake
      • recipe repository
    • Bit bake is maintained in a SVN repository.
    • The recipes are maintained in a Monotone repository.
  • 16. OE developer community
    • Only a few key folks have check in access to the bit bake and recipe archives.
    • bugs are identified and logged in the project bugzilla.
      • patches and bug fixes are submitted via the bugzilla
    • there is an active and responsive mailing list
    • there is an active IRC channel.
      • most OE developers are EU based
    • Development is quite active, most of the kernels tool chains, and user mode components are current
  • 17. OE implementation from a high level
    • Bit bake is the build engine
    • it is implemented in Python
      • it parses the configuration and recipe tree recursively to build a dependency cloud.
      • The seed point for traversing the dependency cloud is determined by the command line argument given to the bit bake command.
    • Builds are executed under a non-privileged user account.
      • uses a utility known as fakeroot to build root file systems and device nodes.
  • 18. Recipes and Monotone
    • developer boot straps recipe tree using a wget …OE.mnt to bring down a 100MB monotone database.
      • then a recipe tree is checked out to bring down all the current recipes.
    • Monotone has some of the CMS flavor of git and mercurial, but is relatively obscure and doesn’t work through proxies well
      • Monotone also tends to need to be built from source, and depends on boost.
      • Once the recipes are pulled down you don’t need to use monotone again.
      • HOWTO’s exist on
  • 19. Hacking OE isn’t trivial
    • A good UI for target component and dependency browsing or customization is missing from OE.
    • Sometimes components are available for down load temporarily.
    • The BitBake has some implicit targets and behaviors that are hard to reverse engineer.
    • Maintaining customizations across OE updates can is hard.
    • Has a fair amount of wiki based documentation, but still can be a challenge for the new developer to wrap there heads around.
    • The oe mailing list is very helpful.
    • Helping to create better documentation for OE/BitBake is on my to do list
  • 20. Hacking tips and tricks
    • bitbake has a number of debug and trace command line options.
      • nohup bitbake –DDD slugos-image
      • If doing a new build and it breaks on getting source, try again in a few days. Sometimes archives are not too reliable.
      • Save your downloads in a up-leveled directory
  • 21. example: my slugos-image hack
    • removing slugos NAS related cruft
    • adding python, python libraries and USB camera driver
    • adding and fixing up the sca5xx camera driver
    • wedging in pyv4l component into my OE build.
    • Much of this is document in a patch on:
  • 22. removing NAS cruft from slugos
    • edit conf/distro/slugos.conf
      • remove kernel FS’s not needed
      • remove ext2_progs
      • remove lrzsz
      • remove libata, pata-artop
  • 23. Adding Python with selected addons to my slugos image
    • edit slogos.conf
      • SLUGOS_EXTRA_RDEPENDS = &quot;${SLUGOS_STANDARD_RDEPENDS} python python-serial python-imaging&quot;
  • 24. adding sca5xx and v4l to slugos
    • edit slugos.conf
      • SLUGOS_STANDARD_RDEPENDS += &quot; +spca5xx +kernel-module-v4l2-common +kernel-module-v4l1-compat +kernel-module-videodev
    • kernel.bbclass
      • sca5xx driver needs to find config.h from kernel build.
  • 25. Python image library and PyV4L inclusion to my OE tree
    • PIL built easily but the installation needed trimming as PIL includes a lot of components I didn't need and took up space on the NSLU2's 8MB of flash.
    • PyV4L was harder
      • needed to create a new recipe
      • needed to hack the pyv4l tarball to build and integrate that into my down load
        • note: pyv4l isn’t well maintained.
      • My current implementation is a complete hack.
  • 26. pyv4l / OE details
    • added python-pyv4l to RDEPENDS
    • created a new python-pyv4l BB file
    • created my a new pyv4l.tar file
      • build was painful
    • See documentation of what I did on my web site.
      • updates to my web page with information on this is coming soon :)
  • 27. summary
    • there are OSS tools to implement a wide range of robotics applications.
    • I have only talked about what I used for my latest project. There are more tools and projects out there with high coolness levels.
      • I didn’t even talk about other MCUs and projects
        • The Arduino project is very cool,
        • AVR’s are better supported by OSS tools than PIC’s.
        • ARM-7’s are also cool, (I’m playing with an NXP2124 using the gnuarm tool chain with newlib).
    • Open Embedded and hackable COTS devices are effective platforms for robotic application development needing more than a control loop.