Monthly Archives: July 2014

TurtleBot Inventors Interview

Today I have found a very nice interview of Tully Foote and Melonee Wise on IEEE. I think it is a must read for everybody interested in low-cost mobile ROS robots.

Its amazing to read the thoughts they had while inventing the TurtleBot: Lower the entry barrier into ROS and keeping low cost for educational reasons. The same thing I try to achieve with my thesis and the aMoSeRo 🙂

Most of the time they speak right into my heart, the only thing I would disagree was this:

Melonee: I believe that the thing that robotics needs most is people who know how to program robots, and not as much people who focus on building robots. I’d like to see that shift in robotics competitions in general, where it’s more about what the robot is doing, as opposed to how it’s built. 

I’ve met a lot of engineers that are capable of building robots,but clearly underestimate the heavy lifting done by the computer science part – but also otherwise, some computer scientists do not have a single clue on how to move a real world motor by the power of code – someone needs to build a stable bridge between engineering and computing, and this is a person at least understanding both worlds or better mastering them, because as she also said:

Melonee: Because building robots is hard!

 

ROS – [rosout-1] process has died, exit code -11

Some days ago I started roscore and got faced with an error message like that:

process[rosout-1]: started with pid [16089]
[rosout-1] process has died [pid 16089, exit code -11, cmd /opt/ros/indigo/lib/rosout/rosout __name:=rosout __log:=/home/rosuser/.ros/log/9b3b3980-0b60-11e4-80f9-0015afdb2ab9/rosout-1.log].
log file: /home/rosuser/.ros/log/9b3b3980-0b60-11e4-80f9-0015afdb2ab9/rosout-1*.log

Okay, so roscore seemed to have crashed and created a log file according to the given path. But the logfile was empty *please imagine dramatic sound effects here*. But what do you do, if a programm (rosout?) crashes without log file and an error message like the above?

You insert your well done system wide backups like snapshots from zfs,btrfs, virtual machines, lvm or anything. If you forgot to do so… *fail sound here* you might need to manually check what changed since the last time it worked.

And so I did. For several days.

I soon figured out, that this error applied to all rosccp related ROS-programms – but left all rospy parts alive, which finally put my on track that there has been an kernel update of my ubuntu 14.04, which I unfortunately installed in a moment of weak decisions.
So reverting that would have been been an option, further my lib-boost version seemed to have changed – since ROS is very sensible to that, this might have been the problem. Therefore I tried everything by manually reverting updates, reinstalling packages, recompile everything from source, searching system logs and soon really considered to reset my system by installing good old 13.04 with ROS hydro…

But wait! Sometimes you strike lucky and time solves all issues. Today I’ve just upgraded my ROS from their repos and tadaaa – everything works again.

But why do I write this into an post? Because its easy to avoid situations like that and I want to share my hard learned lessons with you the easy way:

  1. Get your ROS version straight – Do you really need the latest ROS on the latest kernel?
    The answer for your system is probably no. I am currently running stable ROS Hydro and ‘unstable’ ROS Indigo on Ubuntu 14.04 on latest kernel. It works – but it would have been way easier to stick on Hydro all the way.
  2. avoid apt-get dist-upgrade on critical ROS machines
  3. use backups and / or virtual machines
  4. rospy didn’t cause any problems so far – in case performance isn’t the most important thing, think about using python
  5. avoid to put all your catkin_ws code into one git repository  if its running on multiple architectures (x86,x64, arm6,arm7) – alone the openni2_driver took nearly all my sanity during learning that lesson….

That is enough for today, but after this list, I really think about tracking all hard learned lessons in more public and better organised location – ROS best practices? We’ll see.

 

 

aMoSeRo – leaving the virtual cookie box

It is only consequent to leave the virtual cookie box too:

aMoSeRo – leaving the cookie box

Finding a low cost case isn’t as easy as expected – even with some common dimensions around 200mm*200mm*50mm the only inexpensive thing I found, was an star wars cookie box made out of thin plate.

So to change that I went to a DIY-Store today (or Baumarkt in german) and bought a 2 meters aluminium mopboard, some metal glue, acrylic glass and went to the basement:

But after cleaning the gluey mess off the table with spiritus, taking a well deserved shower and waiting 24 hours for the glue to get its full power the result is something able to be shown:

It’s a bit bigger than before but provides the basic functions in only 40 mm height. So we’ve got a real mobile plattform (base_footprint) for all upcoming modules (i.g. mesh networks, robot arms, flying drones or sensors like Geiger-Müller counters).

We’ve reached half time! Lets see whats still possible 🙂

aMoSeRo at Dresdner Berufsorientierungstage

For multiple reasons the TU Bergakademie Freiberg took part in the Dresdner Berufsorientierungstage at the day of mathematics on the 15th of July 2014.

I had the honor to take part on demonstrate the aMoSeRo to hundrets of children. Next to it we showed some two dancing NAOs and the LeapMotion – all to explain the need of mathematics and informatics for future applications.

Some impressions:

show apt-get history in Ubuntu / Debian

Sometimes you need some information about your apt-get install / upgrade / remove history. (for example if you destroyed your ROS-Install on your laptop).

By adding a little code snippet to your .bashrc you achieve a very useful tool.

function apt-history(){
      case "$1" in
        install)
              cat /var/log/dpkg.log | grep 'install '
              ;;
        upgrade|remove)
              cat /var/log/dpkg.log | grep $1
              ;;
        rollback)
              cat /var/log/dpkg.log | grep upgrade | 
                  grep "$2" -A10000000 | 
                  grep "$3" -B10000000 | 
                  awk '{print $4"="$5}'
              ;;
        *)
              cat /var/log/dpkg.log
              ;;
      esac
}

Now running

apt-history install
[...]
2014-07-14 19:08:13 install ros-indigo-desktop-full:i386 <none> 1.1.3-0trusty-20140711-1919-+0000

brings you all install entries with timestamp and version information.  Note: instead of install ‘upgrade‘ and ‘remove‘ works too. ‘rollback‘ brings you version information you’ll might need for what I now call downgrade.

Reset Arduino Micro via python serial

Sometimes resetting a device isn’t as easy as expected. After some research i figured out, that opening a serial connection with a special baud rate would to the job for our Arduino Micro (and similiar like Leonardo):

#!/usr/bin/env python


import serial
port='/dev/ttyACM0' #adjust this in case your device differs
ser = serial.Serial() #open serial connection
ser.port=port #setting the port accordingly

#in case your usual baudrate isn't 9600 reset will not work, therefore we will open a resetable connection
#thanks to mattvenn.net for suggesting to add this step!
ser.baudrate=9600
ser.open(); ser.close()

ser.baudrate=1200 # set the reset baudrate
ser.open(); ser.close()
#don't forget to sleep some reset time

Run the script as root. It might need required to change your port according to your serial controller status.

LeapMotion and ROS

Today I’ve got the chance to get my hands on a Leap Motion. As it uses depth information to track hands on a short range from the device and as there is a ros driver package existing for it, I hoped to get a 3D PointCloud. It costs about 80€ and could have been a cheap replacement for the [amazon &title=Xtion&text=Asus Xtion].

Unfortunately its not possible (yet?) – here is a very nice post why.

But it is fun anyways to get both hands tracked:

The ros driver interfaces ros with only one hand – but we could do something like shown below to control the amosero:

Later it would be a nice way to control a robot arm – but for now we leave that nice little device as there is a lot of other stuff to be done.

aMoSeRo – first robot_pose_ekf and gmapping

This surely doesn’t look amazing from a external look – but this has been a day of hard work and was very important.

The robot_pose_ekf package is working! It is neither the setup I am going to use nor is it very stable – but it proves some points.

First I needed to write my own IMU driver for ros – 9 degrees of freedom (DOF) for 30€ and a bag of problems. This is a lot cheaper (around 100€) than the often used Razor IMU of sparkfun with existing ROS code, and exactly 3DOF better than the WiiMote (with Motion+ and also about 60-70€) I have been experimenting with. There is still a lot of work left for improving the stability, the calibration of the LSM9DS0 and there has been a lot more to find out about magnetic fields and strange units that needed to be converted in other ones than I would have ever expected – but so far the /imu_data topic serves some not totally wrong data – therefore normalisation minimizes  the issues with the 3-5 scales per axis I had to deal with.

Next I needed to increase my bad odometry sources – if not by quality at least with quantity – and added a GPS sensor as /vo topic.  The CubieTruck is a abstruse while handling some easy things like using one of the possible 8 UART connections…  for today I’ve not managed to get it running with UART but a external serial usb controller. Another area that needs heavy improvement…

Finally I had to deal with the REP105 issue that I have been describing in a previous post. The gmapping algorithm needed to get adjusted parameters, coming along with some serious confusion generated by inconsistent syncing over my 4 working devices (rosBrain with roscore and slamming, rosDev – my development machine, the aMoSeRo and the seafile backup server)…

…but after that all parts worked together for the first time, including a simulated aMoSeRo moving on screen while beeing hold in different angles in the real world.

Everything is still far from done – but right on the way – and we’ve already found out how wide the road is 🙂

Willow Garage, the PR2 and REP105

It is the second time I need to adjust my URDF Model for the sake of NOT following the REP (ROS Enhancement Proposal). This time it is about the relationship between base_link and a not REP mentioned base_footprint.

As REP105 says the ‘Relationship between Frames’ should be:

map –> odom –> base_link

but the relation chip for the Willow Garage (or now Clearpath Roboticsrobot PR2 is

map --> odom_combined --> base_footprint  -->   base_link

which is the exact demand of the robot_pose_ekf package.

So Willow Garage, Y U NO Stick to your own REP105 ?

(See more on Know Your Meme)

I suppose because of backwards compatibility, some code might get broken, but what about using some parameters, maybe with a (even hard coded) default fallback?

So for the aMoSeRo there is a decision to be made. Using base_link or base_footprint? Or both? Which frame is the one near to earth?

If decided to take both as a matter of compatibility to other packages and reordered my TF tree:

 

framesWithParentFootprint

 

Still questionable if the base_footprint should have wheels and tracks attached, but that is more a question of taste because they have no special task.

Screenshot - 04.07.2014_4

 

Now the robot has a light grey base_footprint, and a blue base_link.