ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
6

ros on google nexus 5

asked 2015-04-08 07:18:29 -0500

georg l gravatar image

updated 2015-04-13 15:59:01 -0500

Hi,

I just installed ros on a google nexus 5 using Ubuntu touch as operation system for the phone. The results are currently promising, hence I like to share them. I wrote down the steps to perform and want to create a wiki page someday. Currently I have a running ros on the phone and can communicate with ros core (running remote control of the turtlesim on the phone).

The next steps I like to add are:

  • Cross compile environment
  • Accessing sensors (GPS and IMU) of the phone

Is there something I missed? What is interesting for you? Do you have technical remarks and hints, especially the hacks. Is there something to test?

Regards,

Georg


Changelog:

  • added kinect

Introduction

This guide describes how to install ros on a google nexus 5 smartphone with Ubuntu touch. When the guide was written (15 / 04) I used the development version for Ubuntu phone (vivid). After installation android will be erased completely. I did not test the phone functionality of Ubuntu touch but suppose that LTE is working. The precondition for the installation is a working wireless environment with dhcp and a PC with installed Ubuntu (I used 14.10 utopic).

Installation of Ubuntu touch on the phone

First it is necessary to install Ubuntu Phone on the device. For installation I used the guide here [ https://developer.ubuntu.com/en/start... ] without big problems.

To flash the device the following command sets the phone into developer mode and adds a password.

ubuntu-device-flash --channel="ubuntu-touch/devel" --bootstrap --server="http://system-image.tasemnice.eu" --password=1234 --developer-mode

Sometimes the flashing does not succeed and fails without error, when that happens it is necessary to retry the above command. If you are no developer yet make sure to get one and set your password (described in the how to above).

The next step is to make the image on the phone writable.

phablet-config writable-image

The device reboots and you can configure ssh.

Enabling ssh:

adb shell android-gadget-service enable ssh

Copy your public key to the Phone:

adb shell mkdir /home/phablet/.ssh
adb push ~/.ssh/id_rsa.pub /home/phablet/.ssh/authorized_keys
adb shell chown -R phablet.phablet /home/phablet/.ssh
adb shell chmod 700 /home/phablet/.ssh
adb shell chmod 600 /home/phablet/.ssh/authorized_keys

Now you can look up your IP on the phone and use ssh to connect: adb shell ip addr show wlan0|grep inet ssh phablet@ubuntu-phablet [or IP]

You are ready to start the installation of ros:

Installation of ros

When you ssh on the phone it behaves like a normal Ubuntu vivid.

Preparation of the device

Unfortunately the partitions of the phone are unhandy for our purposes. The root partition has a size of about 2GB which is not sufficient to install ros. It was not possible to find a tidy way to re-size the root partition, hence I used the hack found here [ http://askubuntu.com/questions/514913... ], which copys /usr and /opt into the home partition and binds them ...

(more)
edit retag flag offensive close merge delete

Comments

2

This looks awesome! The only other comment I have: This page is more for actual questions. Yours is already a tutorial. I would highly encourage you to copy this into a wiki page. The ros-users mailing list would be the best place to announce that.

dornhege gravatar image dornhege  ( 2015-04-08 08:24:19 -0500 )edit

I second to @dornhege. I like to see this great work as a tutorial on ros wiki!

130s gravatar image 130s  ( 2015-04-09 02:38:59 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2015-04-12 14:05:02 -0500

georg l gravatar image

updated 2015-04-12 14:14:25 -0500

Thank you for testing. Did you run apt-get upgrade or other updates on your phone? Are you sure the bind script is executed and /usr is mounted?

df -ah | grep usr

The output shall look like:

/dev/mmcblk0p28                  27G  3.7G   22G  15% /usr

Is there a /usr/lib/python2.7/py_compile.py?

To fix your system you could try:

sudo apt-get install -f

If that fails you could try

sudo dpkg-reconfigure python2.7-minimal
sudo dpkg-reconfigure python2.7-python2.7
sudo dpkg --configure -a 
sudo apt-get install -f

What do you plan with the phone. Depending on your input I will improve the installation howto.

edit flag offensive delete link more

Comments

I've got the similar output as yours when typing df -ah | grep user. And I tried your suggestions, but it did not work. So, I re-installed ubuntu and then installed python2.7-dev before binding /usr, /opt. Then everything worked smoothly. Thank you for your help.

JollyGood gravatar image JollyGood  ( 2015-04-16 08:53:33 -0500 )edit
0

answered 2015-04-09 12:04:08 -0500

JollyGood gravatar image

updated 2015-04-11 10:14:22 -0500

I have been doing the same thing.. I had problems in dependency. Thank you so much for posting this!

I followed your method, but I got errors in setting up python while doing "sudo apt-get install ros-indigo-ros-base" Installing ros was almost working, but at last, the dpkg errors occurred. Help! plz.

E: Sub-process /usr/bin/dpkg returned an error code (1) Failed to perform requested operation on package. Trying to recover: Setting up python2.7-minimal (2.7.9-2ubuntu3) ... Could not find platform independent libraries <prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] python2.7: can't open file '/usr/lib/python2.7/py_compile.py': [Errno 2] No such file or directory dpkg: error processing package python2.7-minimal (--configure): subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of python2.7: python2.7 depends on python2.7-minimal (= 2.7.9-2ubuntu3); however: Package python2.7-minimal is not configured yet.

dpkg: error processing package python2.7 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of python2.7-dev: python2.7-dev depends on python2.7 (= 2.7.9-2ubuntu3); however: Package python2.7 is not configured yet.

dpkg: error processing package python2.7-dev (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: python2.7-minimal python2.7 python2.7-dev

edit flag offensive delete link more

Question Tools

4 followers

Stats

Asked: 2015-04-08 07:18:29 -0500

Seen: 1,643 times

Last updated: Apr 13 '15