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

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.


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

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

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


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?


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

Autonomous Deep Learning Robot – the missing instructions


The Autonomous Deep Learning Robot from Autonomous Inc is a bargain price Turtlebot 2 compatible robot with CUDA-based deep learning acceleration thrown in. It’s a great deal – but the instructions are sparse to non-existent, so the idea of this post is to both review the device and fill in the gaps for anyone who has just unpacked one. I’ll be expanding the article as I learn more.

First, a little about the Turtlebot 2 compatibility. Turtlebot is a reference platform intended to provide a low-cost entry point for those wanting to develop with ROS (Robot Operating System). ROS is essential for doing anything sophisticated with the robot (e.g. exploring, making a map). There are various manufacturers making and selling Turtlebot-compatible robots all based around the same open source specifications. In actual fact, the only really open source part of the hardware is a collection of wooden plates and a few metal struts. The rest comprises a Kobuki mobile base and a Kinect or ASUS Xtion Pro 3D camera. Read a good interview with the Turtlebot designers here. On top of this, Autonomous throw in a bluetooth speaker and an Nvidia Jetson TK1 motherboard instead of the usual netbook.

Continue Reading