Archive for the The Downside of software development Category

Gag and double frack!

Posted in Sucky Wucky RaspingBreathBurry, The downside of Opensource, The Downside of software development on March 28, 2018 by asteriondaedalus

I have officially given up on the OrangePi Zero as the server for my house.  The system drops off the LAN after a week or two of running, which is no good if its running sprinklers and lights etc.

I regretfully inform I have chosen to get a RaspingDoodleBerryPi to drop TheThingBox onto it.

I don’t otherwise have to admit having one.

I got a black case and I will mount it out of sight on back of a black WiFi router.

It will be between you and me.

At least I can give up on this time wasting debugging.

I did almost steal an Odroid C1 off my cluster.  Almost.

Still, I have two small linux boards now.

I am going to re-burn SD and try to build moos-ivp on one of them.

Why not, worked a treat on my BBB.

 

Advertisements

Self induced sabbatical from fun

Posted in Orange Pi, Sucky service Providers, The downside of Opensource, The Downside of software development on February 20, 2018 by asteriondaedalus

Well, not really.

I had another paper to write to get me to a conference.

In the meantime, the dopey OrangePiZero keeps needing reboot every couple of weeks.  Not sure whether its the node-red, the mqtt server OR the hardware.

Previously, when the website went down, I could login via the serial port – so I suspect the hardware again.

I will likely need to pull an ODROID-C off my cluster to take over the house again.

The orangpizero will at least be a great little brain for robots.

Stuck again

Posted in The downside of Opensource, The Downside of software development on December 18, 2017 by asteriondaedalus

So, I have my iPEGA bluetooth gamepad and I am wanting it to run from my dopey Android phone that I am using as the mediator for the rover.

Nothing useful for using these gamepads in Processing for Android so that appears to be out.

No heart or interest to write something in Java.

Python?  Well pygame for Android seems a dud, a lot of old blog entries but nothing obviously working anymore.

I noted that they sorted some of the flakiness of Kivy and so I re-installed Kivy on my PC with the view of prototyping on Windoze then bombing on Android.

Go figure I can get the pyGame gamepad exerciser working on PC.  I tried the same for the raw Kivy version.   I works!  Well as long as you don’t allow your gamepad to go to sleep.  If you do, Kivy drops it.  And, if you leave it disconnected long enough, the Kivy application closes down quietly.

Posted a question on Kivy.org and an issue on github but no responses at all from anyone.

It is not obvious from the Kivy code why it drops the gamepad.  There is otherwise no hints in any of the examples or any of the documentation.

In the pygame version, the gamepad can go to sleep and when it wakes it is auto-connected again.

So, stuck as I still have to see if I can get the old pygame for android to work with the gamepad.  I would have used Kivy but help is a dead end.

 

So much help, so little help

Posted in The Downside of software development on December 8, 2017 by asteriondaedalus

So, I stupidly thought I would upgrade my elixir and crack open my book on Phoenix and plod through the examples while home sick with the flu.

Book is Programming Phoenix (eBook) P1.0 from PragProg

Broke the build so I had to strip out the hex and mix folders, re-installed hex, elixir and phoenix.

And then all I got was the broken connectic with postgres!  Why?  I was going to up from 9odd to 10 but backed out after I saw how long the 10 would take to download (and it wasn’t needed).  I had already uninstalled 9 and just re-installed.  BUT the build would fail as the username/password failed on authentication.

Hmm.

When you delete postgres on windows it doesn’t, of course, remove the data directory (where usernames and passwords are encrypted).   If you reinstall overtop a bug or quirk of the install is that it not longer prompts for super-user password or port etc.  (obviously buried in the data directory).

All fixed by manually deleting the data directory and re-re-installing postgres.

POSTSCRIPT

GAG!  My book appears to be out of date now!

At least, they have moved all the app directory structures around.

Pragmatic Programmers KEEP UP!

Although, it looks to be the difference between Phoenix versions 1.2 and 1.3 which is fine (just have to remember to use the phoenix.x rather than phx.x idiom for building apps).

POSTPOSTSCRIPT

There are problems with the errata page, as rather than the author drafting errata, as people report the problems, the errata is like a user group and so you get the same drifting away from facts.

Although, problems include movement in version of ecto as well.

If there is an error, go figure there will be at least two solutions offered by readers BUT as they don’t state the elixir, phoenix and ecto versions that they are using (while working through the book) you need likely try each of the different solutions until one works for you.

Looks like best option is to install the elixir, ecto and phoenix versions from the book.

Still, I have had to work things out that don’t appear to have been reported in the errata so I guess I am learning little tit bits along the way.

Soooooooooooo…

Posted in Linux, Orange Pi, Rant, The Downside of software development on June 15, 2017 by asteriondaedalus

…weird!

So, story up to this point was again I added the expansion board to my OPiZ.  That fragged the board somehow so that it had the weird side effect of not booting orangepi.org version of Debian server but happily still booted armbian.ord distro of Debian server.

Weird because orange.pi Debian server is derived (I think) from armbian.org’s distro (at some point).

Weird because orangepi.org distro booted happily before fragging by inserting expansion board.  Weird because even if you took the expansion board out orange.pi distro would not boot from OPiZ any more.

Weider again was that once the expansion board fragged the baseboard, the armbian.org distro could not be set with a static IP via nmtui on the OPiZ.  That was because, after fragging, nmtui would hang the armbian.org distro whenever you tried going to the connections page.

Weird because you could happily set the hostname using nmtui??!!

So, go figure.  I thought to try nmcli.

From examples on internet it should have gone something like (for my setup at least):

root@house:~# nmcli con edit 'Wired connection 1'
nmcli> set ipv4.method manual
nmcli> set ipv4.addresses 192.169.0.100/24
nmcli> set ipv4.gateway 192.168.0.1
nmcli> set ipv4.dns 61.9.226.33 61.9.226.1 8.8.8.8 8.8.8.4
nmcli> save
nmcli> quit
root@house:~#

However, quirk of Armbian is that there is no ipv4.gateway property.  Without it I had set up a static IP but could not get out to internet (no gateway).

I came across a probable back door route with the following;

root@house:~# nano /etc/network/if-up.d/gwconfig
#!/bin/sh

if [ "$IFACE" = "eth0" ]; then
 route add default gw 192.168.0.1
fi
root@house:~# chmod a+x /etc/network/if-up.d/gwconfig

You can then just reboot and then every time you boot “route add default” sets your gateway.

Except in Armbian, of course, that route command does not work with those parameters!

DOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooooooohhhh!

However, while the help file never said “gateway” there was some discussion in the help for nmcli on “addresses”, and in other places, that talked about “hops”.

So, AH HA moment (reaching back to that neuron containing networking 101).

So it turned out the fix was not obvious but is:

root@house:~# nmcli con edit 'Wired connection 1'
nmcli> set ipv4.method manual
nmcli> set ipv4.addresses 192.168.0.100/24 192.168.0.1
nmcli> set ipv4.dns 61.9.226.33 61.9.226.1 8.8.8.8 8.8.8.4
nmcli> save
nmcli> quit
root@house:~#

Notice the gateway is set in address now after the static IP for the OPiZ.

To check this you can use with “route -n”, you should see something like:

route-n

The garbage preceding it is the node-red shutdown down – sweet.

So, now I have static IP setup on my OPiZ – not the happiest route … ha ha … get it?

Now all I have to do is sort the stupid node-red and emqttd problem where, despite quite straight forward steps, neither will start for me as services.  That is the next step as discussed I want the OPiZ to start up with things a blazing.  Although, there might be a backdoor route through startup scripts.

Stereo slam dunk

Posted in Python RULES!, Sensing, The Downside of software development, Vision on June 11, 2017 by asteriondaedalus

With some pain I got the stereo camera that turned up the other day, from aliexpress, to work (provisionally).

stereo_slam1

This is on my windoze PC using 64bit Stackless Python and OpenCV 3.2.

Trick, that stopped me for two days, was working out the problem where one or the other camera would work.  But both together hung.  I would swap order and get same thing.

Turned out to be USB 2.0 choking.  So fix was to work out how to set the image size small enough for the two camera streams to cooperate on the on USB port.

Camera is this one:

stereo_slam2

Which has specs of: 1280*720 MJPEG 30fps 120 degree dual lens usb camera module HD CMOS OV9712. Which is, as it turns out, a lie in this configuration.  The device is USB 2.0 so will choke when trying to pump both through at the same time.  Some work will be needed to sort the maximum resolution that the cameras can be set to – there is likely some black magic math somewhere (or trial and error).

I haven’t used much science in the selection (I waited until prices dropped and grabbed the lowest price one at the time).  I opted for wider field of view because I suspect that creates greater disparity between points to help localisation – however, don’t quote me as that is not back up by any reading at the moment.

The hangup, at the moment, is that while the two cameras are working, OpenCV does rather have various matrix types and so the rotten thing (as usual) “thin”  or sporadic documentation.

If you find “help” any it will be using deprecated functions (from previous versions of OpenCV) or in C++ etc.

Even just a disparity map, that uses the stereo image to show depth planes, needs matrix conversions.

Still, once these are worked out I can buzz out a design on the PC before migrating to an embedded form factor (C.H.I.P., ODROID-C0 or Orange Pi Zero, perhaps even old Android phone).

I am after something to pump a point cloud out.  Using mono-slam is fun but I am not sure that having to get the camera video processing and platform pose working together is happiest medium – since people are helping out with stereo camera like this especially.

Goddamit!

Posted in The Downside of software development on April 24, 2017 by asteriondaedalus

Microsoft are so lame.

Go figure, I bit the bullet and decided to play with MRPT.  The straightforward approach was to run it on my PC so, yes, yet another version of Visual Studio (2013 this time).  It is always with great trepidation I grab yet-another-version of VS as MS seemed not to manage the interaction between licencing between versions.  I have had problems due simply to installing two different versions of the toolset.  The problem was amplified because CMAKE is being used. So, if I mention CMAKE in the help room, when discussing the context in which the error is raised, some dopey MS/VS guru will dump on you for using OPENSOURCE software (CMAKE) even though you’re using the FREE version of VS.

In any event.

Stung again somewhat.

Install taking a stupid long time.

Why.

Its installing all the components I told it not to in the original panels of the wizard.

Why on earth do I want the Windows 8 for phones SDK?