How to structure a Python-based ROS package

My apologies for the long wait since the last post. I started a PhD in AI and Robotics at Cambridge University, which has been absorbing all my spare time. This post is actually quite old, but I never got around to publishing it. The good news is that I’ve learned a ton about robotics, biomimetics, ROS, MoveIt, deep learning, the Jetson TX1 and more, all of which I hope to share in due course. My apologies also for comments that waited months to be approved. When I finally dragged myself back to comments section I found only 4 real comments out of more than 600 bits of spam.

This rather specific post grew out of a frustrating attempt to write a fairly complex ROS package in Python which was continually stymied by seemingly random import errors when my node was launched in different ways. In fairness, I am neither an experienced Python programmer nor a ROS expert, so my problems were due to ignorance. However, clearing up that ignorance was non-trivial and led me down one rabbit hole in terms of how Python manages packages and another rabbit hole in terms of how ROS does it.

This post is intended to be a shortcut for novice ROS developers who want to develop a Python node that involves more than one source file and imports Python libraries.

Continue Reading

Robot Mind or Robot Body: Whatever happened to the Subsumption Architecture?

Rodney Brooks took the stage at the 2016 edition of South by South West for an hour long interview. The founder of two world class robotics companies, iRobot and Rethink Robotics and emeritus professor at MIT, he had every right to feel satisfied at this late stage in his career. Yet the air of disappointment in the interview was unmistakeable. “Not much progress was made,” he says at around 35:15 into the video, with the air of Peter Fonda saying “We blew it”. Back in the 1980s Brooks started a revolution in robotics with something called the subsumption architecture, a revolution that has seemingly petered out. This is the story of that revolution, of the eccentrics behind it and whether they really failed, or created the future of robotics.

Continue Reading

Adding an SD Card to your Deep Learning Robot

The Deep Learning Robot comes with 16Gb built-in flash on the Jetson TK1 board. That’s fine to begin with, but after downloading a few Caffe models, you’ll be out of space. Fortunately, the TK1 comes with an SD Card slot for adding extra storage. This post describes how to add and configure an SD Card to give yourself more room.

SD Card on the Deep Learning Robot
Continue Reading

Docking and Recharging the Deep Learning Robot

The Kobuki charger costs an extra $49 when you buy the Deep Learning Robot and is well worth throwing into the package. With a few simple commands you can get your robot to dock and recharge itself, providing it is in the general vicinity of the charging station. The following is adapted from the Kobuki / ROS tutorials.

Here’s a video of docking place in my crowded living room. Please forgive the baby noises:

Continue Reading

SLAM and Autonomous Navigation with the Deep Learning Robot

Cost mapsGetting your robot to obey “Go to the kitchen” seems like it should be a simple problem to solve. In fact, it requires some advanced mathematics and a lot of programming. Having ROS built into the Deep Learning Robot means that this is all available via the ROS navigation stack, but that doesn’t make it a set-and-forget feature. In this post, we’ll walk through both SLAM and autonomous navigation (derived from the Turtlebot tutorials), show you how they work, give you an overview of troubleshooting and outline the theory behind it all.

Continue Reading

Networking the Deep Learning Robot

Once you’ve completed the missing instructions for your Deep Learning Robot to get the various “Hello Worlds” running, you’ll soon want try using some of the ROS visualization tools. To do this, you’ll need ROS installed on a laptop or workstation and get it networked with the robot. The Turtlebot tutorials do describe this, but I ran into various issues. Hopefully, this guide will help others who tread the same path.

Overview

This is the setup we’re shooting for:

Networking diagram of Deep Learning Robot and a PC or Mac with a ROS Workstation running in a virtual Ubuntu machine.

Continue Reading

Robo-makers: Deep Learning Robot Demo – ROS and Robotic Software

Monday 22nd February 2016 7.00pmmakespace

MakeSpace
16 Mill Lane
Cambridge, UK

I’m giving an open talk on the Deep Learning Robot, ROS and robotics software in general. Suitable, hopefully, for makers and those just curious about robotics.

Reserve a place on meetup.com

UPDATE: Thanks to everyone who came. Here are the slides:

deep-learning-robot-talk-slides-cover

A Deep Learning Robot that recognises objects

Saturday night at home. The Deep Learning Robot “Dalí” now trundles round the house identifying objects and saying their names, with variable success. In the video you can hear it identify correctly “cradle”, “studio couch”, “lampshade” and “home theatre” (it’s an American neural network). However there’s a surreal moment when it sees a non-existent “grand piano”.

The object recognition is with Caffe as described previously, with a few new ROS nodes to do the speech. More details as soon as I have a proper fix for the Bluetooth Speaker pairing issue.

The Art of Seeing: Integrating ROS, Caffe, OpenCV on the Autonomous Deep Learning Robot

recognising a washing machine

The frustrating thing about robotics is the amount of time you have to spend on problems that aren’t really to do with robotics at all. The Autonomous Deep Learning Robot comes with OpenCV4Tegra, a specially accelerated version of the OpenCV vision library. It comes with Caffe, a neural network tool that allows you to do pretty good object recognition. It also comes with Robot Operating System (ROS).

So how hard should it be to make these work together and get your robot to recognise the objects that it sees?

HARD!

Continue Reading

Set up your Autonomous Deep Learning Robot to work with the Mac

This short post describes how I’ve set up the Autonomous Deep Learning Robot to work with the Mac. The main things you gain are

  1. Use of Bonjour / Zeroconf to refer to your robot by name not IP address.
  2. Transfer of files to and from the Jetson TK1 using Finder on MacOS X.

Continue Reading