View Full Version : Back to Raspberry Pi (2) for Hexapod...

06-15-2015, 08:12 AM
I'm turning into Kurt,

So far in the hexapod I've had the Arbotix, RPi, CM904, LPC4088, Intel Edison, and now I'm playing with a Raspberry Pi 2.

However, I'm once again reminded why I keep moving away from Linux SBCs to fast microprocessors, what a pain in the butt Linux can be. I just spent two days trying to get bluez 5 installed on top of Raspbian so I can connect a Sony DS4 controller via Bluetooth to the bot like I've done with the Edison. I can't even get that far. I'm really looking forward to a released Raspbian Jessie. Wheezy is getting a little long in the tooth.

Edison: So. Damn. Small. Integrated wifi and Bluetooth is so clean and fits my needs well. But, Intel support is lacking and I/O is difficult being that it its all 1.8V.

RPi2: Smaller and more compact before. 4 USB ports will cover my needs without a hub. Good community support. But, its not as clean as the Edison and I'm having trouble getting over it. However, for my needs, I think the community support advantage is pretty huge so I'm going to try and stick with it for awhile.

My goals for the bot are to get really solid kinematics and moving going from scratch. I want to get body movement tied into leg movement seamlessly so for example, if I have a FPV camera on the bot I can look around a small amount with body movements but it will take steps as necessary to look further.

Secondly, I want to integrate video and OpenCV. I plan to use the Pi Camera for this.

06-15-2015, 08:32 AM
I'm turning into Kurt,
Who me ;) :p

I hear you on Intel. Nice board, but they suck when it comes to supporting it. I love how up on their forums, the typical type of answers from Intel are: we will look into it, or yes our engineers are aware of the issue and it will be addressed in a future release... I also love that when they do have a release it appears like most of the time it is Friday just before they all leave for the weekend... They will also never give you any estimation on when the next release will be nor what is fixed in it, until a release magically appears.

You have yet tried: Odroids? They are a smaller company so community support is not as good as RPI, but they try. Note: DS3 and DS4 controllers have pain for me as well! With the XU3 - sometimes it connects sometimes it does not... Once you get it to connect then hopefully you continue to be able to make it work...

RPI2 is probably a good choice...

For the DS4, I had some luck before it magically connected on Odroid XU3, using: ds4drv. Not sure if it works on RPI2 or not.

I wish the ubuntu would update to using Bluez5 instead of an old version of Bluz4...

Looking foreword to see how well it works for you!


P.S - Sometimes it just is a lot easier and more fun with Teensy 3.1s... Maybe sometime this year he will release a newer Teensy with faster processor with hardware floating point.

06-15-2015, 08:59 AM
For microcontroller/microprocessors I'm really like the mbed.org platform. I recently made a digital dashboard/data logger (www.projectsofdan.com (http://www.projectsofdan.com)) with the LPC4088 (120mhz M4 w/ FPU) and it was super easy. I really like the online IDE and compiler.

06-15-2015, 02:23 PM
My goals for the bot are to get really solid kinematics and moving going from scratch. I want to get body movement tied into leg movement seamlessly so for example, if I have a FPV camera on the bot I can look around a small amount with body movements but it will take steps as necessary to look further.

Sounds like a very good plan! Features like that certainly makes the hex looking more alive. Look at insects how they move or all living creatures for that sake, move head, move your body along and finally take a small step for compensating the range. Sounds obviously, but certainly add more life.

Like Kurt said, the Teensy is fun. Do wish I had more time at the moment myself..

Have fun!

06-16-2015, 07:43 AM
Last night I installed Ubuntu Mate 15.04 on the Pi2. It's pretty cool how much faster this is than the old Pi's. It's practically a full size computer experience using the leaner Mate Desktop/GUI.

I was hoping being Ubuntu 15.04, it would include bluez 5, but apparently they still aren't ready for it. So I upgraded bluez via compiling the source. It still didn't take over the old bluetoothd, but I replaced the old with the new file and it worked and I was the able to pair the DS4 controller. I'm using my home made DS4 drivers (github.com/TXBDan/DS4driver) and they work. I'm sure simpler than dsrdrvr, but at least I know how it works and it covers the ground I need.

USB2AX always works and is easy to setup. So I guess the next step is to install this hardware in the robot. It'll be nice to not have to use a USB hub or wire up an external Xbee socket for the commander like last time.

06-17-2015, 08:09 AM
Hi Dan,

As I have been mentioning in other threads, the different controllders (DS3 and DS4) have been problematic.

So thinking of also trying to update the BlueZ on my ODroid XU3 to bluez 5. Any suggestions on how best to build and install it?


P.S. - I am currently playing some with this, based off of:
which is also based on: http://www.linuxfromscratch.org/blfs/view/svn/general/bluez.html

So far I have downloaded the sources, (did an apt-get install libical-dev), did the configure and first make, which completed,
I have also done the: make test
which completed with all 25 tests completing successfully. Now I just need to decide to do the.
sudo make install plus the other related steps.

But first I may see about saving away the current bluetooth control files and the like, and compare these files...

06-17-2015, 09:59 AM
When you run 'configure' be to use the "--disable-systemd" (or something like that) if your system doesn't use it. The current Raspbian does not, but the latest Ubuntu Mate I'm now running does.

On my Raspbian build, I compiled and installed bluez 5.30 and the tools were all updated to 5.30, but bluetoothd was still the old 4.x. I tried just replacing the old bluetoothd file with the newly built one, but it after rebooting, the computer would no longer boot.

On the Ubuntu Mate build, I compiled, installed, and was in the same situation. I had no other ideas so I replaced the bluetoothd file, but this time it worked fine.

BlueZ 5.14+ natively supports the Playstation controllers so its pretty smooth sailing once its installed.

Oh, actually I used the udev rules from the ds4drvr. I got them from their github readme page. I'm not totally sure if I needed them or not, but they're there.

Also, I noticed that the Bluetooth controller creates two devices, /dev/input/js0 and /dev/input/event4. Apparently the "event" style is more modern and provides more features so that is preferable to use.

As you can see, I barely got through this. :)

But last night, I got the USB2AX working and my old robot code working with the DS4 controller. (All without servos connected). Tonight I hope to get this hardware into the robot body and talking to servos.

06-17-2015, 11:59 AM
Thanks Dan,

I tried installing it and now I think the USB is not working... the install instructions showed making a link in /usr/sbin, but instead I think I just copied it in... Also tried playing some with /etc/bluetooth/master.conf.. or the like.

I then tried to force load bluetoothd after boot, and got message like:
[email protected]:~$ sudo bluetoothd
D-Bus setup failed: Name already in use

I also noticed that after I installed this stuff if I tried to use their bluetooth gui app, it did not appear to want to become visible.
If I get a chance later maybe will rebuild without the disable... See if that helps...

Wish Ubuntu would simply move to Bluez5 or a minimum integrate in the updates for DS3/DS4 back in the Bluez4 branch.