How to install ROS Indigo on OS X Yosemite

Compiling the Robot Operating System (ROS) Indigo on Mac OS X can be quite a challenge. Here is a well tested recipe originally created by Mike Purvis and updated by me for OS X Yosemite 10.10.2:

Solve OS X Prohibited Sign Boot Issue

Recently, I used my MacBook Pro to the end of its battery life and closed it shortly before the battery died. Something must have gone wrong there because when charging and awaking it, the touchpad ceased to work and logon didn’t work. Thus I cold rebooted it and was greeted by a nasty prohibited sign.

OS X Prohibited Sign

Unfortunately, Apple’s own recommendations did not solve the issue, so here is my solution:

Boot into the recovery partition by holding cmd+R at startup and open the terminal.
then

For me this looked like:

start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 409606
409640 916361264 1 GPT part - FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
916770904 1269536 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
918040440 136
918040576 59064320 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
977104896 131
977105027 32 Sec GPT table
977105059 1 Sec GPT header

Apparently the GUID partition table got corrupted at index 1.

To fix this, first unmount the disk:

Remove the corrupt entry:

unmount the disk again:

If the partition was a normal HFS+ partition:

or for an encrypted partition as mine:

Now your partition table should be fixed. In disk utility, unlock your drive if its encrypted. Then repair the volumes and access rights as usual. For me disk utility still complains about a missing EFI Partition, but this is likely due to my refind boot loader.

Update:

After this procedure my recovery partition showed up on my desktop, you can hide it again with:

Spoof wifi MAC address on OSX

Install spoof-mac via pip:

Set a random MAC address for wifi interface:

or set to something specific:

The MAC address should be reset to its burnt in value after a restart or you can reset it manually without restart:

Cron Jobs with Mac OSX

Although launchd is the preferred method of scheduling jobs with Mac OSX, the good old cron job is easier to configure and still works:

Press i to go into vim’s insert mode.
Add a shebang if you want to run the jobs with you favorite shell:
#!/bin/zsh
enter your cron job e.g.
0 0 * * * brew update && brew upgrade
where 0 0 * * * stands for minute, hour, day, month, weekday
Press esc to exit vim’s insert mode
type ZZ ( in capital letters )
Verify by using

If a cron job fails, you will get a system mail.

Dual Boot Ubuntu 14.04 LTS on Macbook Pro with Filevault 2

Although, I prefer working on Mac OSX or using a virtual machine for all my Linux needs, sometimes that just won’t cut it. Especially when working with ROS, a native Ubuntu can help.

Shrink some partition to make space in Mac Disk Utility
Download refind 0.8.1 and unzip
Install refind into the Recovery Partition

Mount the EFI partition and edit refind.conf. Uncomment the line with dont_scan_volumes but leave the parameters empty, otherwise refind wont find your original OSX boot Partition:

If something doesn’t work, don’t worry, you can still boot OSX by holding the option key at startup.

Now follow these instructions to create a bootable Ubuntu USB Stick. Load it with the refind bootloader and select „Try Ubuntu“. Open a terminal and start the installation without boot-loader:

In the installer choose installation type „Something else“, select the free space created at step one, format as ext4 and mount at /.

Now you should have a working dual boot configuration.

Xbox One Kinect 2.0 for Mac

This is a work in progress entry about getting the Xbox One Kinect 2.0 to run under Mac OSX. Currently, they are quite affordable (~60€) on Ebay because many people don’t like Microsoft invading their privacy in the living room. So get them while they are cheap!

The Kinect 2.0 from the Xbox One seems to be exactly the same as the Kinect for Windows (K4W) v2 dev kit , except for the missing power adapter and USB 3 converter/hub. So we will need to supply 12V from a lab power supply and solder two wires inside the kinect. You can find more here. A firmware update was not necessary for me.

Before starting off, check your usb controller compatibility by typing:

into your console and check with my Kinect 2.0 USB 3.0 controller compatibility table:

Controller Chipset PCI Device ID Status
Nec uPD720200 ? working
Intel Pantherpoint 0x1e31 working
Intel Lynxpoint 0x9c31 working
Intel Corporation 7 Series/C210 ? not working

If you are able to get another controller working – please let me know in the comments.

1. cd into a directory where you want to keep libfreenect2 stuff in
2. Install some homebrew dependencies

3. Download the libfreenect2 repository

4. Install a bunch of dependencies

5. Build the actual protonect executable

6. Run the program

Keep in mind that some USB ports may work better than others 🙂

Here are some pictures:

ImageViewer

CloudViewer

Run AT commands on 3G Modems with OSX

  1. Open a terminal window and find your 3G Modem with 
  2. Run 
  3. Now you can send AT commands to your 3G Modem e.g. type ATI to get more information about the device or AT^U2DIAG=0 to get rid of the annoying flashdrive of Huawei modems. Other useful AT commands for Huawei modems can be found here.
  4. To close the session, press the key combination Ctrl+a and then Ctrl+\